// Add footer toolbar to products panel

This commit is contained in:
Jerome Nadaud
2013-12-02 16:08:44 +01:00
parent aea8f0285e
commit 970449148c
2 changed files with 7 additions and 3 deletions
@@ -124,10 +124,8 @@
{* submenu binding *}
$(".productTabs a").click(function(e){
e.preventDefault();
// currentId is the current product tab id
currentId = $(".productTabs a.active").attr('id').substr(5);
//console.log(currentId);
// id is the wanted producttab id
id = $(this).attr('id').substr(5);
@@ -192,6 +190,12 @@
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
});
$('#toolbar-footer').appendTo($('#product-tab-content-Informations').children('.product-tab'));
$('.product-tab-content').on('displayed', function(e) {
$('#toolbar-footer').appendTo($(this).children('.product-tab'));
});
});
var tabs_preloaded = new Array();
@@ -24,7 +24,7 @@
*}
{if $show_toolbar}
<div class="panel-footer">
<div class="panel-footer" id="toolbar-footer">
{foreach from=$toolbar_btn item=btn key=k}
{if $k != 'modules-list'}
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="btn btn-default{if $k=='save' || $k=='save-and-stay'} pull-right{/if}" {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}>