// Fix admin toolbar: don't go anymore on top page when clicking on toolbar submit actions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10501 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -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('<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")+'" value="1" />');
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" 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();
|
||||
});
|
||||
}
|
||||
}
|
||||
{/block}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user