aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style.reel
diff options
context:
space:
mode:
authorEric Guzman2012-03-12 15:29:37 -0700
committerEric Guzman2012-03-12 15:29:37 -0700
commit7a28932ba8a7517bbaaabe1f5edf678416aafc9c (patch)
treefa1cb39de4a3bf9bc3a5a7c5db043e55cee64975 /js/panels/css-panel/style.reel
parentec862af55e5c3d564b37eac2744a1a6815f81f4d (diff)
downloadninja-7a28932ba8a7517bbaaabe1f5edf678416aafc9c.tar.gz
CSS Panel - Adding declaration, style (tree leaf), and style shorthand (tree branch) components
Diffstat (limited to 'js/panels/css-panel/style.reel')
-rw-r--r--js/panels/css-panel/style.reel/style.css23
-rw-r--r--js/panels/css-panel/style.reel/style.html57
-rw-r--r--js/panels/css-panel/style.reel/style.js40
3 files changed, 120 insertions, 0 deletions
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 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7.css-property, .css-value {
8 border: 1px solid rgba(0,0,0,0);
9 border-radius: 2px;
10 margin: 0;
11 outline: none;
12 padding: 0 2px;
13}
14.css-property {
15 display: inline-block;
16 color: rgb(200,0,0);
17 max-width: 68%;
18 overflow: hidden;
19 text-overflow: ellipsis;
20}
21.css-value {
22 display: inline;
23} \ 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 @@
1<!DOCTYPE html>
2<!-- <copyright>
3This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6</copyright> -->
7<html lang="en">
8<head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link href="style.css" type="text/css" rel="stylesheet" media="screen">
11 <script type="text/montage-serialization">
12 {
13 "owner": {
14 "module" : "js/panels/css-panel/style.reel",
15 "name" : "Style",
16 "properties" : {
17 "element" : {"#" : "container"}
18 }
19 },
20 "property": {
21 "module": "montage/ui/dynamic-text.reel",
22 "name": "DynamicText",
23 "properties": {
24 "element": {"#": "property"}
25 },
26 "bindings": {
27 "value" : {
28 "boundObject": {"@": "owner"},
29 "boundObjectPropertyPath": "propertyText",
30 "oneway": true
31 }
32 }
33 },
34 "value": {
35 "module": "montage/ui/dynamic-text.reel",
36 "name": "DynamicText",
37 "properties": {
38 "element": {"#": "value"}
39 },
40 "bindings": {
41 "value" : {
42 "boundObject": {"@": "owner"},
43 "boundObjectPropertyPath": "valueText",
44 "oneway": true
45 }
46 }
47 }
48 }
49 </script>
50</head>
51<body>
52<div id="container">
53 <dt id="property" class="css-property"></dt>
54 <dd id="value" class="css-value"></dd>
55</div>
56</body>
57</html> \ 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 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 TreeNode = require("js/components/treeview/tree-node").TreeNode;
9
10exports.Style = Montage.create(TreeNode, {
11 propertyText : {
12 value: "property"
13 },
14 valueText : {
15 value: "value"
16 },
17 handleSourceObjectSet: {
18 value: function() {
19 //debugger;
20 this.propertyText = this.sourceObject.name;
21 this.valueText = this.sourceObject.value;
22 }
23 },
24 templateDidLoad : {
25 value: function() {
26 console.log("style - template did load");
27 }
28 },
29 draw : {
30 value : function() {
31 //debugger;
32 if(this.sourceObject[this.labelKey]) {
33 this._labelText = this.sourceObject[this.labelKey];
34 } else {
35 console.log("Label key unknown");
36 }
37
38 }
39 }
40}); \ No newline at end of file