// Changes and fixes to specific prices creation

This commit is contained in:
tDidierjean
2012-02-15 16:16:10 +00:00
parent 10364a2759
commit 7895a7f533
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);
});