Lines Matching defs:node

33         $('div.node').draggable({
40 snap : 'div.node.expanded',
42 stack : 'div.node'
45 $('div.node').droppable({
46 accept : '.node',
52 $('div.node').bind("dragstart", function handleDragStart( event, ui ){
55 sourceNode.parentsUntil('.node-container')
57 .filter('.node')
62 $('div.node').bind("dragstop", function handleDragStop( event, ui ){
70 $('div.node').bind("drop", function handleDropEvent( event, ui ) {
72 var targetID = $(this).data("tree-node");
73 var targetLi = $this.find("li").filter(function() { return $(this).data("tree-node") === targetID; } );
76 var sourceID = ui.draggable.data("tree-node");
77 var sourceLi = $this.find("li").filter(function() { return $(this).data("tree-node") === sourceID; } );
107 function buildNode($node, $appendTo, level, opts) {
111 // Construct the node container(s)
112 var $nodeRow = $("<tr/>").addClass("node-cells");
113 var $nodeCell = $("<td/>").addClass("node-cell").attr("colspan", 2);
114 var $childNodes = $node.children("ul:first").children("li");
120 // Draw the node
122 var $nodeContent = $node.clone()
128 //Increaments the node count which is used to link the source list and the org chart
130 $node.data("tree-node", nodeCount);
131 $nodeDiv = $("<div>").addClass("node")
132 .data("tree-node", nodeCount)
148 $node.removeClass('collapsed');
154 $node.addClass('collapsed');
173 // draw the connecting line from the parent node to the horizontal line
196 var $td = $("<td class='node-container'/>");
207 // any classes on the LI element get copied to the relevant node in the tree
209 if ($node.attr('class') != undefined) {
210 var classList = $node.attr('class').split(/\s+/);
226 /* Prevent trees collapsing if a link inside a node is clicked */