Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
commit
10473e09ad
9 files changed
+167
-52
No files matched your search
@@ -25,27 +25,46 @@
|
|||||||
|
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
{if $module_confirmation}
|
{if $module_confirmation}
|
||||||
<div class="module_confirmation conf confirm">
|
<div class="module_confirmation conf confirm">
|
||||||
{l s='Your .CSV file has been sucessfully imported into your shop.'}
|
{l s='Your .CSV file has been sucessfully imported into your shop.'}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div style="display: none">
|
<div style="display: none">
|
||||||
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
<div id="upload_file_import">
|
||||||
<div class="clear"> </div>
|
<div class="alert alert-info">{l s='Only UTF-8 and ISO-8859-1 encoding are allowed'}</div>
|
||||||
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
|
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||||
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file'} </label>
|
<div class="panel">
|
||||||
<div class="margin-form" style="padding-left:190px;">
|
<div class="form-group">
|
||||||
<input name="file" type="file" />
|
<label class="control-label col-lg-3">{l s='Select your CSV file'}</label>
|
||||||
<p class="preference_description">
|
<div class="col-lg-9">
|
||||||
{l s='You can also upload your file via FTP to the following directory:'} {$path_import}.
|
<div class="row">
|
||||||
</p>
|
<div class="col-lg-7">
|
||||||
</div>
|
<input id="file" type="file" name="file" class="hide" />
|
||||||
|
<div class="dummyfile input-group">
|
||||||
<div class="margin-form" style="padding-left:190px;">
|
<span class="input-group-addon"><i class="icon-file"></i></span>
|
||||||
<input type="submit" name="submitFileUpload" value="{l s='Upload'}" class="button" />
|
<input id="file-name" type="text" class="disabled" name="filename" readonly />
|
||||||
<p class="preference_description">
|
<span class="input-group-btn">
|
||||||
{l s='Only UTF-8 and ISO-8859-1 encoding are allowed'}
|
<button id="file-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
|
||||||
</p>
|
<i class="icon-folder-open"></i> {l s='Choose a file'}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-7">
|
||||||
|
<p class="help-block">
|
||||||
|
{l s='You can also upload your file via FTP to the following directory:'} {$path_import}.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-lg-9 col-lg-offset-3">
|
||||||
|
<input type="submit" name="submitFileUpload" value="{l s='Upload'}" class="btn btn-default" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -328,5 +347,17 @@
|
|||||||
showTitle: false
|
showTitle: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$('#file-selectbutton').click(function(e){
|
||||||
|
$('#file').trigger('click');
|
||||||
|
});
|
||||||
|
$('#file-name').click(function(e){
|
||||||
|
$('#file').trigger('click');
|
||||||
|
});
|
||||||
|
$('#file').change(function(e){
|
||||||
|
var val = $(this).val();
|
||||||
|
var file = val.split(/[\\/]/);
|
||||||
|
$('#file-name').val(file[file.length-1]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -37,8 +37,21 @@
|
|||||||
{l s='Module file'}
|
{l s='Module file'}
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-12">
|
||||||
<input type="file" name="file" class="form-control" />
|
<div class="row">
|
||||||
|
<div class="col-lg-7">
|
||||||
|
<input id="file" type="file" name="file" class="hide" />
|
||||||
|
<div class="dummyfile input-group">
|
||||||
|
<span class="input-group-addon"><i class="icon-file"></i></span>
|
||||||
|
<input id="file-name" type="text" class="disabled" name="filename" readonly />
|
||||||
|
<span class="input-group-btn">
|
||||||
|
<button id="file-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
|
||||||
|
<i class="icon-folder-open"></i> {l s='Choose a file'}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -98,3 +111,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#file-selectbutton').click(function(e){
|
||||||
|
$('#file').trigger('click');
|
||||||
|
});
|
||||||
|
$('#file-name').click(function(e){
|
||||||
|
$('#file').trigger('click');
|
||||||
|
});
|
||||||
|
$('#file').change(function(e){
|
||||||
|
var val = $(this).val();
|
||||||
|
var file = val.split(/[\\/]/);
|
||||||
|
$('#file-name').val(file[file.length-1]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div id="anchor{$module->name|ucfirst}">
|
<div id="anchor{$module->name|ucfirst}">
|
||||||
<span>
|
<span>
|
||||||
<span style="display:none">{$module->name}</span>
|
<span class="hidden">{$module->name}</span>
|
||||||
{$module->displayName|truncate:40:'…'} {$module->version}
|
{$module->displayName|truncate:40:'…'} {$module->version}
|
||||||
{if isset($module->id) && $module->id gt 0 }
|
{if isset($module->id) && $module->id gt 0 }
|
||||||
{if $module->active}
|
{if $module->active}
|
||||||
|
|||||||
@@ -24,27 +24,41 @@
|
|||||||
*}
|
*}
|
||||||
|
|
||||||
{if count($groups) && isset($groups)}
|
{if count($groups) && isset($groups)}
|
||||||
<table class="table">
|
<div class="row">
|
||||||
<thead>
|
<div class="col-lg-6">
|
||||||
<th class="fixed-width-xs">
|
<table class="table table-bordered">
|
||||||
<span class="title_box"><input type="checkbox" name="checkme" id="checkme" class="noborder" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" /></span>
|
<thead>
|
||||||
</th>
|
<th class="fixed-width-xs">
|
||||||
<th class="fixed-width-xs"><span class="title_box">{l s='ID'}</span></th>
|
<span class="title_box">
|
||||||
<th><span class="title_box">{l s='Group name'}</span></th>
|
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" />
|
||||||
</thead>
|
</span>
|
||||||
<tbody>
|
</th>
|
||||||
{foreach $groups as $key => $group}
|
<th class="fixed-width-xs"><span class="title_box">{l s='ID'}</span></th>
|
||||||
<tr>
|
<th>
|
||||||
<td>
|
<span class="title_box">
|
||||||
{assign var=id_checkbox value=groupBox|cat:'_'|cat:$group['id_group']}
|
{l s='Group name'}
|
||||||
<input type="checkbox" name="groupBox[]" class="groupBox" id="{$id_checkbox}" value="{$group['id_group']}" {if $fields_value[$id_checkbox]}checked="checked"{/if} />
|
</span>
|
||||||
</td>
|
</th>
|
||||||
<td>{$group['id_group']}</td>
|
</thead>
|
||||||
<td><label for="{$id_checkbox}" class="t">{$group['name']}</label></td>
|
<tbody>
|
||||||
</tr>
|
{foreach $groups as $key => $group}
|
||||||
{/foreach}
|
<tr>
|
||||||
</tbody>
|
<td>
|
||||||
</table>
|
{assign var=id_checkbox value=groupBox|cat:'_'|cat:$group['id_group']}
|
||||||
|
<input type="checkbox" name="groupBox[]" class="groupBox" id="{$id_checkbox}" value="{$group['id_group']}" {if $fields_value[$id_checkbox]}checked="checked"{/if} />
|
||||||
|
</td>
|
||||||
|
<td>{$group['id_group']}</td>
|
||||||
|
<td>
|
||||||
|
<label for="{$id_checkbox}">{$group['name']}</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{else}
|
{else}
|
||||||
<p>{l s='No group created'}</p>
|
<p>
|
||||||
|
{l s='No group created'}
|
||||||
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -131,6 +131,18 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{foreach from=$toolbar_btn item=btn key=k}
|
||||||
|
{if $k == 'back'}
|
||||||
|
{assign 'back_button' $btn}
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
{if isset($back_button)}
|
||||||
|
<div class="panel-footer">
|
||||||
|
<a id="desc-{$table}-{if isset($back_button.imgclass)}{$back_button.imgclass}{else}{$k}{/if}" class="btn btn-default" {if isset($back_button.href)}href="{$back_button.href}"{/if} {if isset($back_button.target) && $back_button.target}target="_blank"{/if}{if isset($back_button.js) && $back_button.js}onclick="{$back_button.js}"{/if}>
|
||||||
|
<i class="process-icon-{if isset($back_button.imgclass)}{$back_button.imgclass}{else}{$k}{/if} {if isset($back_button.class)}{$back_button.class}{/if}" ></i> <span {if isset($back_button.force_desc) && $back_button.force_desc == true } class="locked" {/if}>{$back_button.desc}</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{if !$simple_header}
|
{if !$simple_header}
|
||||||
<input type="hidden" name="token" value="{$token}" />
|
<input type="hidden" name="token" value="{$token}" />
|
||||||
@@ -140,6 +152,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
{hook h='displayAdminListAfter'}
|
{hook h='displayAdminListAfter'}
|
||||||
{if isset($name_controller)}
|
{if isset($name_controller)}
|
||||||
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture}
|
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture}
|
||||||
|
|||||||
@@ -72,6 +72,8 @@
|
|||||||
{hook h=$hookName}
|
{hook h=$hookName}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div class="alert alert-warning" id="{$list_id}-empty-filters-alert" style="display:none;">{l s='Please fill at least one field to perform a search in this list.'}</div>
|
||||||
|
|
||||||
{if !$simple_header}
|
{if !$simple_header}
|
||||||
<form method="post" action="{$action}" class="form-horizontal">
|
<form method="post" action="{$action}" class="form-horizontal">
|
||||||
{block name="override_form_extra"}{/block}
|
{block name="override_form_extra"}{/block}
|
||||||
@@ -81,7 +83,7 @@
|
|||||||
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
||||||
<span class="panel-heading-action">
|
<span class="panel-heading-action">
|
||||||
{foreach from=$toolbar_btn item=btn key=k}
|
{foreach from=$toolbar_btn item=btn key=k}
|
||||||
{if $k != 'modules-list'}
|
{if $k != 'modules-list' && $k != 'back'}
|
||||||
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="list-toolbar-btn" {if isset($btn.href)}href="{$btn.href}"{/if} {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="list-toolbar-btn" {if isset($btn.href)}href="{$btn.href}"{/if} {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
||||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
||||||
@@ -301,7 +303,7 @@
|
|||||||
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
|
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
|
||||||
<span class="pull-right">
|
<span class="pull-right">
|
||||||
{*Search must be before reset for default form submit*}
|
{*Search must be before reset for default form submit*}
|
||||||
<button type="submit" id="submitFilterButton{$list_id}" name="submitFilter" class="btn btn-default" />
|
<button type="submit" id="submitFilterButton{$list_id}" name="submitFilter" class="btn btn-default" data-list-id="{$list_id}">
|
||||||
<i class="icon-search"></i> {l s='Search'}
|
<i class="icon-search"></i> {l s='Search'}
|
||||||
</button>
|
</button>
|
||||||
{if $filters_has_value}
|
{if $filters_has_value}
|
||||||
|
|||||||
@@ -407,7 +407,7 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
public function addFiltersToBreadcrumbs()
|
public function addFiltersToBreadcrumbs()
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('submitFilter'))
|
if (Tools::isSubmit('submitFilter') && is_array($this->fields_list))
|
||||||
{
|
{
|
||||||
$filters = array();
|
$filters = array();
|
||||||
foreach ($this->fields_list as $field => $t)
|
foreach ($this->fields_list as $field => $t)
|
||||||
|
|||||||
@@ -605,16 +605,16 @@ class HelperListCore extends Helper
|
|||||||
'list_total' => $this->listTotal,
|
'list_total' => $this->listTotal,
|
||||||
'token' => $this->token,
|
'token' => $this->token,
|
||||||
'table' => $this->table,
|
'table' => $this->table,
|
||||||
'bulk_actions' => (count($this->_list) <= 1 && !$has_value) ? array() : $this->bulk_actions
|
'bulk_actions' => (count($this->_list) <= 1 && !$has_value) ? array() : $this->bulk_actions,
|
||||||
|
'show_toolbar' => $this->show_toolbar,
|
||||||
|
'toolbar_scroll' => $this->toolbar_scroll,
|
||||||
|
'toolbar_btn' => $this->toolbar_btn,
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->header_tpl->assign(array_merge($this->tpl_vars, array(
|
$this->header_tpl->assign(array_merge($this->tpl_vars, array(
|
||||||
'title' => array_key_exists('title', $this->tpl_vars) ? $this->tpl_vars['title'] : $this->title,
|
'title' => array_key_exists('title', $this->tpl_vars) ? $this->tpl_vars['title'] : $this->title,
|
||||||
'show_filters' => (count($this->_list) <= 1 && !$has_value) ? false : true,
|
'show_filters' => (count($this->_list) <= 1 && !$has_value) ? false : true,
|
||||||
'filters_has_value' => $has_value,
|
'filters_has_value' => $has_value,
|
||||||
'show_toolbar' => $this->show_toolbar,
|
|
||||||
'toolbar_scroll' => $this->toolbar_scroll,
|
|
||||||
'toolbar_btn' => $this->toolbar_btn,
|
|
||||||
'currentIndex' => $this->currentIndex,
|
'currentIndex' => $this->currentIndex,
|
||||||
'action' => $action,
|
'action' => $action,
|
||||||
'is_order_position' => $this->position_identifier && $this->orderBy == 'position',
|
'is_order_position' => $this->position_identifier && $this->orderBy == 'position',
|
||||||
|
|||||||
+27
-1
@@ -872,6 +872,33 @@ $(document).ready(function()
|
|||||||
|
|
||||||
bindTabModuleListAction();
|
bindTabModuleListAction();
|
||||||
|
|
||||||
|
//Check filters value on submit filter
|
||||||
|
$("[name='submitFilter']").click(function(event) {
|
||||||
|
var list_id = $(this).data('list-id');
|
||||||
|
var empty_filters = true;
|
||||||
|
|
||||||
|
$(document.body).find("input[name*='"+list_id+"Filter']").each(function() {
|
||||||
|
if ($(this).val() != '')
|
||||||
|
{
|
||||||
|
empty_filters = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document.body).find("select[name*='"+list_id+"Filter']").each(function() {
|
||||||
|
if ($(this).val() != '')
|
||||||
|
{
|
||||||
|
empty_filters = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (empty_filters)
|
||||||
|
{
|
||||||
|
event.preventDefault();
|
||||||
|
$('#'+list_id+'-empty-filters-alert').show();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1078,4 +1105,3 @@ function sendBulkAction(form, action)
|
|||||||
|
|
||||||
$(form).submit();
|
$(form).submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user