// adding the dynamic loading of tabs in products

This commit is contained in:
lLefevre
2011-12-12 11:15:17 +00:00
parent eae3bc761f
commit a4b75601b6
3 changed files with 40 additions and 25 deletions
+20
View File
@@ -204,6 +204,26 @@ function editProductAttribute(ids, token)
}
/* END Combination */
function displayTabProductById(el, id, selected)
{
myurl = $(el).attr("href")+"&ajax=1";
$.ajax({
url : myurl,
async : true,
success :function(data)
{
$("#product-tab-content-"+id).html(data);
$("#product-tab-content-"+id).removeClass('not-loaded');
if (selected)
{
$("#link-"+id).addClass('selected');
$("#product-tab-content-"+id).show();
}
}
});
}
function addPackItem()
{
if ($('#curPackItemId').val() == '' || $('#curPackItemName').val() == '')