// Changes to ajax product tabs loading

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12009 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean committed 2012-01-02 16:05:35 +00:00
1 parent 4277196d14
commit 38793a54d2
3 files changed
+43 -4

No files matched your search

+35
View File
@@ -247,6 +247,41 @@ function displayTabProductById(el, id, selected)
});
}
function displayTabProductById2(index, selected, stack)
{
id = stack[index];
myurl = $('#link-'+id).attr("href")+"&ajax=1";
// Used to check if the tab is already in the process of being loaded
$("#product-tab-content-"+id).addClass('loading');
if (selected)
$('#product-tab-content-wait').show();
$.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();
}
},
complete : function(data)
{
$("#product-tab-content-"+id).removeClass('loading');
if (selected)
$('#product-tab-content-wait').hide();
if (stack[index + 1])
displayTabProductById2(index + 1, selected, stack);
}
});
}
/**
* Update the manufacturer select element with the list of existing manufacturers
*/