[*] BO : #PI-123 - toolbar and page title refactoring
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14594 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -168,18 +168,10 @@
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="toolbarBox">
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}</h3>
|
||||
</div>
|
||||
{/if}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="productTabs">
|
||||
<ul class="tab">
|
||||
|
||||
@@ -24,16 +24,10 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbarBox">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{$title|default:' '}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
{if !$has_shop_selected}
|
||||
<div class="hint" style="display:block">{l s='Please select the shop you want to configure'}</div>
|
||||
|
||||
+4
-10
@@ -24,16 +24,10 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbarBox">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{$title|default:' '}
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
<div id="account_list">
|
||||
{foreach from=$account_number_list item=detail key=name}
|
||||
|
||||
@@ -58,14 +58,10 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="toolbarBox">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
|
||||
{if $generate}
|
||||
<div class="module_confirmation conf confirm">
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<div>
|
||||
<div class="productTabs">
|
||||
|
||||
@@ -24,19 +24,8 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox{if $toolbar_scroll} toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
{if $module_confirmation}
|
||||
<div class="module_confirmation conf confirm">
|
||||
|
||||
@@ -24,16 +24,9 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<div class="toolbarBox">
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}</h3>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<form action="{$url_submit}" id={$table}_form method="post">
|
||||
{if $display_key}
|
||||
<input type="hidden" name="show_modules" value="{$display_key}" />
|
||||
|
||||
@@ -30,19 +30,8 @@
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/admin-dnd.js"></script>
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<div class="filter-module">
|
||||
<form>
|
||||
|
||||
@@ -840,23 +840,11 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl"}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<fieldset id="customer_part"><legend><img src="../img/admin/tab-customers.gif" />{l s='Customer'}</legend>
|
||||
<p><label>{l s='Search customers:'}</label><input type="text" id="customer" value="" />
|
||||
<a class="fancybox button" href="{$link->getAdminLink('AdminCustomers')}&addcustomer&liteDisplaying=1&submitFormAjax=1#"><img src="../img/admin/add.gif" title="new"/><span>{l s='Add new customer'}</span></a></p>
|
||||
|
||||
@@ -31,18 +31,8 @@ $(function() {
|
||||
</script>
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
{if isset($features)}
|
||||
|
||||
@@ -25,18 +25,7 @@
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl"}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -59,17 +59,7 @@
|
||||
{/if}{* End if simple_header *}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{/if}
|
||||
|
||||
{if !$simple_header}
|
||||
|
||||
@@ -25,20 +25,7 @@
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{$title|default:' '}
|
||||
</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -25,18 +25,7 @@
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn}
|
||||
<div class="pageTitle">
|
||||
<h3>
|
||||
{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">{$title|default:' '}</span>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{/if}
|
||||
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
@@ -23,77 +23,101 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{block name=toolbarBox}
|
||||
<ul class="cc_button">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
<li>
|
||||
<a id="desc-{$table}-{$btn.imgclass|default:$k}" class="toolbar_btn" {if isset($btn.href)}href="{$btn.href}"{/if} title="{$btn.desc}" {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<span class="process-icon-{$btn.imgclass|default:$k} {$btn.class|default:'' }" ></span>
|
||||
<div {if isset($btn.force_desc) && $btn.force_desc == true } class="locked" {/if}>{$btn.desc}</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<script language="javascript">
|
||||
$(function() {
|
||||
//get reference on save link
|
||||
btn_save = $('span[class~="process-icon-save"]').parent();
|
||||
<div class="toolbar-placeholder">
|
||||
<div class="toolbarBox {if $toolbar_scroll}toolbarHead{/if}">
|
||||
{block name=toolbarBox}
|
||||
<ul class="cc_button">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
<li>
|
||||
<a id="desc-{$table}-{$btn.imgclass|default:$k}" class="toolbar_btn" {if isset($btn.href)}href="{$btn.href}"{/if} title="{$btn.desc}" {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<span class="process-icon-{$btn.imgclass|default:$k} {$btn.class|default:'' }" ></span>
|
||||
<div {if isset($btn.force_desc) && $btn.force_desc == true } class="locked" {/if}>{$btn.desc}</div>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
//get reference on form submit button
|
||||
btn_submit = $('#{$table}_form_submit_btn');
|
||||
<script language="javascript">
|
||||
$(function() {
|
||||
//get reference on save link
|
||||
btn_save = $('span[class~="process-icon-save"]').parent();
|
||||
|
||||
if (btn_save.length > 0 && btn_submit.length > 0)
|
||||
{
|
||||
//get reference on save and stay link
|
||||
btn_save_and_stay = $('span[class~="process-icon-save-and-stay"]').parent();
|
||||
//get reference on form submit button
|
||||
btn_submit = $('#{$table}_form_submit_btn');
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save = $('#desc-{$table}-save div');
|
||||
|
||||
//override save link label with submit button value
|
||||
if (btn_submit.val().length > 0)
|
||||
lbl_save.html(btn_submit.attr("value"));
|
||||
|
||||
if (btn_save_and_stay.length > 0)
|
||||
{
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
|
||||
|
||||
//override save and stay link label with submit button value
|
||||
if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked'))
|
||||
if (btn_save.length > 0 && btn_submit.length > 0)
|
||||
{
|
||||
lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//hide standard submit button
|
||||
btn_submit.hide();
|
||||
|
||||
//submit the form
|
||||
{block name=formSubmit}
|
||||
btn_save.click(function() {
|
||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||
|
||||
$('#{$table}_form').submit();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (btn_save_and_stay)
|
||||
{
|
||||
btn_save_and_stay.click(function() {
|
||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
|
||||
|
||||
$('#{$table}_form').submit();
|
||||
return false;
|
||||
});
|
||||
//get reference on save and stay link
|
||||
btn_save_and_stay = $('span[class~="process-icon-save-and-stay"]').parent();
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save = $('#desc-{$table}-save div');
|
||||
|
||||
//override save link label with submit button value
|
||||
if (btn_submit.val().length > 0)
|
||||
lbl_save.html(btn_submit.attr("value"));
|
||||
|
||||
if (btn_save_and_stay.length > 0)
|
||||
{
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
|
||||
|
||||
//override save and stay link label with submit button value
|
||||
if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked'))
|
||||
{
|
||||
lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//hide standard submit button
|
||||
btn_submit.hide();
|
||||
|
||||
//submit the form
|
||||
{block name=formSubmit}
|
||||
btn_save.click(function() {
|
||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||
|
||||
$('#{$table}_form').submit();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (btn_save_and_stay)
|
||||
{
|
||||
btn_save_and_stay.click(function() {
|
||||
//add hidden input to emulate submit button click when posting the form -> field name posted
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
|
||||
|
||||
$('#{$table}_form').submit();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
{/block}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
<div class="pageTitle">
|
||||
<h3>{block name=pageTitle}
|
||||
<span id="current_obj" style="font-weight: normal;">
|
||||
{if $title}
|
||||
{foreach $title as $key => $item name=title}
|
||||
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
||||
<span class="breadcrumb item-{$key} ">{$item|strip_tags}
|
||||
{if !$smarty.foreach.title.last}
|
||||
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrum.png">
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</span>
|
||||
{/block}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user