[+] BO : fixed bug on category tree view

This commit is contained in:
vAugagneur
2011-11-09 15:15:55 +00:00
parent 7bff7b5698
commit bd64e7660f
+5 -5
View File
@@ -103,8 +103,8 @@ function closeChildrenCategories(element)
if (arrayLevel[i] != undefined) if (arrayLevel[i] != undefined)
for(j=0;j<arrayLevel[i].length;j++) for(j=0;j<arrayLevel[i].length;j++)
{ {
$('li#'+arrayLevel[i][j]+'.collapsable').children('span.category_label').trigger('click'); $('#categories-treeview').find('li#'+arrayLevel[i][j]+'.collapsable').children('span.category_label').trigger('click');
$('li#'+arrayLevel[i][j]+'.expandable').children('ul').hide(); $('#categories-treeview').find('li#'+arrayLevel[i][j]+'.expandable').children('ul').hide();
} }
} }
@@ -114,7 +114,7 @@ function setCategoryToExpand()
id = 0; id = 0;
arrayCatToExpand = new Array(); arrayCatToExpand = new Array();
$('li.expandable:visible').each(function() { $('#categories-treeview').find('li.expandable:visible').each(function() {
arrayCatToExpand.push($(this).attr('id')); arrayCatToExpand.push($(this).attr('id'));
ret = true; ret = true;
}); });
@@ -169,9 +169,9 @@ function openCategory()
if (readyToExpand) if (readyToExpand)
{ {
if ($('li#'+arrayCatToExpand[id]+'.hasChildren').length > 0) if ($('#categories-treeview').find('li#'+arrayCatToExpand[id]+'.hasChildren').length > 0)
readyToExpand = false; readyToExpand = false;
$('li#'+arrayCatToExpand[id]+'.expandable:visible span.category_label').trigger('click'); $('#categories-treeview').find('li#'+arrayCatToExpand[id]+'.expandable:visible span.category_label').trigger('click');
id++; id++;
} }
} }