Initial commit

This commit is contained in:
2019-11-20 07:44:43 +01:00
commit 5bf49c4a81
41188 changed files with 5459177 additions and 0 deletions

View File

@@ -0,0 +1,125 @@
{*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*}
<script>
{literal}
current_id_tab = '{$current_id_tab|intval}';
{/literal}
</script>
<div class="clean-module">
{if !$is_16}
<div class="bootstrap">
{include file="./header.tpl"}
{/if}
{if $notice}
<div class="">{$notice}</div> <!--This variable can not be escaped twice. She already escaped.-->
{/if}
<div class="clearfix">
<div class="col-lg-2">
<div class="list-group">
<a href="#documentation" class="list-group-item active documentation" data-toggle="tab"><i class="icon-book"></i>&nbsp;&nbsp;{l s='Documentation' mod='cdorderlimit'}</a>
{if $tabConfig && $tabConfig|@count>0}
{foreach from=$tabConfig item='conf' key=i}
<a href="#{$conf.id}" class="list-group-item {$conf.id}" data-toggle="tab"><i class="icon-cogs"></i>&nbsp;&nbsp; {$conf.title|escape:'htmlall':'UTF-8'}</a><!--This variable can not be escaped twice. She already escaped.-->
{/foreach}
{/if}
<a href="#contact" class="contact list-group-item" data-toggle="tab"><i class="icon-envelope"></i>&nbsp;&nbsp;{l s='Contact' mod='cdorderlimit'}</a>
</div>
<div class="list-group">
<a class="list-group-item"><i class="icon-info"></i> &nbsp;&nbsp; {l s='Version' mod='cdorderlimit'} : {$version|escape:'htmlall':'UTF-8'}</a>
</div>
</div>
<div class="tab-content col-lg-10">
<!-- Documentation -->
<div class="tab-pane panel active mainTabs" id="documentation">
<div class="panel-heading"><i class="icon icon-book">&nbsp;&nbsp;</i> {l s='Documentation' mod='cdorderlimit'}</div>
<div class="form-wrapper">
<p>{$description|escape:'htmlall':'UTF-8'}</p>
{if $readme}
<div class="media">
<a class="pull-left" target="_blank" href="{$readme|escape:'htmlall':'UTF-8'}" data-original-title="" title="">
<img height="32" width="32" class="media-object" src="{$module_dir|escape:'htmlall':'UTF-8'}/views/img/pdf.png" alt="" title="">
</a>
<div class="media-body">
{l s='Attached you will find the documentation for this module. Do not hesitate to consult in order to properly configure the module.' mod='cdorderlimit'}
</div>
</div>
{/if}
{if $change_log}
<hr>
<p style="font-size: 15px;font-weight: bold;">{l s='Change Log' mod='cdorderlimit'}</p>
<div style="padding:10px;height:100px;border:1px dotted #f6f6f6;overflow-y:scroll;">
{$change_log} <!--This variable can not be escaped twice. She already escaped.-->
</div>
{/if}
</div>
</div>
<!-- extra tabs -->
{if $tabConfig && $tabConfig|@count>0}
{foreach from=$tabConfig item='conf' key=i}
<div id="{$conf.id|escape:'htmlall':'UTF-8'}" class="tab-pane mainTab">
{$conf.content} <!--This variable can not be escaped twice. She already escaped.-->
</div>
{/foreach}
{/if}
<!-- contact -->
<div id="contact" class="tab-pane panel mainTab">
<div class="panel-heading"><i class="icon icon-envelope">&nbsp;&nbsp;</i>{l s='Contact-us' mod='cdorderlimit'}</a></div>
<div class="form-wrapper">
<p><b>{l s='Thank you for choosing a module developed by Clean Presta.' mod='cdorderlimit'}</b></p>
<p>{l s='CleanPresta is an Ecommerce/PrestaShop department of CleanDev' mod='cdorderlimit'}</p>
<hr>
<p>{l s='If you encounter a problem using the module, our team is at your service here ' mod='cdorderlimit'} : <a target="_blank" href="{$addon_ratting|escape:'htmlall':'UTF-8'}">{l s='click here' mod='cdorderlimit'}</a> ({l s='Think to give us maximum information about your situation' mod='cdorderlimit'})</p>
<p>{l s='But, read documentation before contacting us' mod='cdorderlimit'}</p>
<hr>
<p>{l s='See all our modules here' mod='cdorderlimit'} : <a target="_blank" href="http://addons.prestashop.com/fr/2_community?contributor=7767">{l s='click here' mod='cdorderlimit'}</a></p>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="panel alert-success" style="text-align:center;background-color:#ddf0de;font-size: 14px;">
<p>{l s='You are satisfied with your module, Encourage us' mod='cdorderlimit' mod='cdorderlimit'} : <a target="_blank" href="http://addons.prestashop.com/ratings.php">{l s='Please note this module on PrestaShop Addons, giving it 5 stars' mod='cdorderlimit'}</a></p>
<p>{l s='If you are not satisfied' mod='cdorderlimit'} : <a target="_blank" href="{$addon_ratting|escape:'htmlall':'UTF-8'}">{l s='we will be pleased to hear from you' mod='cdorderlimit'}</a></p>
</div>
<div class="clearfix"></div>
{if !empty($features) && $features.module|@count>0}
<div class="panel">
<div class="panel-heading"><i class="icon icon-signal">&nbsp;&nbsp;</i>{l s='Please do not forget' mod='cdorderlimit'}</a></div>
<ul class="form-wrapper" style="padding:0">
{foreach from=$features.module item='feature' key=i}
<li class="col-md-12" style="margin-bottom:10px;border-bottom:1px dotted;list-style: none;padding:5px 0">
<div class="col-xs-12 col-sm-4 col-md-4"><a href="{$feature.addon|escape:'htmlall':'UTF-8'}" target="_blank">{$feature.name|escape:'htmlall':'UTF-8'}</a></div>
{if !empty($feature.description)}<div class="col-xs-12 col-sm-8 col-md-8">{$feature.description|escape:'htmlall':'UTF-8'}</div>{/if}
<div style="clear:both"></div>
</li>
{/foreach}
</ul>
<div style="clear:both"></div>
</div>
{/if}
</div>
{if !$is_16}
{include file="./header.tpl"}
</div>
{/if}
</div>

