Hy,
The javascript function set_imageUrl() is not working for me if node.get_nodes().get_count() > 0;
For test, i'm only ckeck child node.
The parent node are checking to, and partial text appear, but only the last child are changing image.
The javascript function set_imageUrl() is not working for me if node.get_nodes().get_count() > 0;
For test, i'm only ckeck child node.
The parent node are checking to, and partial text appear, but only the last child are changing image.
function
CheckNodeChildren(node, isChecked)
{
var
nbChildrenNode = node.get_nodes().get_count();
if
(nbChildrenNode > 0)
{
for
(
var
i = 0; i < nbChildrenNode; i)
{
var
childNode = node.get_nodes().getNode(i);
DetermineMode(childNode, isChecked,
false
);
CheckNodeChildren(childNode, isChecked);
}
return
true
;
}
else
return
false
;
}
function
DetermineMode(node, isAllNodeChecked, isSomeNodeChecked)
{
if
(isAllNodeChecked)
{
SetMode_TotalAccess(node);
}
else
if
(isSomeNodeChecked)
{
SetMode_PartialAccess(node);
}
else
{
SetMode_ForbiddenAccess(node);
}
}
function
SetMode_TotalAccess(node)
{
node.set_checked(
true
);
node.set_imageUrl(
"/image/checked.gif"
);
node.set_text(
"Total"
);
// node.set_toolTip(\ TOOLTIP_PictureTotal \);
}
function
SetMode_ForbiddenAccess(node)
{
node.set_checked(
false
);
node.set_imageUrl(
"/image/deleted.gif"
);
node.set_text(
"Forbidden"
);
// node.set_toolTip(\ TOOLTIP_PictureForbidden \);
}
function
SetMode_PartialAccess(node)
{
node.set_checked(
false
);
node.set_imageUrl(
"/image/partial.gif"
);
node.set_text(
"Partial"
);
// node.set_toolTip(\ TOOLTIP_PicturePartial \);
}