From 4f1948cc1c4f135eb7ba10720425cca83b081619 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 3 Jan 2012 16:28:51 +0000 Subject: [PATCH] // Added safety to not be able to save product before the mandatory tabs are loaded git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12085 b9a71923-0436-4b27-9f14-aed3839534dd --- js/admin-products.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/js/admin-products.js b/js/admin-products.js index 2aa81c664..adbb9386e 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -289,10 +289,26 @@ function getManufacturers() }); } +function disableSave() +{ + if ($('#product-tab-content-Associations').hasClass('not-loaded')) + { + $('#desc-product-save').hide(); + $('#desc-product-save-and-stay').hide(); + + $('#product-tab-content-Associations').bind('loaded', function() + { + $('#desc-product-save').show(); + $('#desc-product-save-and-stay').show(); + }); + } +} + /* function autocomplete */ urlToCall = null; $(document).ready(function() { updateCurrentText(); updateFriendlyURL(); + disableSave(); }); \ No newline at end of file