View File

@@ -0,0 +1,23 @@
{*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.type == 'custum_field'}
{else}
{$smarty.block.parent}
{/if}
{/block}

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: /');
exit;

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: /');
exit;

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: /');
exit;

View File

@@ -0,0 +1,42 @@
{*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*}
<div class="page-head">
<h2 class="page-title" style="padding: 16px;">
{$display_name|escape:'htmlall':'UTF-8'}
</h2>
<div class="page-bar toolbarBox">
<div class="btn-toolbar">
<ul class="cc_button nav nav-pills pull-right">
<li>
<a id="desc-module-hook" class="toolbar_btn" href="{$module_trad|escape:'htmlall':'UTF-8'}" title="{l s='Translation' mod='cdorderlimit'}">
<i class="process-icon-flag"></i>
<div>{l s='Translation' mod='cdorderlimit'}</div>
</a>
</li>
<li>
<a id="desc-module-hook" class="toolbar_btn" href="{$module_hook|escape:'htmlall':'UTF-8'}" title="{l s='Manage hooks' mod='cdorderlimit'}">
<i class="process-icon-anchor"></i>
<div>{l s='Manage hooks' mod='cdorderlimit'}</div>
</a>
</li>
<li>
<a id="desc-module-back" class="toolbar_btn" href="{$module_back|escape:'htmlall':'UTF-8'}" title="{l s='Back' mod='cdorderlimit'}">
<i class="process-icon-back"></i>
<div>{l s='Back' mod='cdorderlimit'}</div>
</a>
</li>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../');
exit;

