aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/tree-basic/treeItem.reel/treeItem.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-15 16:09:47 -0800
committerValerio Virgillito2012-02-15 16:09:47 -0800
commitd366c0bd1af6471511217ed574083e15059519b5 (patch)
treec8c9f9af761457e3c5f4c6774fb0fbba851df0c4 /js/components/ui/tree-basic/treeItem.reel/treeItem.js
parent997ce3fb65f27b3d6f331f63b5dc22d3c7fb8f1e (diff)
parentb85bfb54aaca3ccca3c1ef09115de925cd67f4e9 (diff)
downloadninja-d366c0bd1af6471511217ed574083e15059519b5.tar.gz
Merge branch 'refs/heads/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.js23
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:{