From 566f10681a3752244b0eb48477e926ca3d302b48 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12112 b9a71923-0436-4b27-9f14-aed3839534dd --- 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(); - }); });