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.css | 23 +++++++++++++ js/panels/css-panel/style.reel/style.html | 57 +++++++++++++++++++++++++++++++ js/panels/css-panel/style.reel/style.js | 40 ++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 js/panels/css-panel/style.reel/style.css create mode 100644 js/panels/css-panel/style.reel/style.html create mode 100644 js/panels/css-panel/style.reel/style.js (limited to 'js/panels/css-panel/style.reel') diff --git a/js/panels/css-panel/style.reel/style.css b/js/panels/css-panel/style.reel/style.css new file mode 100644 index 00000000..7aa67e55 --- /dev/null +++ b/js/panels/css-panel/style.reel/style.css @@ -0,0 +1,23 @@ +/* + 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. +
*/ + +.css-property, .css-value { + border: 1px solid rgba(0,0,0,0); + border-radius: 2px; + margin: 0; + outline: none; + padding: 0 2px; +} +.css-property { + display: inline-block; + color: rgb(200,0,0); + max-width: 68%; + overflow: hidden; + text-overflow: ellipsis; +} +.css-value { + display: inline; +} \ No newline at end of file diff --git a/js/panels/css-panel/style.reel/style.html b/js/panels/css-panel/style.reel/style.html new file mode 100644 index 00000000..bd911f34 --- /dev/null +++ b/js/panels/css-panel/style.reel/style.html @@ -0,0 +1,57 @@ + + + + + + + + + +
+
+
+
+ + \ No newline at end of file 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