//small fix
This commit is contained in:
1 parent
4012b88f6b
commit
dac0b54562
1 file changed
+4
-4
@@ -28,6 +28,7 @@ var readyToExpand = true;
|
|||||||
var needCheckAll = false;
|
var needCheckAll = false;
|
||||||
var needUncheckAll = false;
|
var needUncheckAll = false;
|
||||||
var interval = null;
|
var interval = null;
|
||||||
|
var intervalCheck = null;
|
||||||
var id = 0;
|
var id = 0;
|
||||||
var arrayCatToExpand = new Array();
|
var arrayCatToExpand = new Array();
|
||||||
|
|
||||||
@@ -304,13 +305,14 @@ function getParentCategoriesIdAndOpen(id_category)
|
|||||||
|
|
||||||
function openParentCategories()
|
function openParentCategories()
|
||||||
{
|
{
|
||||||
|
intervalCheck = setInterval(checkCategory, 20);
|
||||||
|
|
||||||
if (id >= arrayCatToExpand.length && !readyToExpand)
|
if (id >= arrayCatToExpand.length && !readyToExpand)
|
||||||
{
|
{
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
// delete interval value
|
// delete interval value
|
||||||
interval = null;
|
interval = null;
|
||||||
readyToExpand = false;
|
readyToExpand = false;
|
||||||
intervalCheck = setInterval(checkCategory, 10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (readyToExpand)
|
if (readyToExpand)
|
||||||
@@ -324,15 +326,13 @@ function openParentCategories()
|
|||||||
|
|
||||||
function checkCategory()
|
function checkCategory()
|
||||||
{
|
{
|
||||||
if ($('li#'+category_to_check+' > input[type=checkbox]').is('checked'))
|
if ($('li#'+category_to_check+' > input[type=checkbox]').attr('checked'))
|
||||||
{
|
{
|
||||||
console.log('titi');
|
|
||||||
clearInterval(intervalCheck);
|
clearInterval(intervalCheck);
|
||||||
intervalCheck = null;
|
intervalCheck = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$('li#'+category_to_check+' > input[type=checkbox]').attr('checked', 'checked');
|
$('li#'+category_to_check+' > input[type=checkbox]').attr('checked', 'checked');
|
||||||
updateNbSubCategorySelected($('li#'+category_to_check+' input[type=checkbox]'), true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user