From a809b0f77eae1c248340d2c4b7a9dc23408c8b41 Mon Sep 17 00:00:00 2001 From: dSevere Date: Thu, 23 Feb 2012 10:48:33 +0000 Subject: [PATCH] // Toolbar save and stay button javascript override bug fix --- admin-dev/themes/default/template/toolbar.tpl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/default/template/toolbar.tpl b/admin-dev/themes/default/template/toolbar.tpl index f30df12fa..84f68e1fb 100644 --- a/admin-dev/themes/default/template/toolbar.tpl +++ b/admin-dev/themes/default/template/toolbar.tpl @@ -29,7 +29,7 @@
  • -
    {$btn.desc}
    +
    {$btn.desc}
  • {/foreach} @@ -57,12 +57,16 @@ 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) + 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 @@ -73,17 +77,17 @@ btn_save.click(function() { //add hidden input to emulate submit button click when posting the form -> field name posted btn_submit.before(''); - + $('#{$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(''); - + $('#{$table}_form').submit(); return false; });