// stock : bugs fix and update of supplier order add product interface

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9967 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere committed 2011-11-08 15:45:45 +00:00
1 parent 621dce0532
commit 1ec33f92e2
7 files changed
+78 -28

No files matched your search

+24 -2
View File
@@ -40,6 +40,9 @@
//get reference on save link
btn_save = $('span[class~="process-icon-save"]').parent();
//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');
@@ -49,8 +52,14 @@
//override save link label with submit button value
lbl_save.html(btn_submit.attr("value"));
//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" />');
if (btn_save_and_stay)
{
//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
lbl_save_and_stay.html(btn_submit.attr("value") + ' and stay');
}
//hide standard submit button
btn_submit.hide();
@@ -58,8 +67,21 @@
//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();
});
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}
});
</script>