From 0e35f9e10e5c054e39d2b5e99c2ca50f04068e82 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 4 Jan 2012 10:55:55 +0000 Subject: [PATCH] // fix save button hiding during loading of product pages --- admin-dev/themes/default/template/products/form.tpl | 9 +++++++++ js/admin-products.js | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin-dev/themes/default/template/products/form.tpl b/admin-dev/themes/default/template/products/form.tpl index df00ac87f..31c9e5a5e 100644 --- a/admin-dev/themes/default/template/products/form.tpl +++ b/admin-dev/themes/default/template/products/form.tpl @@ -217,6 +217,15 @@ $("div.productTabs a[id$=-{$show_product_tab_content}]").click(); {/if} + // disable save if Associations tab is not loaded + if ($('#product-tab-content-Associations').hasClass('not-loaded')) + disableSave(); + + $('#product-tab-content-Associations').bind('loaded', function() + { + enableSave(); + }); + $('.confirm_leave').live('click', function(){ // Double quotes are necessary when the translated string has single quotes return confirm("{l s='You will lose all unsaved modifications, do you want to proceed?' js=1}"); diff --git a/js/admin-products.js b/js/admin-products.js index 0e05d87b9..91fc5c378 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -306,13 +306,4 @@ urlToCall = null; $(document).ready(function() { updateCurrentText(); updateFriendlyURL(); - - // disable save if Associations tab is not loaded - if ($('#product-tab-content-Associations').hasClass('not-loaded')) - disableSave(); - - $('#product-tab-content-Associations').bind('loaded', function() - { - enableSave(); - }); });