aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheets-view.reel
diff options
context:
space:
mode:
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.html77
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js49
3 files changed, 126 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..d1dbfa2b
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -0,0 +1,77 @@
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 "arrayController" : {
20 "module" : "montage/ui/controller/array-controller",
21 "name": "ArrayController",
22 "bindings": {
23 "content": {
24 "boundObject": {"@": "owner"},
25 "boundObjectPropertyPath": "styleSheets",
26 "oneway": true
27 }
28 }
29 },
30 "styleSheetList": {
31 "module" : "montage/ui/list.reel",
32 "name": "List",
33 "properties": {
34 "element": {"#": "sheet-list" },
35 "contentController": {"@": "arrayController"}
36 }
37 },
38 "sheet": {
39 "module": "js/panels/css-panel/style-sheet.reel",
40 "name": "StyleSheet",
41 "properties": {
42 "element": {"#": "sheet-item"}
43 },
44 "bindings": {
45 "source": {
46 "boundObject": {"@": "styleSheetList"},
47 "boundObjectPropertyPath": "objectAtCurrentIteration",
48 "oneway": true
49 }
50 }
51 },
52 "noDocumentCondition": {
53 "module": "montage/ui/condition.reel",
54 "name": "Condition",
55 "properties": {
56 "element": {"#": "no-document-message" }
57 },
58 "bindings": {
59 "condition": {
60 "boundObject": {"@": "owner" },
61 "boundObjectPropertyPath": "noDocumentCondition",
62 "oneway": true
63 }
64 }
65 }
66 }
67 </script>
68</head>
69<body>
70<div id="style-sheet-view-container" class="style-sheet-view-container">
71 <h3 id="no-document-message">No document loaded. Please Open or Create a new document.</h3>
72 <ul id="sheet-list">
73 <li><div id="sheet-item"></div></li>
74 </ul>
75</div>
76</body>
77</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..f8826b18
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -0,0 +1,49 @@
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.noDocumentCondition = false;
32
33 this.stylesController.userStyleSheets.forEach(function(sheet) {
34 this.styleSheets.push(sheet);
35 }, this);
36
37 }
38 },
39 prepareForDraw : {
40 value: function() {
41 console.log("style sheet view - prepare for draw");
42 }
43 },
44 draw : {
45 value: function() {
46 console.log("styles sheet view - draw");
47 }
48 }
49}); \ No newline at end of file