<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>glowTree jQuery Plugin</title><link>https://community.telligent.com/community/13/w/api-documentation/75804/glowtree-jquery-plugin</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>glowTree jQuery Plugin</title><link>https://community.telligent.com/community/13/w/api-documentation/75804/glowtree-jquery-plugin</link><pubDate>Fri, 08 Mar 2024 17:51:50 GMT</pubDate><guid isPermaLink="false">ada595f0-9fca-49ba-a253-2203ca32f9c3</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/13/w/api-documentation/75804/glowtree-jquery-plugin#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 03/08/2024 17:51:50&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;jQuery.fn.glowTree&lt;/h3&gt;
&lt;p&gt;Renders a tree of nodes which can be navigated, manipulated, and re-arranged&lt;/p&gt;
&lt;h3&gt;Usage&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).glowTree(options)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;where &amp;#39;SELECTOR&amp;#39; is a &lt;code&gt;select&lt;/code&gt; element to be replaced with a tree control&lt;/p&gt;
&lt;h3&gt;Options&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;enableDragDrop&lt;/code&gt;: when enabled, allows rearranging of nodes within a tree via drag and drop
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;false&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;getSubNodes&lt;/code&gt;: callback function which defines how to retrieve sub-nodes for a given tree and node.  Callback is passed parameters:&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;tree&lt;/li&gt;
&lt;li&gt;node&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;canHaveChildren&lt;/code&gt;: whether a tree can have child nodes
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;true&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nodeHtml&lt;/code&gt;: Array of strings, one per node
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;[]&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;draggableTrees&lt;/code&gt;: when provided the id of another glowTree, nodes can be dragged from this tree to the tree identified by the id
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;null&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;expandedImageUrl&lt;/code&gt;: URL of image used alongside expanded tree nodes
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;&amp;#39;&amp;#39;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;collapsedImageUrl&lt;/code&gt;: URL of image used alongside collapsed tree nodes
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;&amp;#39;&amp;#39;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;blankImageUrl&lt;/code&gt;: URL of blank image for leaf nodes
&lt;ul&gt;
&lt;li&gt;default: &lt;em&gt;&amp;#39;&amp;#39;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Events&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;glowTreeNodeSelected&lt;/code&gt; - triggered when a tree node is selected&lt;/li&gt;
&lt;li&gt;&lt;code&gt;glowTreeContextMenu&lt;/code&gt; - triggered when a tree node is right-clicked&lt;/li&gt;
&lt;li&gt;&lt;code&gt;glowTreeNodeRemoved&lt;/code&gt; - triggered when a tree node is removed from the tree&lt;/li&gt;
&lt;li&gt;&lt;code&gt;glowTreeNodeMoved&lt;/code&gt; - triggered when a tree node is moved in a tree&lt;/li&gt;
&lt;li&gt;&lt;code&gt;glowTreeNodeAdded&lt;/code&gt; - triggered when a tree node is added&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Methods&lt;/h3&gt;
&lt;h4&gt;getParentAndIndex&lt;/h4&gt;
&lt;p&gt;Returns the parent node and index based on a given coordinate pair.  Generally used internally when dragging nodes between trees.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var nodeAndIndex = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;getParentAndIndex&amp;#39;, x, y);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;highlight&lt;/h4&gt;
&lt;p&gt;Sets whether a tree is highlighted&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;highlight&amp;#39;, true);
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;highlight&amp;#39;, false);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;addDraggedNode&lt;/h4&gt;
&lt;p&gt;Adds a dragged node into a linked tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;addDraggedNode&amp;#39;, node, nodeAndIndex.parentNode, nodeAndIndex.index, event);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;selected&lt;/h4&gt;
&lt;p&gt;When not passed a node, returns the currently-selected node.  When passed a node, selects the node in the tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var selectedNode = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;selected&amp;#39;);
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;selected&amp;#39;, node);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;resize&lt;/h4&gt;
&lt;p&gt;Resizes the tree to a given width and height in pixels&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;resize&amp;#39;, x, y)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;disabled&lt;/h4&gt;
&lt;p&gt;When not passed a value, returns whether the tree is disabled for interaction.  When passed a boolean value, enables or disables the tree.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var isDisabled = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;disabled&amp;#39;);
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;disabled&amp;#39;, true);
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;disabled&amp;#39;, false);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;refresh&lt;/h4&gt;
&lt;p&gt;Re-renders the tree based on the currently-applied set of tree nodes&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;refresh&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;add&lt;/h4&gt;
&lt;p&gt;Adds a new tree node to a tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var newNode = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;createTreeNode&amp;#39;, {
    value: &amp;#39;abc&amp;#39;,
    html: &amp;#39;ABC&amp;#39;
});
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;add&amp;#39;, newNode);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;remove&lt;/h4&gt;
&lt;p&gt;Removes a given tree node instance from a tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var node = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;getByValue&amp;#39;, &amp;#39;abc&amp;#39;);
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;remove&amp;#39;, node);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;insert&lt;/h4&gt;
&lt;p&gt;Adds a new tree node to a tree at a given position&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var newNode = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;createTreeNode&amp;#39;, {
    value: &amp;#39;abc&amp;#39;,
    html: &amp;#39;ABC&amp;#39;
});
$(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;add&amp;#39;, newNode, 5);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;getByValue&lt;/h4&gt;
&lt;p&gt;Find and return an existing node based on the node&amp;#39;s value&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var node = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;getByValue&amp;#39;, &amp;#39;abc&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;getIndex&lt;/h4&gt;
&lt;p&gt;Return the position index for a given node&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var index = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;getIndex&amp;#39;, node)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;getByIndex&lt;/h4&gt;
&lt;p&gt;Find and return an existing node based on the node&amp;#39;s position index&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var node = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;getByIndex&amp;#39;, 4)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;count&lt;/h4&gt;
&lt;p&gt;Returns the number of nodes in a given tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var count = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;count&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;createTreeNode&lt;/h4&gt;
&lt;p&gt;Creates a new tree node suitable for adding or inserting into a tree&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var newNode = $(&amp;#39;SELECTOR&amp;#39;).glowTree(&amp;#39;createTreeNode&amp;#39;, {
    value: &amp;#39;abc&amp;#39;,
    html: &amp;#39;ABC&amp;#39;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>