aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/tree-basic/treeItem.reel
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-22 16:26:41 -0800
committerArmen Kesablyan2012-02-22 16:26:41 -0800
commit0bd1cefea2ab350fad1a891bdc926053b799aafc (patch)
tree962f559fcc02a3dfeb297d59907e40fa153453f3 /js/components/ui/tree-basic/treeItem.reel
parent695bc5082f48dddf66ce31480a4faefc067b38bd (diff)
parent2d2b1af8b5c0d506fe6a1cf65614101fec145970 (diff)
downloadninja-0bd1cefea2ab350fad1a891bdc926053b799aafc.tar.gz
Merge branch 'refs/heads/master' into new-tool-icons
Diffstat (limited to 'js/components/ui/tree-basic/treeItem.reel')
-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
3 files changed, 22 insertions, 1 deletions
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:{