From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Fri, 27 Jan 2012 12:05:17 -0800
Subject: Merged old FileIO
---
.../ui/tree-basic/treeItem.reel/treeItem.js | 23 +++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
mode change 100644 => 100755 js/components/ui/tree-basic/treeItem.reel/treeItem.js
(limited to 'js/components/ui/tree-basic/treeItem.reel/treeItem.js')
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.js b/js/components/ui/tree-basic/treeItem.reel/treeItem.js
old mode 100644
new mode 100755
index 4c1c0977..755eab8c
--- 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, {
value:true
},
+ expandAfterDraw:{
+ writable:true,
+ enumerable:true,
+ value:false
+ },
+ highlightedUri:{
+ writable:true,
+ enumerable:true,
+ value:null
+ },
+
directoryBold :{
writable:true,
enumerable:true,
@@ -85,6 +96,9 @@ exports.TreeItem = Montage.create(Component, {
this.element.identifier = "treeItem";
this.treeArrow.identifier = "treeArrow";
+ this.element.setAttribute("data-uri", this.treeItemData.uri);
+ this.element.setAttribute("data-type", this.treeItemData.type);
+
//add arrow click handler for directory
if(this.treeItemData.type === "directory"){
this.treeArrow.addEventListener("click", this, false);
@@ -107,7 +121,14 @@ exports.TreeItem = Montage.create(Component, {
if(this.treeItemData.size){this.metadata = this.metadata + "
" + "Size: "+this.treeItemData.size;}
if(this.treeItemData.creationDate){this.metadata = this.metadata + "
" + "Creation date: "+ this.formatTimestamp(this.treeItemData.creationDate);}
if(this.treeItemData.modifiedDate){this.metadata = this.metadata + "
" + "Modified date: "+ this.formatTimestamp(this.treeItemData.modifiedDate);}
- }
+
+ if((this.treeItemData.type === "directory") && (this.expandAfterDraw === true)){
+ this.toggleContent(this.treeArrow);
+ }
+ if(this.treeItemData.uri === this.highlightedUri){
+ this.itemName.classList.add("selected");
+ }
+ }
},
toggleContent:{
--
cgit v1.2.3