[+] CORE : now you can choose the redirect option when your product is disable

This commit is contained in:
vAugagneur
2012-12-03 14:13:50 +01:00
parent 12cb5316ee
commit ed3e0e1a58
14 changed files with 206 additions and 26 deletions
+50
View File
@@ -571,6 +571,56 @@ function toggleDraftWarning(show)
$('.draft').show();
}
function showRedirectProductOptions(show)
{
if (show)
$('.redirect_product_options').fadeIn();
else
$('.redirect_product_options').fadeOut();
redirectSelectChange();
}
function redirectSelectChange()
{
if ($('#redirect_type :selected').val() == '404')
showRedirectProductSelectOptions(false);
else
showRedirectProductSelectOptions(true);
}
function addRelatedProduct(id_product_to_add, product_name)
{
if (!id_product_to_add || id_product == id_product_to_add)
return;
$('#related_product_name').html(product_name);
$('#related_product_name').parent('p').css('margin-top', 0);
$('input[name=id_product_redirected]').val(id_product_to_add);
$('#related_product_autocomplete_input').hide();
$('#related_product_remove').show();
}
function removeRelatedProduct()
{
$('#related_product_name').html(no_related_product);
$('#related_product_name').parent('p').css('margin-top', '0.5em');
$('input[name=id_product_redirected]').val(0);
$('#related_product_remove').hide();
$('#related_product_autocomplete_input').fadeIn();
}
function showRedirectProductSelectOptions(show)
{
if (show)
$('.redirect_product_options_product_choise').show();
else
{
$('.redirect_product_options_product_choise').hide();
removeRelatedProduct();
}
}
function showOptions(show)
{
if (show)