[-] BO : fix #PSFV-826

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14653 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-04-16 12:26:53 +00:00
parent b48a19a62e
commit 7a48decd82
+17 -17
View File
@@ -295,27 +295,27 @@ function getParentCategoriesIdAndOpen(id_category)
{
category_to_check = id_category;
$.ajax({
type: 'POST',
url: 'ajax.php',
async: true,
dataType: 'json',
data: 'ajax=true&getParentCategoriesId=true&id_category=' + id_category ,
success: function(jsonData) {
for(var i= 0; i < jsonData.length; i++)
if (jsonData[i].id_category != 1)
arrayCatToExpand.push(jsonData[i].id_category);
readyToExpand = true;
type: 'POST',
url: 'ajax.php',
async: true,
dataType: 'json',
data: 'ajax=true&getParentCategoriesId=true&id_category=' + id_category ,
success: function(jsonData) {
for(var i= 0; i < jsonData.length; i++)
if (jsonData[i].id_category != 1)
arrayCatToExpand.push(jsonData[i].id_category);
readyToExpand = true;
interval = setInterval(openParentCategories, 10);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
jAlert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
intervalCheck = setInterval(checkCategory, 20);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
jAlert("TECHNICAL ERROR: \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
}
});
}
function openParentCategories()
{
intervalCheck = setInterval(checkCategory, 20);
if (id_tree >= arrayCatToExpand.length && !readyToExpand)
{
clearInterval(interval);
@@ -323,7 +323,7 @@ function openParentCategories()
interval = null;
readyToExpand = false;
}
if (readyToExpand)
{
if ($('li#'+arrayCatToExpand[id_tree]+'.hasChildren').length > 0)