diff options
Diffstat (limited to 'js/panels/css-panel/style.reel')
-rw-r--r-- | js/panels/css-panel/style.reel/style.css | 36 | ||||
-rw-r--r-- | js/panels/css-panel/style.reel/style.html | 57 | ||||
-rw-r--r-- | js/panels/css-panel/style.reel/style.js | 40 |
3 files changed, 133 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..4673ab69 --- /dev/null +++ b/js/panels/css-panel/style.reel/style.css | |||
@@ -0,0 +1,36 @@ | |||
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 | .style-item { | ||
8 | overflow: hidden; | ||
9 | white-space: nowrap; | ||
10 | text-overflow: ellipsis; | ||
11 | } | ||
12 | |||
13 | .css-property, .css-value { | ||
14 | border: 1px solid rgba(0,0,0,0); | ||
15 | border-radius: 2px; | ||
16 | margin: 0; | ||
17 | outline: none; | ||
18 | padding: 0 2px; | ||
19 | } | ||
20 | .css-property:after { | ||
21 | color: #333; | ||
22 | content: ":"; | ||
23 | } | ||
24 | .css-value:after { | ||
25 | content: ";"; | ||
26 | } | ||
27 | .css-property { | ||
28 | display: inline-block; | ||
29 | color: rgb(200,0,0); | ||
30 | max-width: 68%; | ||
31 | overflow: hidden; | ||
32 | text-overflow: ellipsis; | ||
33 | } | ||
34 | .css-value { | ||
35 | display: inline; | ||
36 | } \ 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..f636ef6b --- /dev/null +++ b/js/panels/css-panel/style.reel/style.html | |||
@@ -0,0 +1,57 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No 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" class="style-item"> | ||
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 | |||
7 | var Montage = require("montage/core/core").Montage, | ||
8 | TreeNode = require("js/components/treeview/tree-node").TreeNode; | ||
9 | |||
10 | exports.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 | ||