From 8dacae2f4b74caf471458bf56f9fdd00daaa6a0d Mon Sep 17 00:00:00 2001 From: rMalie Date: Wed, 23 Nov 2011 09:42:53 +0000 Subject: [PATCH] // Fix admin toolbar: don't go anymore on top page when clicking on toolbar submit actions --- admin-dev/themes/template/toolbar.tpl | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/admin-dev/themes/template/toolbar.tpl b/admin-dev/themes/template/toolbar.tpl index 3d480b476..796a9ef77 100644 --- a/admin-dev/themes/template/toolbar.tpl +++ b/admin-dev/themes/template/toolbar.tpl @@ -78,22 +78,24 @@ //submit the form {block name=formSubmit} - btn_save.click(function() { + 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(''); + 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(); - }); - } + } {/block} } });