diff options
author | Eric Guzman | 2012-02-22 23:16:23 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-22 23:16:23 -0800 |
commit | 1c528b42f9b1c9be9197921586388c3a3bdc5c17 (patch) | |
tree | 3d8ffc876a9730bf8fa3e0b394922ccbebae15ef /js | |
parent | bd7bc833895391e4974b8746f31f63ba70689df3 (diff) | |
download | ninja-1c528b42f9b1c9be9197921586388c3a3bdc5c17.tar.gz |
CSS Panel Update - Adding montage objects for css panel
Diffstat (limited to 'js')
13 files changed, 421 insertions, 0 deletions
diff --git a/js/panels/css-panel/css-panel-container.js b/js/panels/css-panel/css-panel-container.js new file mode 100644 index 00000000..aeaa2d13 --- /dev/null +++ b/js/panels/css-panel/css-panel-container.js | |||
@@ -0,0 +1,15 @@ | |||
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 | var PanelBase = require("js/panels/PanelBase").PanelBase; | ||
9 | var Content = require("js/panels/css-panel/css-panel.reel").CSSPanelNew; | ||
10 | |||
11 | exports.CSSPanelContainer = Montage.create(PanelBase, { | ||
12 | panelName : { value: "CSSPanelNew" }, | ||
13 | minHeight : { value: 200 }, | ||
14 | content : { value: Content } | ||
15 | }); \ No newline at end of file | ||
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.css b/js/panels/css-panel/css-panel.reel/css-panel.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/js/panels/css-panel/css-panel.reel/css-panel.css | |||
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.html b/js/panels/css-panel/css-panel.reel/css-panel.html new file mode 100644 index 00000000..cc1876c3 --- /dev/null +++ b/js/panels/css-panel/css-panel.reel/css-panel.html | |||
@@ -0,0 +1,45 @@ | |||
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 rel="stylesheet" href="css-panel.css" type="text/css"> | ||
11 | <script type="text/montage-serialization"> | ||
12 | { | ||
13 | "owner": { | ||
14 | "module" : "js/panels/css-panel/css-panel.reel", | ||
15 | "name" : "CSSPanel", | ||
16 | "properties" : { | ||
17 | "element" : {"#" : "container"} | ||
18 | } | ||
19 | }, | ||
20 | "styleSheetView": { | ||
21 | "module" : "js/panels/css-panel/style-sheets-view.reel", | ||
22 | "name": "StyleSheetsView", | ||
23 | "properties": { | ||
24 | "element": {"#": "style-sheet-view" } | ||
25 | } | ||
26 | }, | ||
27 | "stylesViewContainer": { | ||
28 | "module" : "js/panels/css-panel/styles-view-container.reel", | ||
29 | "name": "StyleSheetView", | ||
30 | "properties": { | ||
31 | "element": {"#": "css-styles-view" } | ||
32 | } | ||
33 | } | ||
34 | } | ||
35 | </script> | ||
36 | </head> | ||
37 | <body> | ||
38 | <section id="container" class="css-panel"> | ||
39 | <h2>Style Sheets</h2> | ||
40 | <div id="style-sheet-view"></div> | ||
41 | <h2>Styles</h2> | ||
42 | <div id="styles-view-container"></div> | ||
43 | </section> | ||
44 | </body> | ||
45 | </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 new file mode 100644 index 00000000..a593f1c4 --- /dev/null +++ b/js/panels/css-panel/css-panel.reel/css-panel.js | |||
@@ -0,0 +1,33 @@ | |||
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 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.CSSPanelNew = Montage.create(Component, { | ||
11 | hasTemplate: { | ||
12 | value: true | ||
13 | }, | ||
14 | condition: { | ||
15 | value: false | ||
16 | }, | ||
17 | templateDidLoad : { | ||
18 | value: function() { | ||
19 | console.log("css panel : template did load"); | ||
20 | //this.condition = true; | ||
21 | } | ||
22 | }, | ||
23 | prepareForDraw : { | ||
24 | value: function() { | ||
25 | console.log("css panel : prepare for draw"); | ||
26 | } | ||
27 | }, | ||
28 | draw : { | ||
29 | value: function() { | ||
30 | console.log("css panel : draw"); | ||
31 | } | ||
32 | } | ||
33 | }); | ||
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.css b/js/panels/css-panel/style-sheet.reel/style-sheet.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.css | |||
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html new file mode 100644 index 00000000..4fb94335 --- /dev/null +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html | |||
@@ -0,0 +1,42 @@ | |||
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 | <script type="text/montage-serialization"> | ||
11 | { | ||
12 | "owner": { | ||
13 | "module" : "js/panels/css-panel/style-sheet.reel", | ||
14 | "name" : "StyleSheet", | ||
15 | "properties" : { | ||
16 | "element" : {"#" : "style-sheet-container"} | ||
17 | } | ||
18 | }, | ||
19 | "name": { | ||
20 | "module": "montage/ui/dynamic-text.reel", | ||
21 | "name": "DynamicText", | ||
22 | "properties": { | ||
23 | "element": {"#": "sheet-name"} | ||
24 | }, | ||
25 | "bindings": { | ||
26 | "value": { | ||
27 | "boundObject": {"@": "owner"}, | ||
28 | "boundObjectPropertyPath": "name", | ||
29 | "onewway": true | ||
30 | } | ||
31 | } | ||
32 | |||
33 | } | ||
34 | } | ||
35 | </script> | ||
36 | </head> | ||
37 | <body> | ||
38 | <div id="style-sheet-container" class="style-sheet-container"> | ||
39 | <span id="sheet-name"></span> | ||
40 | </div> | ||
41 | </body> | ||
42 | </html> \ No newline at end of file | ||
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js new file mode 100644 index 00000000..daa614c2 --- /dev/null +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js | |||
@@ -0,0 +1,52 @@ | |||
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 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.StyleSheet = Montage.create(Component, { | ||
11 | deserializedFromTemplate : { | ||
12 | value: function() { | ||
13 | console.log("style sheet view - deserialized"); | ||
14 | } | ||
15 | }, | ||
16 | prepareForDraw : { | ||
17 | value: function() { | ||
18 | console.log("style sheet view - prepare for draw"); | ||
19 | } | ||
20 | }, | ||
21 | draw : { | ||
22 | value: function() { | ||
23 | console.log("styles sheet view - draw"); | ||
24 | } | ||
25 | }, | ||
26 | _name: { | ||
27 | value: null | ||
28 | }, | ||
29 | name : { | ||
30 | get: function() { | ||
31 | return this._name; | ||
32 | }, | ||
33 | set: function(text) { | ||
34 | this._name = text; | ||
35 | } | ||
36 | }, | ||
37 | _styleSheet : { | ||
38 | value: null | ||
39 | }, | ||
40 | styleSheet : { | ||
41 | get: function() { | ||
42 | return this._styleSheet; | ||
43 | }, | ||
44 | set: function(sheet) { | ||
45 | if(sheet.href) { | ||
46 | this.name = sheet.href.substring(sheet.href.lastIndexOf('/')); | ||
47 | } else { | ||
48 | this.name = 'Style Tag'; | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | }); \ No newline at end of file | ||
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css b/js/ |