From 7a28932ba8a7517bbaaabe1f5edf678416aafc9c Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 12 Mar 2012 15:29:37 -0700 Subject: CSS Panel - Adding declaration, style (tree leaf), and style shorthand (tree branch) components --- js/panels/css-panel/style.reel/style.js | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 js/panels/css-panel/style.reel/style.js (limited to 'js/panels/css-panel/style.reel/style.js') diff --git a/js/panels/css-panel/style.reel/style.js b/js/panels/css-panel/style.reel/style.js new file mode 100644 index 00000000..6860a97f --- /dev/null +++ b/js/panels/css-panel/style.reel/style.js @@ -0,0 +1,40 @@ +/* + 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, + TreeNode = require("js/components/treeview/tree-node").TreeNode; + +exports.Style = Montage.create(TreeNode, { + propertyText : { + value: "property" + }, + valueText : { + value: "value" + }, + handleSourceObjectSet: { + value: function() { + //debugger; + this.propertyText = this.sourceObject.name; + this.valueText = this.sourceObject.value; + } + }, + templateDidLoad : { + value: function() { + console.log("style - template did load"); + } + }, + draw : { + value : function() { + //debugger; + if(this.sourceObject[this.labelKey]) { + this._labelText = this.sourceObject[this.labelKey]; + } else { + console.log("Label key unknown"); + } + + } + } +}); \ No newline at end of file -- cgit v1.2.3