aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/tree-basic/treeItem.reel/treeItem.js
diff options
context:
space:
mode:
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:{