aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--js/components/treeview/tree-node.js4
-rwxr-xr-xjs/controllers/styles-controller.js19
-rw-r--r--js/data/panels-data.js12
-rwxr-xr-xjs/lib/NJUtils.js10
-rwxr-xr-xjs/panels/CSSPanel/css-shorthand-map.js18
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html11
-rw-r--r--js/panels/collapse-composer.js137
-rw-r--r--js/panels/css-panel/css-panel-container.js15
-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.html46
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.js26
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.css12
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.html58
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.js105
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.css28
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html75
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js86
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.html44
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.js128
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.css26
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.html26
-rw-r--r--js/panels/css-panel/rule-list.reel/rule-list.js89
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.css132
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.html134
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js221
-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.html103
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js68
-rw-r--r--js/panels/css-panel/style-shorthand.reel/style-shorthand.css43
-rw-r--r--js/panels/css-panel/style-shorthand.reel/style-shorthand.html174
-rw-r--r--js/panels/css-panel/style-shorthand.reel/style-shorthand.js58
-rw-r--r--js/panels/css-panel/style.reel/style.css36
-rw-r--r--js/panels/css-panel/style.reel/style.html57
-rw-r--r--js/panels/css-panel/style.reel/style.js40
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.css26
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.html67
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js59
40 files changed, 2325 insertions, 11 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..69eba194
--- /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": "montage/ui/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/components/treeview/tree-node.js b/js/components/treeview/tree-node.js
index d7b864b5..fa6e1ba4 100644
--- a/js/components/treeview/tree-node.js
+++ b/js/components/treeview/tree-node.js
@@ -52,6 +52,10 @@ exports.TreeNode = Montage.create(Component, {
52 }, this); 52 }, this);
53 } 53 }
54 this._sourceObject = object; 54 this._sourceObject = object;
55
56 if(this.handleSourceObjectSet) {
57 this.handleSourceObjectSet();
58 }
55 } 59 }
56 }, 60 },
57 childNodes : { 61 childNodes : {
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index ec4314f9..f7c98023 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -94,11 +94,18 @@ var stylesController = exports.StylesController = Montage.create(Component, {
94 // Returns null if sheet not found (as in non-ninja projects) 94 // Returns null if sheet not found (as in non-ninja projects)
95 // Setter will handle null case 95 // Setter will handle null case
96 this.defaultStylesheet = this.getSheetFromElement(this.CONST.DEFAULT_SHEET_ID); 96 this.defaultStylesheet = this.getSheetFromElement(this.CONST.DEFAULT_SHEET_ID);
97 97
98 //debugger; 98 this.userStyleSheets = nj.toArray(document._document.styleSheets).filter(function(sheet) {
99 return sheet !== this._stageStylesheet;
100 }, this);
101
102 NJevent('styleSheetsReady', this);
99 }, 103 },
100 enumerable : false 104 enumerable : false
101 }, 105 },
106 userStyleSheets : {
107 value : null
108 },
102 _stageStylesheet : { 109 _stageStylesheet : {
103 value : null 110 value : null
104 }, 111 },
@@ -183,6 +190,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
183 ///// attach specificity to rule object 190 ///// attach specificity to rule object
184 ///// 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
185 if (rule instanceof WebKitCSSKeyframesRule) { 192 if (rule instanceof WebKitCSSKeyframesRule) {
193
186 return rule; 194 return rule;
187 } 195 }
188 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText); 196 rule[this.CONST.SPECIFICITY_KEY] = this.getSpecificity(rule.selectorText);
@@ -1244,6 +1252,8 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1244 1252
1245 this.styleSheetModified(sheet); 1253 this.styleSheetModified(sheet);
1246 1254
1255 NJevent('newStyleSheet', sheet);
1256
1247 return sheet; 1257 return sheet;
1248 } 1258 }
1249 }, 1259 },
@@ -1306,11 +1316,10 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1306 this.dirtyStyleSheets.length = 0; 1316 this.dirtyStyleSheets.length = 0;
1307 1317
1308 if(doc) { 1318 if(doc) {
1309 var stillDirty = this.dirtyStyleSheets.filter(function(sheet) { 1319 this.dirtyStyleSheets = null;
1320 this.dirtyStyleSheets = this.dirtyStyleSheets.filter(function(sheet) {
1310 return sheet.document !== doc; 1321 return sheet.document !== doc;
1311 });