// Fix missing saving button in products
This commit is contained in:
1 parent
d9e53486a0
commit
a81ee41374
2 files changed
+8
-6
No files matched your search
@@ -146,9 +146,6 @@
|
|||||||
// if the tab has not already been loaded, load it now
|
// if the tab has not already been loaded, load it now
|
||||||
tabs_manager.display(id, true);
|
tabs_manager.display(id, true);
|
||||||
|
|
||||||
if (btn_name == 'Associations')
|
|
||||||
handleSaveButtons();
|
|
||||||
|
|
||||||
tabs_manager.onLoad(id, function(){
|
tabs_manager.onLoad(id, function(){
|
||||||
$("#product-tab-content-"+id).show(0, function(){
|
$("#product-tab-content-"+id).show(0, function(){
|
||||||
$(this).trigger('displayed');
|
$(this).trigger('displayed');
|
||||||
@@ -172,7 +169,7 @@
|
|||||||
{
|
{
|
||||||
$('#desc-product-newCombination').hide();
|
$('#desc-product-newCombination').hide();
|
||||||
// if pack is enabled, save button are visible only if pack is valid
|
// if pack is enabled, save button are visible only if pack is valid
|
||||||
if (btn_name != 'Informations')
|
if ($("input[name='id_product']").val() != 0 || btn_name != 'Informations')
|
||||||
handleSaveButtons();
|
handleSaveButtons();
|
||||||
}
|
}
|
||||||
hideOtherLanguage(default_language);
|
hideOtherLanguage(default_language);
|
||||||
@@ -185,6 +182,11 @@
|
|||||||
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
|
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
|
||||||
disableSave();
|
disableSave();
|
||||||
|
|
||||||
|
tabs_manager.onLoad('Associations', function(){
|
||||||
|
if ($("input[name='id_product']").val() != 0)
|
||||||
|
handleSaveButtons();
|
||||||
|
});
|
||||||
|
|
||||||
$('.confirm_leave').live('click', function(){
|
$('.confirm_leave').live('click', function(){
|
||||||
// Double quotes are necessary when the translated string has single quotes
|
// Double quotes are necessary when the translated string has single quotes
|
||||||
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
|
return confirm("{l s='You will lose all unsaved modifications. Are you sure that you\'d like to proceed?' js=1}");
|
||||||
|
|||||||
@@ -411,10 +411,10 @@ function handleSaveButtons(e)
|
|||||||
|
|
||||||
// common for all products
|
// common for all products
|
||||||
$("#disableSaveMessage").remove();
|
$("#disableSaveMessage").remove();
|
||||||
|
|
||||||
if ($("#name_" + id_lang_default).val() == "" && (!display_multishop_checkboxes || $('input[name=\'multishop_check[name][' + id_lang_default + ']\']').prop('checked')))
|
if ($("#name_" + id_lang_default).val() == "" && (!display_multishop_checkboxes || $('input[name=\'multishop_check[name][' + id_lang_default + ']\']').prop('checked')))
|
||||||
{
|
|
||||||
msg[i++] = empty_name_msg;
|
msg[i++] = empty_name_msg;
|
||||||
}
|
|
||||||
// check friendly_url_[defaultlangid] only if name is ok
|
// check friendly_url_[defaultlangid] only if name is ok
|
||||||
else if ($("#link_rewrite_" + id_lang_default).val() == "" && (!display_multishop_checkboxes || $('input[name=\'link_rewrite[name][' + id_lang_default + ']\']').prop('checked')))
|
else if ($("#link_rewrite_" + id_lang_default).val() == "" && (!display_multishop_checkboxes || $('input[name=\'link_rewrite[name][' + id_lang_default + ']\']').prop('checked')))
|
||||||
msg[i++] = empty_link_rewrite_msg;
|
msg[i++] = empty_link_rewrite_msg;
|
||||||
|
|||||||
Reference in new issue
Block a user