From 984d65c818969ea3bef57ade9cbf5fc50d9a2316 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 6 Feb 2012 11:43:01 -0800
Subject: Tree Components - Adding the tree components
---
js/components/treeview/leaf.reel/leaf.css | 4 +++
js/components/treeview/leaf.reel/leaf.html | 38 ++++++++++++++++++++++++++
js/components/treeview/leaf.reel/leaf.js | 44 ++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+)
create mode 100644 js/components/treeview/leaf.reel/leaf.css
create mode 100644 js/components/treeview/leaf.reel/leaf.html
create mode 100644 js/components/treeview/leaf.reel/leaf.js
(limited to 'js/components/treeview/leaf.reel')
diff --git a/js/components/treeview/leaf.reel/leaf.css b/js/components/treeview/leaf.reel/leaf.css
new file mode 100644
index 00000000..fea5a2c4
--- /dev/null
+++ b/js/components/treeview/leaf.reel/leaf.css
@@ -0,0 +1,4 @@
+.leaf > .leaf-label {
+ opacity: 0.8;
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/js/components/treeview/leaf.reel/leaf.html b/js/components/treeview/leaf.reel/leaf.html
new file mode 100644
index 00000000..991a4323
--- /dev/null
+++ b/js/components/treeview/leaf.reel/leaf.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/components/treeview/leaf.reel/leaf.js b/js/components/treeview/leaf.reel/leaf.js
new file mode 100644
index 00000000..3a63f5ed
--- /dev/null
+++ b/js/components/treeview/leaf.reel/leaf.js
@@ -0,0 +1,44 @@
+/*
+This file contains proprietary software owned by Motorola Mobility, Inc.
+No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
+ */
+
+var Montage = require("montage/core/core").Montage,
+ Component = require("montage/ui/component").Component;
+ TreeNode = require("js/components/treeview/tree-node").TreeNode;
+
+exports.Leaf = Montage.create(TreeNode, {
+ hasTemplate: {
+ value: true
+ },
+ deserializedFromTemplate : {
+ value: function() {
+ //console.log('Leaf deserialized.');
+ }
+ },
+ templateDidLoad : {
+ value: function() {
+ //debugger;
+ console.log('Leaf\'s template did load.');
+ this.needsDraw = true;
+ }
+ },
+ prepareForDraw: {
+ value : function() {
+ console.log('Leafs prepare for draw.', this.labelKey);
+ }
+ },
+ draw : {
+ value : function() {
+ if(this.sourceObject[this.labelKey]) {
+ this._labelText = this.sourceObject[this.labelKey];
+ } else {
+ console.log("Label key unknown");
+ }
+
+ }
+ }
+
+
+});
--
cgit v1.2.3