aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheets-view.reel
diff options
context:
space:
mode:
authorEric Guzman2012-02-22 23:16:23 -0800
committerEric Guzman2012-02-22 23:16:23 -0800
commit1c528b42f9b1c9be9197921586388c3a3bdc5c17 (patch)
tree3d8ffc876a9730bf8fa3e0b394922ccbebae15ef /js/panels/css-panel/style-sheets-view.reel
parentbd7bc833895391e4974b8746f31f63ba70689df3 (diff)
downloadninja-1c528b42f9b1c9be9197921586388c3a3bdc5c17.tar.gz
CSS Panel Update - Adding montage objects for css panel
Diffstat (limited to 'js/panels/css-panel/style-sheets-view.reel')
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css0
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html68
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js45
3 files changed, 113 insertions, 0 deletions
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
new file mode 100644
index 00000000..78836f21
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -0,0 +1,68 @@
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 <script type="text/montage-serialization">
11 {
12 "owner": {
13 "module" : "js/panels/css-panel/style-sheets-view.reel",
14 "name" : "StyleSheetsView",
15 "properties" : {
16 "element" : {"#" : "style-sheet-view-container"}
17 }
18 },
19 "styleSheetList": {
20 "module" : "montage/ui/list.reel",
21 "name": "List",
22 "properties": {
23 "element": {"#": "sheet-list" }
24 },
25 "bindings": {
26 "content": {
27 "boundObject": {"@": "owner" },
28 "boundObjectPropertyPath": "styleSheets"
29 }
30 }
31 },
32 "sheet": {
33 "module": "js/panels/css-panel/style-sheet.reel",
34 "name": "StyleSheet",
35 "bindings": {
36 "source": {
37 "boundObject": {"@": "styleSheetList"},
38 "boundObjectPropertyPath": "objectAtCurrentIteration",
39 "oneway": true
40 }
41 }
42 },
43 "noDocumentCondition": {
44 "module": "montage/ui/condition.reel",
45 "name": "Condition",
46 "properties": {
47 "element": {"#": "no-document-message" }
48 },
49 "bindings": {
50 "condition": {
51 "boundObject": {"@": "owner" },
52 "boundObjectPropertyPath": "noDocumentCondition",
53 "oneway": true
54 }
55 }
56 }
57 }
58 </script>
59</head>
60<body>
61<div id="style-sheet-view-container" class="style-sheet-view-container">
62 <h3 id="no-document-message">No document loaded. Please Open or Create a new document.</h3>
63 <ul id="sheet-list">
64 <li id="sheet-item"></li>
65 </ul>
66</div>
67</body>
68</html> \ No newline at end of file
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
new file mode 100644
index 00000000..f93de830
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -0,0 +1,45 @@
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 Component = require("montage/ui/component").Component;
9
10exports.StyleSheetsView = Montage.create(Component, {
11 noDocumentCondition : {
12 value: true
13 },
14 styleSheets : {
15 value: []
16 },
17 stylesController : {
18 value: null
19 },
20 deserializedFromTemplate : {
21 value: function() {
22 console.log("style sheet view - deserialized");
23
24 this.stylesController = this.application.ninja.stylesController;
25
26 this.eventManager.addEventListener("styleSheetsReady", this, false);
27 }
28 },
29 handleStyleSheetsReady : {
30 value: function(e) {
31 //this.styleSheets = null;
32 this.styleSheets = this.stylesController.userStyleSheets;
33 }
34 },
35 prepareForDraw : {
36 value: function() {
37 console.log("style sheet view - prepare for draw");
38 }
39 },
40 draw : {
41 value: function() {
42 console.log("styles sheet view - draw");
43 }
44 }
45}); \ No newline at end of file