Note that there are some explanatory texts on larger screens.

plurals
  1. PODual jsTree Implementation
    primarykey
    data
    text
    <p>I am newbie to jsTree, I want to use dual jsTree.</p> <p><strong>[left JsTrree] [ >> ] [right JsTrree]</strong></p> <p>">>" : Button for copy selected node from left to right jsTree</p> <p>I want to copy partial tree hierarchy from left to right jsTree.</p> <ul> <li>No duplication of node.</li> <li>I don't want to copy child node of selected node</li> <li>Only selected node from left jsTree merge into right jsTree as per right jsTree structure</li> </ul> <p>If user selected any node from left jsTree then on button(">>") click I want to copy partial tree from selected node to root node.</p> <p><strong>Left jsTree as follows</strong> "</p> <pre><code> Root -----A -----A1 -----A1.1 -----A1.2 -----A2 -----`A2.1` -----A2.2 -----B -----B1 -----B2 -----C -----C1 -----C1.1 -----C2.2 </code></pre> <p><strong>--------------------------------------------------------------------------------------</strong><br> Now assume user selected node A2.1 then after button(">>") click following partial tree should display in right jsTree</p> <p><strong>[#1] Right jsTree:</strong></p> <pre><code> Root -----A -----A2 -----`A2.1` </code></pre> <p>Now Root node is added in right jsTree now on wards only selected node should merge into right jsTree.</p> <p><strong>--------------------------------------------------------------------------------------</strong></p> <p>Now assume user selected C1 then Only C1 should merge into right jsTree.</p> <p><strong>[#2] Right jsTree structure after C1 added from left jsTree:</strong></p> <pre><code>Root -----A -----A2 -----A2.1 -----C -----`C1` </code></pre> <p>Assume user selected A1 then A1 should merge into appropriate place<br> <strong>[#3] Right jsTree structure after A1 added from left jsTree:</strong></p> <pre><code>Root -----A -----`A1` -----A2 -----A2.1 -----C -----C1 </code></pre> <p>My workaround till now is as follows</p> <p>after selection of node from left jsTree I am building xml from selected node to root node. and generated partial_xml_string stored into cookie. OnClick of (">>")button I am reading value of partial_xml_string from cookie + clearing cookie value of partial_xml_string. [#1] case done properly. Is there any other good way to achive [#1] case ?</p> <p>Using .get_path ( node , id_mode ) I am getting path(ID &amp; Name) from root to leaf node</p> <p>if id_mode =true then node <strong>IDs</strong> = <strong>Root.id,A.id, A2.id, A2.1.id</strong></p> <p>if id_mode =false then node <strong>Name's</strong> = <strong>Root, A, A2, A2.1</strong></p> <p><strong>Is it possible to set this path to right side of jsTree ?</strong></p> <p><strong>If yes then How to set this path ?</strong> <strong>If path already exist then how to prevent copying</strong> ? else merge selected node to right jsTree.</p> <p><strong>--------------------------------------------------------------------------------------------</strong></p> <p>Using .bind("select_node.jstree", function (event, data) we can handle event on selected node. How to handle event onClick of <strong>+</strong> *<em>icon</em>* ?</p> <p>Consider my left jsTree contains only one Root node with + icon then How to handle onClick event on + icon? <strong>see ink's answer</strong></p> <p><strong>I want to get child nodes of selected node how to append that list of child nodes to selected node ?</strong></p> <p>How to achieve [#2] and [#3] using jsTree functions ?</p> <p>Any help or guidance in this matter would be appreciated. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload