Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
@@ -25,27 +25,46 @@
|
||||
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{if $module_confirmation}
|
||||
<div class="module_confirmation conf confirm">
|
||||
{l s='Your .CSV file has been sucessfully imported into your shop.'}
|
||||
</div>
|
||||
<div class="module_confirmation conf confirm">
|
||||
{l s='Your .CSV file has been sucessfully imported into your shop.'}
|
||||
</div>
|
||||
{/if}
|
||||
<div style="display: none">
|
||||
<div id="upload_file_import" style="padding-left: 10px; background-color: #EBEDF4; border: 1px solid #CCCED7">
|
||||
<div class="clear"> </div>
|
||||
<form action="{$current}&token={$token}" method="post" enctype="multipart/form-data">
|
||||
<label class="clear" style="width:160px; text-align: left;">{l s='Select your CSV file'} </label>
|
||||
<div class="margin-form" style="padding-left:190px;">
|
||||
<input name="file" type="file" />
|
||||
<p class="preference_description">
|
||||
{l s='You can also upload your file via FTP to the following directory:'} {$path_import}.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="margin-form" style="padding-left:190px;">
|
||||
<input type="submit" name="submitFileUpload" value="{l s='Upload'}" class="button" />
|
||||
<p class="preference_description">
|
||||
{l s='Only UTF-8 and ISO-8859-1 encoding are allowed'}
|
||||
</p>
|
||||
<div id="upload_file_import">
|
||||
<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" class="form-horizontal">
|
||||
<div class="panel">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Select your CSV file'}</label>
|
||||
<div class="col-lg-9">
|
||||
<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 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>
|
||||
</form>
|
||||
</div>
|
||||
@@ -328,5 +347,17 @@
|
||||
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>
|
||||
|
||||
@@ -37,8 +37,21 @@
|
||||
{l s='Module file'}
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="file" name="file" class="form-control" />
|
||||
<div class="col-lg-12">
|
||||
<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 class="form-group">
|
||||
@@ -97,4 +110,20 @@
|
||||
</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>
|
||||
<div id="anchor{$module->name|ucfirst}">
|
||||
<span>
|
||||
<span style="display:none">{$module->name}</span>
|
||||
<span class="hidden">{$module->name}</span>
|
||||
{$module->displayName|truncate:40:'…'} {$module->version}
|
||||
{if isset($module->id) && $module->id gt 0 }
|
||||
{if $module->active}
|
||||
|
||||
@@ -24,27 +24,41 @@
|
||||
*}
|
||||
|
||||
{if count($groups) && isset($groups)}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th class="fixed-width-xs">
|
||||
<span class="title_box"><input type="checkbox" name="checkme" id="checkme" class="noborder" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" /></span>
|
||||
</th>
|
||||
<th class="fixed-width-xs"><span class="title_box">{l s='ID'}</span></th>
|
||||
<th><span class="title_box">{l s='Group name'}</span></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $groups as $key => $group}
|
||||
<tr>
|
||||
<td>
|
||||
{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}" class="t">{$group['name']}</label></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th class="fixed-width-xs">
|
||||
<span class="title_box">
|
||||
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" />
|
||||
</span>
|
||||
</th>
|
||||
<th class="fixed-width-xs"><span class="title_box">{l s='ID'}</span></th>
|
||||
<th>
|
||||
<span class="title_box">
|
||||
{l s='Group name'}
|
||||
</span>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $groups as $key => $group}
|
||||
<tr>
|
||||
<td>
|
||||
{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}
|
||||
<p>{l s='No group created'}</p>
|
||||
<p>
|
||||
{l s='No group created'}
|
||||
</p>
|
||||
{/if}
|
||||
@@ -131,6 +131,18 @@
|
||||
{/if}
|
||||
</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}
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
@@ -140,6 +152,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
{hook h='displayAdminListAfter'}
|
||||
{if isset($name_controller)}
|
||||
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture}
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
{hook h=$hookName}
|
||||
{/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}
|
||||
<form method="post" action="{$action}" class="form-horizontal">
|
||||
{block name="override_form_extra"}{/block}
|
||||
@@ -81,7 +83,7 @@
|
||||
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
||||
<span class="panel-heading-action">
|
||||
{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}>
|
||||
<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>
|
||||
@@ -301,7 +303,7 @@
|
||||
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
|
||||
<span class="pull-right">
|
||||
{*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'}
|
||||
</button>
|
||||
{if $filters_has_value}
|
||||
|
||||
@@ -407,7 +407,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
public function addFiltersToBreadcrumbs()
|
||||
{
|
||||
if (Tools::isSubmit('submitFilter'))
|
||||
if (Tools::isSubmit('submitFilter') && is_array($this->fields_list))
|
||||
{
|
||||
$filters = array();
|
||||
foreach ($this->fields_list as $field => $t)
|
||||
|
||||
@@ -605,16 +605,16 @@ class HelperListCore extends Helper
|
||||
'list_total' => $this->listTotal,
|
||||
'token' => $this->token,
|
||||
'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(
|
||||
'title' => array_key_exists('title', $this->tpl_vars) ? $this->tpl_vars['title'] : $this->title,
|
||||
'show_filters' => (count($this->_list) <= 1 && !$has_value) ? false : true,
|
||||
'filters_has_value' => $has_value,
|
||||
'show_toolbar' => $this->show_toolbar,
|
||||
'toolbar_scroll' => $this->toolbar_scroll,
|
||||
'toolbar_btn' => $this->toolbar_btn,
|
||||
'currentIndex' => $this->currentIndex,
|
||||
'action' => $action,
|
||||
'is_order_position' => $this->position_identifier && $this->orderBy == 'position',
|
||||
|
||||
+29
-3
@@ -871,7 +871,34 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1077,5 +1104,4 @@ function sendBulkAction(form, action)
|
||||
$(form).attr('action', form_action.splice(form_action.lastIndexOf('&'), 0, '&' + action));
|
||||
|
||||
$(form).submit();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user