// improvement about admin-products.js enable/disable save buttons

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12105 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mMarinetti
2012-01-04 10:30:21 +00:00
parent 1f7a76fc04
commit 96f8878aa5
+15 -11
View File
@@ -291,17 +291,13 @@ function getManufacturers()
function disableSave() function disableSave()
{ {
if ($('#product-tab-content-Associations').hasClass('not-loaded'))
{
$('#desc-product-save').hide(); $('#desc-product-save').hide();
$('#desc-product-save-and-stay').hide(); $('#desc-product-save-and-stay').hide();
}
$('#product-tab-content-Associations').bind('loaded', function() function enableSave()
{ {
$('#desc-product-save').show(); $('#desc-product-save').show();
$('#desc-product-save-and-stay').show(); $('#desc-product-save-and-stay').show();
});
}
} }
/* function autocomplete */ /* function autocomplete */
@@ -310,5 +306,13 @@ urlToCall = null;
$(document).ready(function() { $(document).ready(function() {
updateCurrentText(); updateCurrentText();
updateFriendlyURL(); updateFriendlyURL();
disableSave();
}); // 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();
});
});