aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/components/toolbar.reel/toolbar.css14
-rw-r--r--js/components/toolbar.reel/toolbar.html34
-rw-r--r--js/components/toolbar.reel/toolbar.js27
-rwxr-xr-xjs/controllers/styles-controller.js12
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.js4
-rw-r--r--js/panels/css-panel/css-panel-container.js2
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.css49
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.html7
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.js7
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.css5
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html57
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js48
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.css29
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.html85
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js100
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.css49
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.html36
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js9
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css19
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html38
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js27
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.css34
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.html71
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js133
24 files changed, 825 insertions, 71 deletions
diff --git a/js/components/toolbar.reel/toolbar.css b/js/components/toolbar.reel/toolbar.css
new file mode 100644
index 00000000..1ffae912
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.css
@@ -0,0 +1,14 @@
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.toolbar-container {
7 background-color: #474747;
8 border-bottom: 1px solid #333;
9 border-top: 1px solid #505050;
10 box-shadow: 0 4px 8px 0px rgba(0,0,0,0.75);
11 height: 22px;
12 width: 100%;
13 -webkit-box-flex: 0;
14} \ No newline at end of file
diff --git a/js/components/toolbar.reel/toolbar.html b/js/components/toolbar.reel/toolbar.html
new file mode 100644
index 00000000..8ccce126
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.html
@@ -0,0 +1,34 @@
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 <link href="toolbar.css" rel="stylesheet" type="text/css">
11 <script type="text/montage-serialization">
12 {
13 "owner": {
14 "module" : "js/panels/css-panel/style-sheet.reel",
15 "name" : "StyleSheet",
16 "properties" : {
17 "element" : {"#" : "toolbar-container"}
18 }
19 },
20 "button": {
21 "module": "js/components/button.reel",
22 "name": "Button",
23 "properties": {
24
25 }
26 }
27 }
28 </script>
29</head>
30<body>
31<div id="toolbar-container" class="toolbar-container">
32</div>
33</body>
34</html> \ No newline at end of file
diff --git a/js/components/toolbar.reel/toolbar.js b/js/components/toolbar.reel/toolbar.js
new file mode 100644
index 00000000..79e7ff1f
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.js
@@ -0,0 +1,27 @@
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.Toolbar = Montage.create(Component, {
11
12 deserializedFromTemplate : {
13 value: function() {
14 console.log("toolbar - deserialized");
15 }
16 },
17 prepareForDraw : {
18 value: function() {
19 console.log("toolbar - prepare for draw");
20 }
21 },
22 draw : {
23 value: function() {
24 console.log("toolbar - draw");
25 }
26 }
27}); \ No newline at end of file
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 33084169..d36c8cb9 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -190,6 +190,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
190 ///// attach specificity to rule object 190 ///// attach specificity to rule object
191 ///// if rule is css keyframes, return rule and don't attach specificity 191 ///// if rule is css keyframes, return rule and don't attach specificity
192 if (rule instanceof WebKitCSSKeyframesRule) { 192 if (rule instanceof WebKitCSSKeyframesRule) {
193
193 return rule; 194 return rule;
194 } 195 }
195 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText); 196 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText);
@@ -1184,6 +1185,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1184 1185
1185 this.styleSheetModified(sheet); 1186 this.styleSheetModified(sheet);
1186 1187
1188 NJevent('newStyleSheet', sheet);
1189
1187 return sheet; 1190 return sheet;
1188 } 1191 }
1189 }, 1192 },
@@ -1243,11 +1246,16 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1243 1246
1244 clearDirtyStyleSheets : { 1247 clearDirtyStyleSheets : {
1245 value: function(doc) { 1248 value: function(doc) {
1246 if(!doc) { 1249 this.dirtyStyleSheets.length = 0;
1250
1251 if(doc) {
1247 this.dirtyStyleSheets = null; 1252 this.dirtyStyleSheets = null;
1248 this.dirtyStyleSheets = []; 1253 this.dirtyStyleSheets = this.dirtyStyleSheets.filter(function(sheet) {
1254 return sheet.document !== doc;
1255 });
1249 } 1256 }
1250 1257
1258
1251 } 1259 }
1252 }, 1260 },
1253 1261
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
index 003724bb..54320eef 100755
--- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
@@ -16,6 +16,7 @@ var ComponentsPanel = require("js/panels/Components/ComponentsPanel").Components
16var ProjectPanel = require("js/panels/Project/ProjectPanel").ProjectPanel; 16var ProjectPanel = require("js/panels/Project/ProjectPanel").ProjectPanel;
17var MaterialsPanel = require("js/panels/Materials/MaterialsPanel").MaterialsPanel; 17var MaterialsPanel = require("js/panels/Materials/MaterialsPanel").MaterialsPanel;
18var PresetsPanel = require("js/panels/presets/presets-panel").PresetsPanel; 18var PresetsPanel = require("js/panels/presets/presets-panel").PresetsPanel;
19var CSSPanelNew = require("js/panels/css-panel/css-panel-container").CSSPanelContainer;
19 20
20exports.PanelContainer = Montage.create(Component, { 21exports.PanelContainer = Montage.create(Component, {
21 lastOffset: { 22 lastOffset: {
@@ -45,7 +46,7 @@ exports.PanelContainer = Montage.create(Component, {
45 }, 46 },
46 47
47 initPanelOrder: { 48 initPanelOrder: {
48 value: ['ColorPanel', 'PropertiesPanel','ComponentsPanel','ProjectPanel','CSSPanel','MaterialsPanel','PresetsPanel'] 49 value: ['CSSPanelNew','PropertiesPanel','ColorPanel','ComponentsPanel','ProjectPanel','CSSPanel','MaterialsPanel','PresetsPanel']
49 }, 50 },
50 51
51 panelOrder: { 52 panelOrder: {
@@ -106,6 +107,7 @@ exports.PanelContainer = Montage.create(Component, {
106 this.addEventListener("change@appModel.CSSPanel", this, false); 107 this.addEventListener("change@appModel.CSSPanel", this, false);
107 this.addEventListener("change@appModel.MaterialsPanel", this, false); 108 this.addEventListener("change@appModel.MaterialsPanel", this, false);
108 this.addEventListener("change@appModel.PresetsPanel", this, false); 109 this.addEventListener("change@appModel.PresetsPanel", this, false);
110 this.addEventListener("change@appModel.CSSPanelNew", this, false);
109 } 111 }
110 }, 112 },
111 113
diff --git a/js/panels/css-panel/css-panel-container.js b/js/panels/css-panel/css-panel-container.js
index aeaa2d13..6110c999 100644
--- a/js/panels/css-panel/css-panel-container.js
+++ b/js/panels/css-panel/css-panel-container.js
@@ -9,7 +9,7 @@ var PanelBase = require("js/panels/PanelBase").PanelBase;
9var Content = require("js/panels/css-panel/css-panel.reel").CSSPanelNew; 9var Content = require("js/panels/css-panel/css-panel.reel").CSSPanelNew;
10 10
11exports.CSSPanelContainer = Montage.create(PanelBase, { 11exports.CSSPanelContainer = Montage.create(PanelBase, {
12 panelName : { value: "CSSPanelNew" }, 12 panelName : { value: "CSS Panel" },
13 minHeight : { value: 200 }, 13 minHeight : { value: 200 },
14 content : { value: Content } 14 content : { value: Content }
15}); \ No newline at end of file 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
index e69de29b..6d296a8e 100644
--- a/js/panels/css-panel/css-panel.reel/css-panel.css
+++ b/js/panels/css-panel/css-panel.reel/css-panel.css
@@ -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.css-panel {
7 color: #FFF;