Implement action system state for trees

This commit is contained in:
Nathan Gray 2014-04-28 23:11:58 +00:00
parent e6c32bf765
commit 178fa34031

View File

@ -53,6 +53,20 @@ function dhtmlxtreeItemAOI(_tree, _itemId)
}
}
aoi.doSetState = function(_state) {
if(!_tree || !_tree.focusItem) return;
// Update the "focused" flag
if(egwBitIsSet(_state, EGW_AO_STATE_FOCUSED))
{
_tree.focusItem(this.id);
}
if(egwBitIsSet(_state, EGW_AO_STATE_SELECTED))
{
_tree.selectItem(this.id, false); // false = do not trigger onSelect
}
}
return aoi;
}