My favorites
▼
|
Sign in
dynatree
Dynatree is a JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop, and lazy loading.
Project Home
Downloads
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
431
attachment: dynatree.patch
(1.9 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff --git a/Resources/public/js/jquery.dynatree.js b/Resources/public/js/jquery.dynatree.js
index 606f3dd..c957419 100644
--- a/Resources/public/js/jquery.dynatree.js
+++ b/Resources/public/js/jquery.dynatree.js
@@ -950,8 +950,8 @@ DynaTreeNode.prototype = {
} else {
sel = undefined;
}
- this._setSubSel(sel === undefined);
- this.bSelected = (sel === true);
+ this._setSubSel(sel === undefined || sel === true);
+ //this.bSelected = (sel === true);
return sel;
},
@@ -965,17 +965,17 @@ DynaTreeNode.prototype = {
var p, i, l;
if( this.bSelected ) {
// Select all children
- this.visit(function(node){
+/* this.visit(function(node){
node.parent._setSubSel(true);
if(!node.data.unselectable){
node._select(true, false, false);
}
});
- // Select parents, if all children are selected
+*/ // Select parents, if all children are selected
p = this.parent;
while( p ) {
p._setSubSel(true);
- var allChildsSelected = true;
+/* var allChildsSelected = true;
for(i=0, l=p.childList.length; i<l; i++) {
var n = p.childList[i];
if( !n.bSelected && !n.data.isStatusNode && !n.data.unselectable) {
@@ -988,19 +988,19 @@ DynaTreeNode.prototype = {
if( allChildsSelected ){
p._select(true, false, false);
}
- p = p.parent;
+*/ p = p.parent;
}
} else {
// Deselect all children
- this._setSubSel(false);
- this.visit(function(node){
+ //this._setSubSel(false);
+/* this.visit(function(node){
node._setSubSel(false);
node._select(false, false, false);
});
- // Deselect parents, and recalc hasSubSel
+*/ // Deselect parents, and recalc hasSubSel
p = this.parent;
while( p ) {
- p._select(false, false, false);
+// p._select(false, false, false);
var isPartSel = false;
for(i=0, l=p.childList.length; i<l; i++) {
if( p.childList[i].bSelected || p.childList[i].hasSubSel ) {
Powered by
Google Project Hosting