From 7a48decd82829a307eaa307a73041e27c9183920 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 16 Apr 2012 12:26:53 +0000 Subject: [PATCH] [-] BO : fix #PSFV-826 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14653 b9a71923-0436-4b27-9f14-aed3839534dd --- js/admin-categories-tree.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/js/admin-categories-tree.js b/js/admin-categories-tree.js index 0442d83bf..4bfc33413 100755 --- a/js/admin-categories-tree.js +++ b/js/admin-categories-tree.js @@ -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)