Nextrek
Diff Revisions
753
vs
754
for /legal-map/js/tree.js
|
@@ -42,18 +42,23 @@ |
42 |
42 |
|
node.find(".close-button").show(); |
43 |
43 |
|
$("#list-id-"+node.attr("node-id")+" .close-button").hide(); |
44 |
44 |
|
|
45 |
|
- |
node.parent().find(".level-node-"+level+"[leaf='0'] .node-container .node-text").click(function() { |
|
45 |
+ |
node.parent().find(".level-node-"+level+"[leaf='0'] > .node-container .node-text").click(function() { |
46 |
46 |
|
openNode($(this), level+1); |
47 |
47 |
|
}); |
48 |
48 |
|
|
49 |
49 |
|
$("#list-id-"+node.attr("node-id")+" .close-button").click(function() { |
50 |
50 |
|
$(this).parent().parent().find("ul").hide(); |
51 |
51 |
|
$(this).hide(); |
|
52 |
+ |
/*$(this).parent().find(".node-text").click(function() { |
|
53 |
+ |
openNode($(this), level+1);; |
|
54 |
+ |
});*/ |
52 |
55 |
|
}) |
53 |
56 |
|
} |
54 |
57 |
|
|
55 |
|
- |
if ($("#list-id-"+node.attr("node-id")+" li").length>0) { //nodi già presenti |
56 |
|
- |
//da decidere |
|
58 |
+ |
if ($("#list-id-"+node.attr("node-id")+" > li").length>0) { //nodi già presenti |
|
59 |
+ |
$("#list-id-"+node.attr("node-id")).show(); |
|
60 |
+ |
node.find(".close-button").show(); |
|
61 |
+ |
$("#list-id-"+node.attr("node-id")+" .close-button").hide(); |
57 |
62 |
|
} else { |
58 |
63 |
|
$.ajax({ |
59 |
64 |
|
url: "./ajax/treeLoader.php", |
|
@@ -71,6 +76,9 @@ |
71 |
76 |
|
} |
72 |
77 |
|
}); |
73 |
78 |
|
} |
|
79 |
+ |
|
|
80 |
+ |
//clicked.unbind("click"); |
|
81 |
+ |
|
74 |
82 |
|
} |
75 |
83 |
|
|
76 |
84 |
|
function loadTree(data) { |