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
---
js/components/ui/tree-basic/tree.reel/tree.css | 0
js/components/ui/tree-basic/tree.reel/tree.html | 10 ++++++++++
js/components/ui/tree-basic/tree.reel/tree.js | 12 +++++++++++
.../ui/tree-basic/treeItem.reel/treeItem.css | 0
.../ui/tree-basic/treeItem.reel/treeItem.html | 0
.../ui/tree-basic/treeItem.reel/treeItem.js | 23 +++++++++++++++++++++-
6 files changed, 44 insertions(+), 1 deletion(-)
mode change 100644 => 100755 js/components/ui/tree-basic/tree.reel/tree.css
mode change 100644 => 100755 js/components/ui/tree-basic/tree.reel/tree.html
mode change 100644 => 100755 js/components/ui/tree-basic/tree.reel/tree.js
mode change 100644 => 100755 js/components/ui/tree-basic/treeItem.reel/treeItem.css
mode change 100644 => 100755 js/components/ui/tree-basic/treeItem.reel/treeItem.html
mode change 100644 => 100755 js/components/ui/tree-basic/treeItem.reel/treeItem.js
(limited to 'js/components/ui/tree-basic')
diff --git a/js/components/ui/tree-basic/tree.reel/tree.css b/js/components/ui/tree-basic/tree.reel/tree.css
old mode 100644
new mode 100755
diff --git a/js/components/ui/tree-basic/tree.reel/tree.html b/js/components/ui/tree-basic/tree.reel/tree.html
old mode 100644
new mode 100755
index ba594926..1990a4ef
--- a/js/components/ui/tree-basic/tree.reel/tree.html
+++ b/js/components/ui/tree-basic/tree.reel/tree.html
@@ -26,6 +26,16 @@
"boundObject": {"@": "owner"},
"boundObjectPropertyPath": "showIcons",
"oneway": true
+ },
+ "expandAfterDraw": {
+ "boundObject": {"@": "owner"},
+ "boundObjectPropertyPath": "expandTreeAfterDraw",
+ "oneway": true
+ },
+ "highlightedUri": {
+ "boundObject": {"@": "owner"},
+ "boundObjectPropertyPath": "highlightedUri",
+ "oneway": true
}
}
},
diff --git a/js/components/ui/tree-basic/tree.reel/tree.js b/js/components/ui/tree-basic/tree.reel/tree.js
old mode 100644
new mode 100755
index 67fa20e5..d507eee5
--- a/js/components/ui/tree-basic/tree.reel/tree.js
+++ b/js/components/ui/tree-basic/tree.reel/tree.js
@@ -21,6 +21,18 @@ exports.Tree = Montage.create(Component, {
value:true
},
+ expandTreeAfterDraw:{
+ writable:true,
+ enumerable:true,
+ value:false
+ },
+
+ highlightedUri:{
+ writable:true,
+ enumerable:true,
+ value:null
+ },
+
willDraw: {
enumerable: false,
value: function() {
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.css b/js/components/ui/tree-basic/treeItem.reel/treeItem.css
old mode 100644
new mode 100755
diff --git a/js/components/ui/tree-basic/treeItem.reel/treeItem.html b/js/components/ui/tree-basic/treeItem.reel/treeItem.html
old mode 100644
new mode 100755
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