diff options
author | Eric Guzman | 2012-05-22 14:28:00 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-22 14:28:00 -0700 |
commit | 1c3da2901f454ad2c18e20216bb2517740a1c080 (patch) | |
tree | f91f102be89eb01362da1a7d209deecb98b413a9 /js/panels/css-panel | |
parent | 70a85334144a9516fdec7b09eb5c9856230d12f1 (diff) | |
download | ninja-1c3da2901f454ad2c18e20216bb2517740a1c080.tar.gz |
CSS Panel - Update components to use new serialization format
Diffstat (limited to 'js/panels/css-panel')
12 files changed, 57 insertions, 157 deletions
diff --git a/js/panels/css-panel/css-panel-container.js b/js/panels/css-panel/css-panel-container.js index 6110c999..08673309 100644 --- a/js/panels/css-panel/css-panel-container.js +++ b/js/panels/css-panel/css-panel-container.js | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage; | 7 | var Montage = require("montage/core/core").Montage; |
8 | var PanelBase = require("js/panels/PanelBase").PanelBase; | 8 | var PanelBase = require("js/panels/PanelBase").PanelBase; |
9 | var Content = require("js/panels/css-panel/css-panel.reel").CSSPanelNew; | 9 | var Content = require("js/panels/css-panel/css-panel.reel").CssPanel; |
10 | 10 | ||
11 | exports.CSSPanelContainer = Montage.create(PanelBase, { | 11 | exports.CSSPanelContainer = Montage.create(PanelBase, { |
12 | panelName : { value: "CSS Panel" }, | 12 | panelName : { value: "CSS Panel" }, |
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.html b/js/panels/css-panel/css-panel.reel/css-panel.html index 54bb1fae..42dca8a2 100644 --- a/js/panels/css-panel/css-panel.reel/css-panel.html +++ b/js/panels/css-panel/css-panel.reel/css-panel.html | |||
@@ -11,8 +11,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
11 | <script type="text/montage-serialization"> | 11 | <script type="text/montage-serialization"> |
12 | { | 12 | { |
13 | "owner": { | 13 | "owner": { |
14 | "module" : "js/panels/css-panel/css-panel.reel", | 14 | "prototype" : "js/panels/css-panel/css-panel.reel", |
15 | "name" : "CSSPanelNew", | ||
16 | "properties" : { | 15 | "properties" : { |
17 | "element" : {"#" : "container"}, | 16 | "element" : {"#" : "container"}, |
18 | "styleSheetsView": {"@": "styleSheetsView"}, | 17 | "styleSheetsView": {"@": "styleSheetsView"}, |
@@ -21,16 +20,14 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
21 | }, | 20 | }, |
22 | 21 | ||
23 | "styleSheetsView": { | 22 | "styleSheetsView": { |
24 | "module" : "js/panels/css-panel/style-sheets-view.reel", | 23 | "prototype" : "js/panels/css-panel/style-sheets-view.reel", |
25 | "name": "StyleSheetsView", | ||
26 | "properties": { | 24 | "properties": { |
27 | "element": {"#": "style-sheet-view" }, | 25 | "element": {"#": "style-sheet-view" }, |
28 | "documentNameLabel": {"#": "document-name" } | 26 | "documentNameLabel": {"#": "document-name" } |
29 | } | 27 | } |
30 | }, | 28 | }, |
31 | "stylesViewContainer": { | 29 | "stylesViewContainer": { |
32 | "module" : "js/panels/css-panel/styles-view-container.reel", | 30 | "prototype" : "js/panels/css-panel/styles-view-container.reel", |
33 | "name": "StylesViewContainer", | ||
34 | "properties": { | 31 | "properties": { |
35 | "element": {"#": "styles-view-container" }, | 32 | "element": {"#": "styles-view-container" }, |
36 | "selectionName": {"@": "selectionName" } | 33 | "selectionName": {"@": "selectionName" } |
@@ -42,22 +39,18 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
42 | "element": {"#":"selection-name"} | 39 | "element": {"#":"selection-name"} |
43 | }, | 40 | }, |
44 | "bindings": { | 41 | "bindings": { |
45 | "value" : { | 42 | "value" : {"<-": "@stylesViewContainer.selectionNameLabelText" } |
46 | "boundObject": {"@": "stylesViewContainer"}, | ||
47 | "boundObjectPropertyPath": "selectionNameLabelText", | ||
48 | "oneway": true | ||
49 | } | ||
50 | } | 43 | } |
51 | } | 44 | } |
52 | } | 45 | } |
53 | </script> | 46 | </script> |
54 | </head> | 47 | </head> |
55 | <body> | 48 | <body> |
56 | <section id="container" class="css-panel"> | 49 | <section data-montage-id="container" class="css-panel"> |
57 | <h3>Style Sheets <span data-montage-id="document-name" class="document-name"></span></h3> | 50 | <h3>Style Sheets <span data-montage-id="document-name" class="document-name"></span></h3> |
58 | <div id="style-sheet-view"></div> | 51 | <div data-montage-id="style-sheet-view"></div> |
59 | <h3>Styles <span data-montage-id="selection-name" class="selection-name"></span></h3> | 52 | <h3>Styles <span data-montage-id="selection-name" class="selection-name"></span></h3> |
60 | <div id="styles-view-container"></div> | 53 | <div data-montage-id="styles-view-container"></div> |
61 | </section> | 54 | </section> |
62 | </body> | 55 | </body> |
63 | </html> \ No newline at end of file | 56 | </html> \ No newline at end of file |
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.js b/js/panels/css-panel/css-panel.reel/css-panel.js index 4a2062af..a117787e 100644 --- a/js/panels/css-panel/css-panel.reel/css-panel.js +++ b/js/panels/css-panel/css-panel.reel/css-panel.js | |||
@@ -7,7 +7,7 @@ | |||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | exports.CSSPanelNew = Montage.create(Component, { | 10 | exports.CssPanel = Montage.create(Component, { |
11 | prepareForDraw : { | 11 | prepareForDraw : { |
12 | value: function() { | 12 | value: function() { |
13 | } | 13 | } |
diff --git a/js/panels/css-panel/css-style.reel/css-style.html b/js/panels/css-panel/css-style.reel/css-style.html index c4b6dd59..00cebf39 100644 --- a/js/panels/css-panel/css-style.reel/css-style.html +++ b/js/panels/css-panel/css-style.reel/css-style.html | |||
@@ -11,8 +11,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
11 | <script type="text/montage-serialization"> | 11 | <script type="text/montage-serialization"> |
12 | { | 12 | { |
13 | "owner": { | 13 | "owner": { |
14 | "module" : "js/panels/css-panel/css-style.reel", | 14 | "prototype" : "js/panels/css-panel/css-style.reel", |
15 | "name" : "CssStyle", | ||
16 | "properties" : { | 15 | "properties" : { |
17 | "element" : {"#" : "container"}, | 16 | "element" : {"#" : "container"}, |
18 | "addStyleButton": {"#": "add-style-button"}, | 17 | "addStyleButton": {"#": "add-style-button"}, |
@@ -25,34 +24,24 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
25 | "object": "js/panels/CSSPanel/css-property-name-list" | 24 | "object": "js/panels/CSSPanel/css-property-name-list" |
26 | }, | 25 | }, |
27 | "checkbox": { | 26 | "checkbox": { |
28 | "module": "montage/ui/checkbox.reel", | 27 | "prototype": "montage/ui/checkbox.reel", |
29 | "name": "Checkbox", | ||
30 | "properties": { | 28 | "properties": { |
31 | "element": {"#": "disable-checkbox"}, | 29 | "element": {"#": "disable-checkbox"}, |
32 | "checked": true | 30 | "checked": true |
33 | }, | 31 | }, |
34 | "bindings": { | 32 | "bindings": { |
35 | "checked" : { | 33 | "checked" : {"<<->": "@owner.enabled" } |
36 | "boundObject": {"@": "owner"}, | ||
37 | "boundObjectPropertyPath": "enabled", | ||
38 | "oneway": false | ||
39 | } | ||
40 | } | 34 | } |
41 | }, | 35 | }, |
42 | "property": { | 36 | "property": { |
43 | "module": "js/components/hintable.reel", | 37 | "prototype": "js/components/hintable.reel", |
44 | "name": "Hintable", | ||
45 | "properties": { | 38 | "properties": { |
46 | "startOnEvent": "click", | 39 | "startOnEvent": "click", |
47 | "element": {"#": "property"}, | 40 | "element": {"#": "property"}, |
48 | "identifier": "property" | 41 | "identifier": "property" |
49 | }, | 42 | }, |
50 | "bindings": { | 43 | "bindings": { |
51 | "value" : { | 44 | "value" : {"<-": "@owner.propertyText" } |
52 | "boundObject": {"@": "owner"}, | ||
53 | "boundObjectPropertyPath": "propertyText", | ||
54 | "oneway": true | ||
55 | } | ||
56 | }, | 45 | }, |
57 | "listeners": [ | 46 | "listeners": [ |
58 | { | 47 | { |
@@ -66,19 +55,14 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
66 | ] | 55 | ] |
67 | }, | 56 | }, |
68 | "value": { | 57 | "value": { |
69 | "module": "js/components/hintable.reel", | 58 | "prototype": "js/components/hintable.reel", |
70 | "name": "Hintable", | ||
71 | "properties": { | 59 | "properties": { |
72 | "startOnEvent": "click", | 60 | "startOnEvent": "click", |
73 | "element": {"#": "value"}, | 61 | "element": {"#": "value"}, |
74 | "identifier": "value" | 62 | "identifier": "value" |
75 | }, | 63 | }, |
76 | "bindings": { | 64 | "bindings": { |
77 | "value" : { | 65 | "value" : {"<-": "@owner.valueText" } |
78 | "boundObject": {"@": "owner"}, | ||
79 | "boundObjectPropertyPath": "valueText", | ||
80 | "oneway": true | ||
81 | } | ||
82 | }, | 66 | }, |
83 | "listeners": [ | 67 | "listeners": [ |
84 | { | 68 | { |
@@ -95,7 +79,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
95 | </script> | 79 | </script> |
96 | </head> | 80 | </head> |
97 | <body>< |