diff options
Diffstat (limited to 'js/panels/css-panel/style-sheets-view.reel')
3 files changed, 402 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..a6e83a2c --- /dev/null +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css | |||
@@ -0,0 +1,53 @@ | |||
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-sheets-view-container { | ||
8 | position: relative; | ||
9 | overflow: hidden; | ||
10 | } | ||
11 | |||
12 | .style-sheets-view-container .sheet-list { | ||
13 | margin: 0; | ||
14 | padding: 0; | ||
15 | min-height: 35px; | ||
16 | -webkit-box-flex: 1; | ||
17 | overflow-y: auto; | ||
18 | overflow-x: hidden; | ||
19 | } | ||
20 | .style-sheets-view-container .sheet-list li { | ||
21 | list-style-type: none; | ||
22 | margin: 0 8px; | ||
23 | } | ||
24 | .style-sheets-view-container .sheet-list li:first-child { | ||
25 | margin-top: 5px; | ||
26 | } | ||
27 | .style-sheets-view-container .sheet-list li:last-child { | ||
28 | margin-bottom: 5px; | ||
29 | } | ||
30 | |||
31 | /* --------------- | ||
32 | Toolbar | ||
33 | ------------------- */ | ||
34 | |||
35 | .style-sheets-toolbar-container { | ||
36 | /*bottom: 0;*/ | ||
37 | height: 24px; | ||
38 | /*position: absolute;*/ | ||
39 | width: 100%; | ||
40 | -webkit-box-flex: 0; | ||
41 | } | ||
42 | |||
43 | /* ------------------ | ||
44 | Resizer | ||
45 | ------------------ */ | ||
46 | |||
47 | .sub-panel-resizer { | ||
48 | bottom: 0; | ||
49 | cursor: row-resize; | ||
50 | height: 4px; | ||
51 | position: absolute; | ||
52 | width: 100%; | ||
53 | } \ No newline at end of file | ||
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..d01d40e0 --- /dev/null +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html | |||
@@ -0,0 +1,134 @@ | |||
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-sheets-view.css" rel="stylesheet" type="text/css"> | ||
11 | <script type="text/montage-serialization"> | ||
12 | { | ||
13 | "owner": { | ||
14 | "module" : "js/panels/css-panel/style-sheets-view.reel", | ||
15 | "name" : "StyleSheetsView", | ||
16 | "properties" : { | ||
17 | "element" : {"#" : "style-sheets-view-container"}, | ||
18 | "styleSheetList" : {"@" : "styleSheetList"} | ||
19 | } | ||
20 | }, | ||
21 | "arrayController" : { | ||
22 | "module" : "montage/ui/controller/array-controller", | ||
23 | "name": "ArrayController", | ||
24 | "bindings": { | ||
25 | "content": { | ||
26 | "boundObject": {"@": "owner"}, | ||
27 | "boundObjectPropertyPath": "styleSheets", | ||
28 | "oneway": true | ||
29 | } | ||
30 | } | ||
31 | }, | ||
32 | "styleSheetList": { | ||
33 | "module" : "montage/ui/repetition.reel", | ||
34 | "name": "Repetition", | ||
35 | "properties": { | ||
36 | "element": {"#": "sheet-list" }, | ||
37 | "contentController": {"@": "arrayController"} | ||
38 | } | ||
39 | }, | ||
40 | "sheet": { | ||
41 | "module": "js/panels/css-panel/style-sheet.reel", | ||
42 | "name": "StyleSheet", | ||
43 | "properties": { | ||
44 | "element": {"#": "sheet-item"} | ||
45 | }, | ||
46 | "bindings": { | ||
47 | "source": { | ||
48 | "boundObject": {"@": "styleSheetList"}, | ||
49 | "boundObjectPropertyPath": "objectAtCurrentIteration", | ||
50 | "oneway": true | ||
51 | } | ||
52 | } | ||
53 | }, | ||
54 | "noDocumentCondition": { | ||
55 | "module": "montage/ui/condition.reel", | ||
56 | "name": "Condition", | ||
57 | "properties": { | ||
58 | "element": {"#": "no-document-message" } | ||
59 | }, | ||
60 | "bindings": { | ||
61 | "condition": { | ||
62 | "boundObject": {"@": "owner" }, | ||
63 | "boundObjectPropertyPath": "styleSheets.count()", | ||
64 | "boundValueMutator": {"->": {"arguments": ["val"], "body": "return !val;"}}, | ||
65 | "oneway": true | ||
66 | } | ||
67 | } | ||
68 | }, | ||
69 | "showToolbarCondition": { | ||
70 | "module": "montage/ui/condition.reel", | ||
71 | "name": "Condition", | ||
72 | "properties": { | ||
73 | "element": {"#": "style-sheets-toolbar-container" } | ||
74 | }, | ||
75 | "bindings" : { | ||
76 | "condition": { | ||
77 | "boundObject": {"@": "owner"}, | ||
78 | "boundObjectPropertyPath": "styleSheets.count()", | ||
79 | "oneway": true | ||
80 | } | ||
81 | } | ||
82 | }, | ||
83 | "toolbar": { | ||
84 | "module": "js/components/toolbar.reel", | ||
85 | "name": "Toolbar", | ||
86 | "properties": { | ||
87 | "element": {"#": "style-sheets-toolbar"}, | ||
88 | "delegate": {"@": "owner" }, | ||
89 | "buttons": [ | ||
90 | { | ||
91 | "title": "Add", | ||
92 | "identifier": "add" | ||
93 | } | ||
94 | ] | ||
95 | } | ||
96 | }, | ||
97 | "resizer": { | ||
98 | "module": "js/panels/resize-composer", | ||
99 | "name": "ResizeComposer", | ||
100 | "properties": { | ||
101 | "element": {"#": "resizeBar"}, | ||
102 | "component": {"@": "owner"} | ||
103 | }, | ||
104 | "listeners": [ | ||
105 | { | ||
106 | "type": "resizeStart", | ||
107 | "listener": {"@": "owner"} | ||
108 | }, | ||
109 | { | ||
110 | "type": "resizeMove", | ||
111 | "listener": {"@": "owner"} | ||
112 | }, | ||
113 | { | ||
114 | "type": "resizeEnd", | ||
115 | "listener": {"@": "owner"} | ||
116 | } | ||
117 | ] | ||
118 | } | ||
119 | } | ||
120 | </script> | ||
121 | </head> | ||
122 | <body> | ||
123 | <div data-montage-id="style-sheets-view-container" class="style-sheets-view-container"> | ||
124 | <h4 data-montage-id="no-document-message" class="panel-message">No style sheets to display.</h4> | ||
125 | <ul data-montage-id="sheet-list" class="sheet-list"> | ||
126 | <li><div data-montage-id="sheet-item"></div></li> | ||
127 | </ul> | ||
128 | <div data-montage-id="style-sheets-toolbar-container" class="style-sheets-toolbar-container"> | ||
129 | <div data-montage-id="style-sheets-toolbar"></div> | ||
130 | </div> | ||
131 | <div data-montage-id="resizeBar" class="sub-panel-resizer"></div> | ||
132 | </div> | ||
133 | </body> | ||
134 | </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..7902f80a --- /dev/null +++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js | |||
@@ -0,0 +1,215 @@ | |||
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.StyleSheetsView = Montage.create(Component, { | ||
11 | noDocumentCondition : { value: true }, | ||
12 |