// Changes and fixes to specific prices creation

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13365 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-02-15 16:16:10 +00:00
parent cb71c61d40
commit 6da9e16e8e
3 changed files with 43 additions and 22 deletions
+26
View File
@@ -344,6 +344,30 @@ function enableProductName()
$('.copy2friendlyUrl').removeAttr('disabled');
}
function toggleSpecificPrice()
{
$('#show_specific_price').click(function()
{
$('#add_specific_price').slideToggle();
$('#add_specific_price').append('<input type="hidden" name="submitPriceAddition"/>');
$('#hide_specific_price').show();
$('#show_specific_price').hide();
return false;
});
$('#hide_specific_price').click(function()
{
$('#add_specific_price').slideToggle();
$('#add_specific_price').find('input[name=submitPriceAddition]').remove();
$('#hide_specific_price').hide();
$('#show_specific_price').show();
return false;
});
}
/**
* Execute a callback function when a specific tab has finished loading or right now if the tab is already loaded
*
@@ -377,4 +401,6 @@ $(document).ready(function() {
// Enable writing of the product name when the friendly url field in tab SEO is loaded
onTabLoad('Seo', enableProductName);
onTabLoad('Prices', toggleSpecificPrice);
});