The UI plugin handles selecting, deselecting and hovering tree items.
Defines how many nodes can be selected at a given time (-1 means unlimited).
The special key used to make a click add to the selection and not replace it ("ctrl", "shift", "alt", "meta").
You can also set this to "on" making every click add to the selection.
The special key used to make a click expand a range from the last selected item ("ctrl", "shift", "alt", "meta").
Note that the last clicked elemtn should be a sibling of the currently clicked element so that a range will be created (same as common file explorers).
What action to take when a selected node's parent is closed (making the selected node invisible). Possible values are false - do nothing, "select_parent" - select the closed node's parent and "deselect" - deselect the node.
When set to true when programatically selecting a node in the tree all of its closed parents are opened automatically.
If set to true when a selected node is deleted, its previous sibling (or parent) is selected.
If set to true you will not be able to select children of already selected nodes.
Defines which nodes are to be automatically selected when the tree finishes loading - a list of IDs is expected.
Overrides the function from the core module.
if node is undefined or null and allow_multiple is true all the currently selected nodes are returned
if node is undefined or null and allow_multiple is NOT true only the last selected node is returned.
mixed node
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
boolean allow_multiple
Whether to return all selected nodes or only the last selected one if node is null.
Saves away the current selection state of the tree (saves it in a variable, so do not expect a restore after a refresh - for that functionality refer to the cookies plugin. Used mostly internally. Triggers an event.
Restores the state of the tree using the variable saved in the above function. Used mostly internally. Triggers an event.
Overrides the function form the core module.
Enables saving the selection state before the refresh and restoring it afterwards.
Sets the specified node as hovered. Triggers an event.
mixed node
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
Removes the hover state from the currently hovered node (if there is one). Triggers an event.
mixed node
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
bool check
Whether to check the specified rules and do appropriate actions (check select_limit, deselect other nodes respectively, etc) or to just force selection of the node regardless of select_limit.
event event
Used internally - when a click on a node caused this function to be executed.
There functions control the selected state on a node. deselect_node triggers an event.
mixed node
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
Deselects all selected nodes. If context is set - only the selected nodes within that context are deselected. Triggers an event.
mixed context
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
Returns all selected nodes. If context is set - only the selected nodes within that context are returned.
mixed context
This can be a DOM node, jQuery node or selector pointing to an element within the tree.
Returns whether the specified node is selected or not.
mixed node
This can be a DOM node, jQuery node or selector pointing to an element within the tree.