mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
attempt to implement focusItem, to be able to scroll to a selected Item automatically; implement wrapper for hasChildren from dhtmlXTree API
This commit is contained in:
parent
a9903e8847
commit
4c03a02926
@ -316,6 +316,7 @@ var et2_tree = et2_inputWidget.extend(
|
||||
else
|
||||
{
|
||||
this.input.selectItem(this.value, false); // false = do not trigger onSelect
|
||||
this.input.focusItem(this.value);
|
||||
this.input.openItem(this.value);
|
||||
}
|
||||
},
|
||||
@ -467,6 +468,28 @@ var et2_tree = et2_inputWidget.extend(
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* focus the item, and scrolls it into view
|
||||
*
|
||||
* @param _id ID of the node
|
||||
* @return void
|
||||
*/
|
||||
focusItem: function(_id) {
|
||||
if(this.input == null) return null;
|
||||
this.input.focusItem(_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* hasChildren
|
||||
*
|
||||
* @param _id ID of the node
|
||||
* @return the number of childelements
|
||||
*/
|
||||
hasChildren: function(_id) {
|
||||
if(this.input == null) return null;
|
||||
return this.input.hasChildren(_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback for after using dhtmlxtree's AJAX loading
|
||||
* The tree has visually already been updated at this point, we just need
|
||||
|
Loading…
Reference in New Issue
Block a user