From 3db7f7fb5d27edd18538f5e83250129c3117dd17 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 --- 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