View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 MARICHAL Emmanuel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,80 @@
## PrestUI: RiotJS-based UI library for PrestaShop
PrestUI is an UI library to support the developement of PrestaShop modules. It allows you to write one concise html, compatible with all recent versions of PrestaShop (1.5 and 1.6). PrestUI will automatically adapt depending on which PrestaShop version the module is used on.
It allows you to write:
```html
<ps-switch name="switch" label="Switch" yes="Yes" no="No" active="true"></ps-switch>
```
And you will get something like this, a valid HTML for PrestaShop:
```html
<div class="form-group">
<label class="control-label col-lg-3 "><span>Switch</span></label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" value="1" name="switch" id="switch_on" checked="checked">
<label for="switch_on">Yes</label>
<input type="radio" value="0" name="switch" id="switch_off">
<label for="switch_off">No</label>
<a class="slide-button btn"></a>
</span>
</div>
</div>
```
PrestUI is based on RiotJS, a really light React-like user interface library.
You can find more information about RiotJS on [GitHub](https://github.com/muut/riotjs) and a full documentation on the [official website](https://muut.com/riotjs/).
## Installation / Usage
To use PrestUI, you need to include the files into your module. Download PrestUI and move the folder in `/views/templates/admin/`
You also need to include RiotJS since all the components are based on it.
You can [download a copy](https://muut.com/riotjs/download.html) and include it into the module, or you can use a CDN like this:
``` php
$this->context->controller->addJS('https://cdn.jsdelivr.net/g/riot@2.0(riot.min.js+compiler.min.js)');
```
You can now include PrestUI like this:
``` php
return $html.$this->display(__FILE__, 'views/templates/admin/prestui/ps-tags.tpl');
```
If you only need a few tags, you can assign a variable with only the groups you need, before rendering ps-tags:
``` php
$this->smarty->assign('tags', array('tabs', 'panel'));
```
## Available tags
All available tags and their attributes are listed on the [wiki](../../wiki)
## Roadmap
- 0.1 (Released)
- Tags loader
- Basic inputs
- Panel
- Tabs
- 0.2 (Released)
- PS 1.4 compatibility
- More inputs
- alerts
- 0.3
- Lists
- Required inputs
- Remove 1.4 compatibility
## Contribution
Found a bug or have an idea? Use GitHub's tickets system. You can also make a pull request.
## License
PrestUI is licensed under the [MIT licence](http://opensource.org/licenses/MIT)

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../');
exit;

View File

@@ -0,0 +1,118 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-alert>
{if $ps_version >= 1.6}
<div class="alert { opts['alertClass'] }">
<button type="button" class="close" data-dismiss="alert">×</button>
<yield/>
</div>
{else}
<div class="{ opts['alertClass'] }">
<yield/>
<img class="close" alt="X" src="../img/admin/close.png" onclick={ hide }>
</div>
<style scoped>
div {
position: relative;
padding-right: 25px !important;
}
img.close {
margin: 0 !important;
position: absolute;
right: 10px;
top: 15px;
cursor: pointer;
}
</style>
hide(e) {
$(e.target).parent().hide()
}
{/if}
</ps-alert>
</script>
<script type="riot/tag">
<ps-alert-success>
<ps-alert alert-class="{if $ps_version == 1.5}conf{else}alert alert-success{/if}">
<yield/>
</ps-alert>
</ps-alert-success>
</script>
<script type="riot/tag">
<ps-alert-error>
<ps-alert alert-class="{if $ps_version == 1.5}error{else}alert alert-danger{/if}">
<yield/>
</ps-alert>
</ps-alert-error>
</script>
<script type="riot/tag">
<ps-alert-warn>
<ps-alert alert-class="{if $ps_version == 1.5}warn{else}alert alert-warning{/if}">
<yield/>
</ps-alert>
</ps-alert-warn>
</script>
<script type="riot/tag">
<ps-alert-hint>
<ps-alert alert-class="{if $ps_version == 1.5}hint{else}alert alert-info{/if}">
<yield/>
</ps-alert>
{if $ps_version == 1.5}
<style scoped>
.hint {
display: block;
margin: 0 0 10px 0;
}
</style>
{/if}
</ps-alert-hint>
</script>

View File

@@ -0,0 +1,279 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-form-group>
{if $ps_version >= 1.6}
<div class="form-group">
<label class="control-label col-lg-3 { opts.required == 'true' ? 'required' : '' }">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" data-original-title="{ opts.hint }" if={ opts.hint }>{ opts.label }</span>
<span if={ !opts.hint }>{ opts.label }</span>
</label>
<div class="col-lg-9"><yield/></div>
<div class="col-lg-9 col-lg-offset-3"><div class="help-block" if={ opts.help }><raw content="{ opts.help }"/></div></div>
</div>
{else}
<div style="clear: both; padding-top:15px;">
<label class="conf_title"><sup if={ opts.required }>*&nbsp;</sup>{ opts.label }</label>
<div class="margin-form">
<yield/>
<p class="preference_description" if={ opts.help }><raw content="{ opts.help }"/></p>
</div>
</div>
{/if}
</ps-form-group>
</script>
<script type="riot/tag">
<ps-input-text>
<ps-form-group>
{if $ps_version >= 1.6}
<div class="{literal}{ opts.prefix || opts.suffix ? 'input-group input ' : '' }{ opts['fixedWidth'] ? 'fixed-width-'+opts['fixedWidth'] : '' }{/literal}">
<span class="input-group-addon" if={ opts.prefix }>{ opts.prefix}</span>
<input type="text" name="{ opts.name }" value="{ opts.value }" class="input { opts['fixedWidth'] ? 'fixed-width-'+opts['fixedWidth'] : '' }" placeholder="{ opts.placeholder }" required="{ opts.requiredInput == 'true' }" >
<span class="input-group-addon" if={ opts.suffix }>{ opts.suffix}</span>
</div>
{else}
<span if={ opts.prefix }>{ opts.prefix }&nbsp;</span><input type="text" size="{ opts.size }" name="{ opts.name }" value="{ opts.value }" placeholder="{ opts.placeholder }" required="{ opts.requiredInput == 'true' }"><span if={ opts.suffix }>&nbsp;{ opts.suffix }</span>
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-input-text>
</script>
<script type="riot/tag">
<ps-switch>
<ps-form-group>
{if $ps_version >= 1.6}
<span class="switch prestashop-switch fixed-width-lg">
<input type="radio" name="{ opts.name }" id="{ opts.name }_on" value="1" checked={ opts.active == 'true' } disabled="{ opts.disabled == 'true' }">
<label for="{ opts.name }_on">{ opts.yes }</label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_off" value="0" checked={ opts.active != 'true' } disabled="{ opts.disabled == 'true' }">
<label for="{ opts.name }_off">{ opts.no }</label>
<a class="slide-button btn"></a>
</span>
{else}
<label class="t" for="{ opts.name }_on"><img src="../img/admin/enabled.gif" alt="{ opts.yes }" title="{ opts.yes }"></label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_on" value="1" checked={ opts.active == 'true' }>
<label class="t" for="{ opts.name }_on"> { opts.yes }</label>
<label class="t" for="{ opts.name }_off"><img src="../img/admin/disabled.gif" alt="{ opts.no }" title="{ opts.no }" style="margin-left: 10px;"></label>
<input type="radio" name="{ opts.name }" id="{ opts.name }_off" value="0" checked={ opts.active != 'true' }>
<label class="t" for="{ opts.name }_off"> { opts.no }</label>
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-switch>
</script>
<script type="riot/tag">
<ps-radios>
<ps-form-group>
<yield/>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-radios>
</script>
<script type="riot/tag">
<ps-radio>
{if $ps_version >= 1.6}
<div class="radio">
<label><input type="radio" name="{ opts.name }" id="{ opts.name }_{ opts.value }" value="{ opts.value }" checked={ opts.checked == 'true' }><yield/></label>
</div>
{else}
<input type="radio" name="{ opts.name }" id="{ opts.name }_{ opts.value }" value="{ opts.value }" checked={ opts.checked == 'true' }>
<label class="t" for="{ opts.name }_{ opts.value }"><yield/></label>
<br>
{/if}
</ps-radio>
</script>
<script type="riot/tag">
<ps-checkboxes>
<ps-form-group>
<yield/>
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-checkboxes>
</script>
<script type="riot/tag">
<ps-checkbox>
{if $ps_version >= 1.6}
<div class="checkbox">
<label for="{ opts.name }_{ opts.value }">
<input type="checkbox" name="{ opts.name }" id="{ opts.name }_{ opts.value }" checked={ opts.checked == 'true' }>
<yield/>
</label>
</div>
{else}
<input type="checkbox" name="{ opts.name }" id="{ opts.name }_{ opts.value }" value="{ opts.value }" checked={ opts.checked == 'true' }>
<label class="t" for="{ opts.name }_{ opts.value }"><yield/></label>
<br>
{/if}
</ps-checkbox>
</script>
<script type="riot/tag">
<ps-color-picker>
<ps-form-group>
<div class="{if $ps_version == '1.6'}input-group{/if} { opts['fixedWidth'] ? 'fixed-width-'+opts['fixedWidth'] : 'fixed-width-lg' }">
<input type="color" value="{ opts.color || '#000000' }" size="{ opts.size || 20 }" data-hex="true" class="color mColorPickerInput mColorPicker" name="{ opts.name }" id="{ opts.name }">
</div>
<style scoped>
img {
border: 0;
margin:0 0 0 3px;
}
span {
cursor: pointer;
}
</style>
</ps-form-group>
if (color_picker === false) {
{if $ps_version == '1.4'}
$.getScript('../js/jquery/jquery-colorpicker.js');
{else}
$.getScript('../js/jquery/plugins/jquery.colorpicker.js');
{/if}
color_picker = true;
}
this.tags['ps-form-group'].opts = opts
</ps-color-picker>
</script>
<script type="riot/tag">
<ps-password>
<ps-form-group>
{if $ps_version >= 1.6}
<div class="input-group { opts['fixedWidth'] ? 'fixed-width-'+opts['fixedWidth'] : 'fixed-width-lg' }">
<span class="input-group-addon">
<i class="icon-key"></i>
</span>
<input type="password" name="{ opts.name }" required="{ opts.requiredInput == 'true' }">
</div>
{else}
<input type="password" size="{ opts.size }" name="{ opts.name }" required="{ opts.requiredInput == 'true' }">
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-password>
</script>
<script type="riot/tag">
<ps-date-picker>
<ps-form-group>
{if $ps_version >= 1.6}
<div class="input-group { opts['fixedWidth'] ? 'fixed-width-'+opts['fixedWidth'] : 'fixed-width-lg' }">
<input id="{ opts.name }" type="text" data-hex="true" class="datepicker" name="{ opts.name }" value="{ opts.value }" required="{ opts.requiredInput == 'true' }" />
<span class="input-group-addon">
<i class="icon-calendar-empty"></i>
</span>
</div>
{else}
<input id="{ opts.name }" type="text" data-hex="true" size="{ opts.size }" class="datepicker" name="{ opts.name }" value="{ opts.value }" required="{ opts.requiredInput == 'true' }" />
{/if}
</ps-form-group>
this.tags['ps-form-group'].opts = opts
</ps-date-picker>
</script>
<script type="text/javascript">
$( document ).ready(function() {
if ($("ps-date-picker .datepicker").length > 0) {
$("ps-date-picker .datepicker").datepicker({
prevText: '',
nextText: '',
altFormat: 'yy-mm-dd'
});
}
});
</script>

View File

@@ -0,0 +1,191 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-panel-footer>
<div class="panel-footer">
<yield/>
</div>
<style scoped>
{if $ps_version >= 1.6}
.btn.pull-right {
margin-left: 5px;
}
.btn.pull-left {
margin-right: 5px;
}
a.btn i {
display: block;
width: 30px;
height: 30px;
margin: 0 auto;
font-size: 28px;
background: transparent;
background-size: 26px;
background-position: center
}
{else}
.panel-footer {
margin: 20px -13px 0px;
background: rgba(182, 182, 182, 0.1);
display: block;
border-top: 1px solid rgba(160, 160, 160, 0.19);
height: 80px;
position: relative;
bottom: -13px;
}
.btn {
margin: 0;
background: none;
border: none;
padding: 0 20px;
outline: none;
cursor: pointer;
font-size: 11px;
text-align: center;
height: 100%;
line-height: normal;
}
.btn.pull-right {
border-left: 1px solid rgba(160, 160, 160, 0.19);
float: right;
}
.btn.pull-left {
border-right: 1px solid rgba(160, 160, 160, 0.19);
float: left;
}
.btn:hover {
background: rgba(182, 182, 182, 0.1);
}
.btn img {
display: block;
padding: 0;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
}
{/if}
</style>
</ps-panel-footer>
</script>
<script type="riot/tag">
<ps-panel-footer-submit>
{if $ps_version >= 1.6}
<button type="submit" class="btn btn-default pull-{ opts.direction }" name="{ opts.name }">
<i class="{ opts.icon }"></i> { opts.title }
</button>
{else}
<button type="submit" class="btn pull-{ opts.direction }" name="{ opts.name }">
<img src="{ opts.img }" /> { opts.title }
</button>
{/if}
</ps-panel-footer-submit>
</script>
<script type="riot/tag">
<ps-panel-footer-link>
{if $ps_version >= 1.6}
<a class="btn btn-default pull-{ opts.direction }" href="{ opts.href }">
<i class="{ opts.icon }"></i> { opts.title }
</a>
{else}
<a class="btn pull-{ opts.direction }" href="{ opts.href }">
<img src="{ opts.img }" /> { opts.title }
</a>
<style scoped>
a img {
margin-top: 15px;
}
</style>
{/if}
</ps-panel-footer-link>
</script>
<script type="riot/tag">
<ps-panel>
{if $ps_version >= 1.6}
<div class="panel">
<div class="panel-heading" if={ opts.icon || opts.header }>
<i class="{ opts.icon }" if={ opts.icon }></i> { opts.header }
</div>
<yield/>
</div>
{else}
<fieldset>
<legend><img src="{ opts.img }">{ opts.header }</legend>
<yield/>
</fieldset>
<style scoped>
fieldset {
margin-bottom: 20px;
max-width: 1100px;
margin-left: auto;
margin-right: auto;
}
</style>
{/if}
</ps-panel>
</script>

View File

@@ -0,0 +1,220 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-table>
{if $ps_version >= 1.6}
<form method="post" method="post" class="form-horizontal clearfix">
<input type="hidden" name="token" value="">
<div class="panel col-lg-12">
<div class="panel-heading">
<i class="{ opts.icon }" if={ opts.icon }></i> { opts.header }
<span class="badge">{ this.rows.length }</span>
<span class="panel-heading-action" if={ this.top_actions }>
<a class="list-toolbar-btn" href="{ this.base_action_url }&action={ elem.action }" title="{ elem.title }" each={ elem, index in this.top_actions }>
<span data-toggle="tooltip" class="label-tooltip" data-original-title="{ elem.title }" data-html="true" data-placement="top">
<i class="process-icon-new"></i>
</span>
</a>
</span>
</div>
<div class="table-responsive-row clearfix">
<table class="table">
<thead>
<tr class="nodrag nodrop">
<th each={ elem, index in this.columns } class="{ this.columns_classes[this.columns.indexOf(elem)] }">
<span class="title_box">
{ elem.content }
</span>
</th>
<th class="fixed-width-md"></th>
</tr>
</thead>
<tbody>
<tr class="odd" each={ row, i in this.rows }>
<td each={ value, key in this.columns_keys } class="{ this.columns_classes[key] }">
{ row[value] }
</td>
<td if={ this.primary_action }>
<div class="btn-group-action">
<div class="btn-group pull-right">
<a href="{ this.base_action_url }&action={ this.primary_action.action }&{ this.identifier }={ row[this.identifier] }" title="{ this.primary_action.title }" class="edit btn btn-default">
<i class="icon-{ this.primary_action.icon }"></i> { this.primary_action.title }
</a>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="icon-caret-down"></i>&nbsp;
</button>
<ul class="dropdown-menu" if={ this.secondary_actions }>
<li each={ elem, index in this.secondary_actions }>
<a href="{ this.base_action_url }&action={ elem.action }&{ this.identifier }={ row[this.identifier] }" title="{ elem.title }">
<i class="icon-{ elem.icon }"></i> { elem.title }
</a>
</li>
</ul>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
{else}
<div class="toolbar-placeholder">
<div class="toolbarBox toolbarHead">
<ul class="cc_button" if={ this.top_actions }>
<li each={ elem, index in this.top_actions }>
<a class="toolbar_btn" href="{ this.base_action_url }&action={ elem.action }" title="{ elem.title }">
<img src="{ elem.img }"/>
<div>{ elem.title }</div>
</a>
</li>
</ul>
<div class="pageTitle">
<h3>{ opts.header }</h3>
</div>
</div>
</div>
<form method="post" class="form">
<table class="table_grid" name="list_table">
<tbody>
<tr>
<td>
<table class="table" cellpadding="0" cellspacing="0" style="width: 100%; margin-bottom:10px;">
<thead>
<tr class="nodrag nodrop" style="height: 40px">
<th each={ elem, index in this.columns } class="{ this.columns_classes[this.columns.indexOf(elem)] }">
<span class="title_box">
{ elem.content }
</span>
</th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="row_hover" each={ row, i in this.rows }>
<td each={ value, key in this.columns_keys } class="{ this.columns_classes[key] }">
{ row[value] }
</td>
<td class="right" style="white-space: nowrap;" if={ this.primary_action }>
<a href="{ this.base_action_url }&action={ this.primary_action.action }&{ this.identifier }={ row[this.identifier] }" title="{ this.primary_action.title }">
<img src="{ this.primary_action.img }" alt="{ this.primary_action.title }">
</a>
<a each={ elem, index in this.secondary_actions } href="{ this.base_action_url }&action={ elem.action }&{ this.identifier }={ row[this.identifier] }" title="{ elem.title }">
<img src="{ elem.img }" alt="{ elem.title }">
</a>
</td>
</tr>
<tr if={ this.rows.length == 0 }>
<td class="center" colspan="{ this.columns.length + 1 }">{ this.opts.noItemsText }</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</form>
{/if}
<style scoped>
{if $ps_version == '1.5'}
.help-context-AdminModules {
display: none !important;
}
> .toolbar-placeholder {
margin-top: 20px;
}
> .toolbar-placeholder .pageTitle h3 {
font-weight: normal;
}
> form {
margin-bottom: 15px;
}
{/if}
</style>
content = JSON.parse(this.root.getAttribute('content'))
this.columns = content.columns
this.rows = content.rows
this.columns_classes = []
this.columns_keys = []
for (var i in this.columns) {
this.columns_classes.push(this.columns[i].center == true ? 'center' : '')
this.columns_keys.push(this.columns[i].key)
}
this.base_action_url = currentIndex + '&token={Tools::getAdminTokenLite(Context::getContext()->controller->controller_name)|escape:'htmlall':'UTF-8'}&' + jQuery.param(content.url_params)
this.primary_action = content.rows_actions.slice(0, 1)[0]
this.secondary_actions = content.rows_actions.slice(1)
this.top_actions = content.top_actions
this.identifier = content.identifier
</ps-table>
</script>

View File

@@ -0,0 +1,152 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
<script type="riot/tag">
<ps-tab-content>
<div class="tab-content panel">
<yield/>
</div>
{if $ps_version >= 1.6}
<style scoped>
.tab-content {
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}
</style>
{else}
<style scoped>
.tab-content {
background-color: #ebedf4;
border: 1px solid #ccced7;
min-height: 350px;
padding: 20px;
margin-left: 140px;
margin-bottom: 20px;
}
.tab-content .tab-pane {
display: none;
}
.tab-content .tab-pane.active {
display: block;
}
</style>
{/if}
</ps-tab-content>
</script>
<script type="riot/tag">
<ps-tab-nav-item>
<a href="#{ opts.target }" data-toggle="tab" onclick={ changeTab } ><yield/></a>
{if $ps_version == 1.5}
<style>
ps-tab-nav a {
display: block;
font-weight: normal;
color: #666;
padding: 7px 10px;
border-top: 1px solid #CCCED7;
border-right: 1px solid #CCCED7;
}
</style>
changeTab(event) {
$(event.target).parents('ul.nav-tabs').find('li').removeClass('active')
$(event.target).parent().addClass('active')
$(event.target).parents('ps-tabs').find('.tab-content .tab-pane.active').removeClass('active')
$(event.target).parents('ps-tabs').find('.tab-content '+$(event.target).attr('href')).addClass('active')
return false
}
{/if}
</ps-tab-nav-item>
</script>
<script type="riot/tag">
<ps-tab-nav>
<ul class="nav nav-tabs">
<yield/>
</ul>
{if $ps_version == 1.5}
<style scoped>
.active a {
background-color: #ebedf4;
font-weight: bold;
color: #000;
border-right: none;
}
ul.nav-tabs {
margin: 0;
padding: 0;
list-style: none;
}
</style>
{/if}
</ps-tab-nav>
</script>
<script type="riot/tag">
<ps-tabs>
<yield/>
{if $ps_version == 1.5}
<style scoped>
ps-tab-nav {
background-color: #fafafa;
border: 1px solid #ccced7;
border-right: none;
border-top: none;
float: left;
width: 140px;
}
</style>
{/if}
</ps-tabs>
</script>

View File

@@ -0,0 +1,49 @@
{*
* The MIT License (MIT)
*
* Copyright (c) 2015 Emmanuel MARICHAL
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*}
{if !isset($tags) || !is_array($tags)}
{assign var='tags' value=array('tabs', 'panel', 'form', 'alert', 'table')}
{/if}
<script type="text/javascript">
var color_picker = false;
</script>
{assign var="ps_version" value=$smarty.const._PS_VERSION_|string_format:"%.1f"}
{foreach from=$tags item=tag}
{include file="./ps-$tag.tpl"}
{/foreach}
<script type="riot/tag">
<raw>
<span></span>
this.root.innerHTML = opts.content
</raw>
</script>
<script type="text/javascript">
riot.mount('*');
</script>

View File

@@ -0,0 +1,31 @@
{*
* cdorderlimit :: Gestion des commandes dans prestashop
*
* @author contact@cleanpresta.com (www.cleanpresta.com)
* @copyright 2015 cleandev.net
* @license You only can use module, nothing more!
*}
{if !empty($cdol_message)}
<div class="alert {if $alert}alert-danger{else}alert-info{/if}">
<p>
{l s='To be able to pass the order' mod='cdorderlimit'}, {$cdol_message|escape:'html':'UTF-8'}
</p>
</div>
{/if}
{if $less_than_17}
<script>
$(document).ready(function(){
{if !empty($cdol_message)}
{if $alert}
alert("{$cdol_message|escape:'html':'UTF-8'}");
{/if}
$('.cart_navigation .standard-checkout, .cart_block .cart-buttons a#button_order_cart, .step-num, #opc_account, #carrier_area, #opc_payment_methods').hide();
{else}
$('.cart_navigation .standard-checkout, .cart_block .cart-buttons a#button_order_cart, .step-num, #opc_account, #carrier_area, #opc_payment_methods').show();
{/if}
});
</script>
{/if}

View File

@@ -0,0 +1,18 @@
{*
* cdorderlimit :: Gestion des commandes dans prestashop
*
* @author contact@cleanpresta.com (www.cleanpresta.com)
* @copyright 2015 cleandev.net
* @license You only can use module, nothing more!
*}
{if $CDO_valeurs|escape:'html':'UTF-8'}
</div>
</div>
<div>
<div class="container" style="margin-top:15px">
<div class='alert alert-danger'>
<h4>{l s='To be able to pass the order' mod='cdorderlimit'}, {$CDO_messages|escape:'html':'UTF-8'}</h4>
</div>
{/if}

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../');
exit;

View File

@@ -0,0 +1,23 @@
<?php
/*
* 2013 - 2015 CleanDev
*
* NOTICE OF LICENSE
*
* This file is proprietary and can not be copied and/or distributed
* without the express permission of CleanDev
*
* @author CleanPresta : www.cleanpresta.com <contact@cleanpresta.com>
* @copyright 2013 - 2015 CleanDev.net
* @license You only can use module, nothing more!
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../');
exit;