// stock : update and bugs fix on supplier order add product interface and supplier order view interface + toolbar bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9991 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -40,49 +40,54 @@
|
||||
//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');
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save = $('#desc-{$table}-save div');
|
||||
|
||||
//override save link label with submit button value
|
||||
lbl_save.html(btn_submit.attr("value"));
|
||||
|
||||
if (btn_save_and_stay)
|
||||
if (btn_save.length > 0)
|
||||
{
|
||||
//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');
|
||||
|
||||
//get reference on current save link label
|
||||
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
|
||||
lbl_save = $('#desc-{$table}-save div');
|
||||
|
||||
//override save and stay link label with submit button value
|
||||
lbl_save_and_stay.html(btn_submit.attr("value") + ' and stay');
|
||||
}
|
||||
//override save link label with submit button value
|
||||
if (btn_submit.attr("value").length > 0)
|
||||
lbl_save.html(btn_submit.attr("value"));
|
||||
|
||||
//hide standard submit button
|
||||
btn_submit.hide();
|
||||
|
||||
//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)
|
||||
if (btn_save_and_stay.length > 0)
|
||||
{
|
||||
btn_save_and_stay.click(function() {
|
||||
//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.attr("value").length > 0)
|
||||
lbl_save_and_stay.html(btn_submit.attr("value") + ' and stay');
|
||||
}
|
||||
|
||||
//hide standard submit button
|
||||
btn_submit.hide();
|
||||
|
||||
//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")+'AndStay" value="1" />');
|
||||
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
|
||||
|
||||
$('#{$table}_form').submit();
|
||||
});
|
||||
}
|
||||
{/block}
|
||||
|
||||
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>
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user