method to get data of a node by its id

This commit is contained in:
Ralf Becker 2014-02-11 15:56:52 +00:00
parent 9835eca80f
commit ec989fc535

View File

@ -612,6 +612,17 @@ var et2_tree = et2_inputWidget.extend(
return null;
},
/**
* Get node data by id
*
* @param {string} _id id of node
* @return {object} object with attributes id, im0-2, text, tooltip, ... as set via select_options or autoload url
*/
getNode: function(_id)
{
return this._find_in_item(_id, this.options.select_options);
},
/**
* Sets label of an item by id
*