aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/tree-basic
diff options
context:
space:
mode:
authorEric Guzman2012-02-16 00:22:43 -0800
committerEric Guzman2012-02-16 00:22:43 -0800
commit82b1a273219f0ae3d119e156c7acccdbe478f441 (patch)
tree74c45e5e3afc6706b2f7a7918807f72c54cdcfc5 /js/components/ui/tree-basic
parentaf20ca9b11133dd5cefb9275dbe8fb101c3380d0 (diff)
parent966f0adaf1d4b7f2dd5a6e31643df58bff713884 (diff)
downloadninja-82b1a273219f0ae3d119e156c7acccdbe478f441.tar.gz
Merge branch 'refs/heads/TreeComponents' into PresetsPanel
Diffstat (limited to 'js/components/ui/tree-basic')
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/tree.reel/tree.css0
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/tree.reel/tree.html10
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/tree.reel/tree.js12
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/treeItem.reel/treeItem.css0
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/treeItem.reel/treeItem.html0
-rwxr-xr-x[-rw-r--r--]js/components/ui/tree-basic/treeItem.reel/treeItem.js23
6 files changed, 44 insertions, 1 deletions
diff --git a/js/components/ui/tree-basic/tree.reel/tree.css b/js/components/ui/tree-basic/tree.reel/tree.css
index 878068b7..878068b7 100644..100755
--- a/js/components/ui/tree-basic/tree.reel/tree.css
+++ b/js/components/ui/tree-basic/tree.reel/tree.css
diff --git a/js/components/ui/tree-basic/tree.reel/tree.html b/js/components/ui/tree-basic/tree.reel/tree.html
index ba594926..1990a4ef 100644..100755
--- a/js/components/ui/tree-basic/tree.reel/tree.html
+++ b/js/components/ui/tree-basic/tree.reel/tree.html
@@ -26,6 +26,16 @@
26 "boundObject": {"@": "owner"}, 26 "boundObject": {"@": "owner"},
27 "boundObjectPropertyPath": "showIcons", 27 "boundObjectPropertyPath": "showIcons",
28 "oneway": true 28 "oneway": true
29 },
30 "expandAfterDraw": {
31 "boundObject": {"@": "owner"},
32 "boundObjectPropertyPath": "expandTreeAfterDraw",
33 "oneway": true
34 },
35 "highlightedUri": {
36 "boundObject": {"@": "owner"},
37 "boundObjectPropertyPath": "highlightedUri",
38 "oneway": true
29 } 39 }
30 } 40 }
31 }, 41 },
diff --git a/js/components/ui/tree-basic/tree.reel/tree.js b/js/components/ui/tree-basic/tree.reel/tree.js
index 67fa20e5..d507eee5 100644..100755
--- a/js/components/ui/tree-basic/tree.reel/tree.js
+++ b/js/components/ui/tree-basic/tree.reel/tree.js
@@ -21,6 +21,18 @@ exports.Tree = Montage.create(Component, {
21 value:true 21 value:true
22 }, 22 },
23 23
24 expandTreeAfterDraw:{
25 writable:true,
26 enumerable:true,
27 value:false
28 },
29
30 highlightedUri:{
31 writable:true,
32 enumerable:true,
33 value:null
34 },
35
24 willDraw: { 36 willDraw: {
25 enumerable: false, 37 enumerable: false,
26 value: function() { 38 value: function() {
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.css b/js/components/ui/tree-basic/treeItem.reel/treeItem.css
index f8e67541..f8e67541 100644..100755
--- a/js/components/ui/tree-basic/treeItem.reel/treeItem.css
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.css
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.html b/js/components/ui/tree-basic/treeItem.reel/treeItem.html
index 3c5b19a9..3c5b19a9 100644..100755
--- a/js/components/ui/tree-basic/treeItem.reel/treeItem.html
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.html
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js
index 4c1c0977..755eab8c 100644..100755
--- a/js/components/ui/tree-basic/treeItem.reel/treeItem.js
+++ b/js/components/ui/tree-basic/treeItem.reel/treeItem.js
@@ -29,6 +29,17 @@ exports.TreeItem = Montage.create(Component, {
29 value:true 29 value:true
30 }, 30 },
31 31
32 expandAfterDraw:{
33 writable:true,
34 enumerable:true,
35 value:false
36 },
37 highlightedUri:{
38 writable:true,
39 enumerable:true,
40 value:null
41 },
42
32 directoryBold :{ 43 directoryBold :{
33 writable:true, 44 writable:true,
34 enumerable:true, 45 enumerable:true,
@@ -85,6 +96,9 @@ exports.TreeItem = Montage.create(Component, {
85 this.element.identifier = "treeItem"; 96 this.element.identifier = "treeItem";
86 this.treeArrow.identifier = "treeArrow"; 97 this.treeArrow.identifier = "treeArrow";
87 98
99 this.element.setAttribute("data-uri", this.treeItemData.uri);
100 this.element.setAttribute("data-type", this.treeItemData.type);
101
88 //add arrow click handler for directory 102 //add arrow click handler for directory
89 if(this.treeItemData.type === "directory"){ 103 if(this.treeItemData.type === "directory"){
90 this.treeArrow.addEventListener("click", this, false); 104 this.treeArrow.addEventListener("click", this, false);
@@ -107,7 +121,14 @@ exports.TreeItem = Montage.create(Component, {
107 if(this.treeItemData.size){this.metadata = this.metadata + "<br />" + "Size: "+this.treeItemData.size;} 121 if(this.treeItemData.size){this.metadata = this.metadata + "<br />" + "Size: "+this.treeItemData.size;}
108 if(this.treeItemData.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);} 122 if(this.treeItemData.creationDate){this.metadata = this.metadata + "<br />" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);}
109 if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);} 123 if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "<br />" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);}
110 } 124
125 if((this.treeItemData.type === "directory") && (this.expandAfterDraw === true)){
126 this.toggleContent(this.treeArrow);
127 }
128 if(this.treeItemData.uri === this.highlightedUri){
129 this.itemName.classList.add("selected");
130 }
131 }
111 }, 132 },
112 133
113 toggleContent:{ 134 toggleContent:{