diff options
author | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
commit | f060190a3bffd9a16718f2ce0499699103d46372 (patch) | |
tree | a308fe7eacec2156c8212dff0892a3de925d5f9a /js/components/ui/tree-basic/treeItem.reel/treeItem.js | |
parent | f766cc203f30ea43ae8b83cf4b65d45cc4435ee9 (diff) | |
parent | 33bc9d62b8e6694500bf14d5b18187bd99a520a3 (diff) | |
download | ninja-f060190a3bffd9a16718f2ce0499699103d46372.tar.gz |
Merge branch 'FileIO' of https://github.com/joseeight/ninja-internal into integration
Diffstat (limited to 'js/components/ui/tree-basic/treeItem.reel/treeItem.js')
-rwxr-xr-x[-rw-r--r--] | js/components/ui/tree-basic/treeItem.reel/treeItem.js | 23 |
1 files changed, 22 insertions, 1 deletions
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:{ |