aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js19
-rwxr-xr-xjs/panels/CSSPanel/css-property-name-list.js2
-rwxr-xr-xjs/panels/CSSPanel/css-shorthand-map.js18
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html15
-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.css51
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.html47
-rw-r--r--js/panels/css-panel/css-panel.reel/css-panel.js25
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.css15
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.html58
-rw-r--r--js/panels/css-panel/declaration.reel/declaration.js218
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.css69
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html89
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js148
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.html45
-rw-r--r--js/panels/css-panel/rule-list-container.reel/rule-list-container.js145
-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.js134
-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.css49
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html127
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js126
-rw-r--r--js/panels/css-panel/style-shorthand.reel/style-shorthand.css41
-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.css187
-rw-r--r--js/panels/css-panel/style.reel/style.html103
-rw-r--r--js/panels/css-panel/style.reel/style.js429
-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.html84
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js70
-rw-r--r--js/panels/css-panel/styles-view-delegate.js245
36 files changed, 3492 insertions, 16 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
index 2a3fc068..4c0a3611 100755
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
@@ -4,8 +4,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").cssPropertyNameList, 7var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").CssPropertyNameList,
8 cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").cssValueCompletionMap, 8 cssCompletionMap = require("js/panels/CSSPanel/css-value-completion-map").CssValueCompletionMap,
9 CSS_SHORTHAND_MAP = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP, 9 CSS_SHORTHAND_MAP = require("js/panels/CSSPanel/css-shorthand-map").CSS_SHORTHAND_MAP,
10 keyboardModule = require("js/mediators/keyboard-mediator").Keyboard, 10 keyboardModule = require("js/mediators/keyboard-mediator").Keyboard,
11 nj = require("js/lib/NJUtils").NJUtils; 11 nj = require("js/lib/NJUtils").NJUtils;
@@ -822,17 +822,14 @@ var CSSPanel = exports.CSSPanelBase = (require("montage/core/core").Montage).cre
822 }, 822 },
823 getAllRelatedRules : { 823 getAllRelatedRules : {
824 value: function(element) { 824 value: function(element) {
825 var pseudos = [null],//, 'link', 'visited', 'active', 'hover', 'focus', 'first-letter', 825 var rules = [],
826 //'first-line', 'first-child', 'before', 'after', 'lang'], 826 win = element.ownerDocument.defaultView,
827 rules = [],
828 self = this; 827 self = this;
829 828
830 pseudos.forEach(function(pseudo) { 829 rules = rules.concat(nj.toArray(win.getMatchedCSSRules(element)).filter(function(rule) {
831 rules = rules.concat(nj.toArray(this.getMatchedCSSRules(element, ':'+pseudo)).filter(function(rule) { 830 var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null;
832 var sheetId = (rule.parentStyleSheet) ? rule.parentStyleSheet.ownerNode.id : null; 831 return sheetId !== self._stageStyleSheetId;
833 return sheetId !== self._stageStyleSheetId; 832 }));
834 }));
835 }, element.ownerDocument.defaultView);
836 833
837 return rules; 834 return rules;
838 } 835 }
diff --git a/js/panels/CSSPanel/css-property-name-list.js b/js/panels/CSSPanel/css-property-name-list.js
index 24a69c09..6d02b755 100755
--- a/js/panels/CSSPanel/css-property-name-list.js
+++ b/js/panels/CSSPanel/css-property-name-list.js
@@ -4,7 +4,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7exports.cssPropertyNameList = [ 7exports.CssPropertyNameList = [
8 '-webkit-', 8 '-webkit-',
9 "-webkit-animation", 9 "-webkit-animation",
10 "-webkit-animation-delay", 10 "-webkit-animation-delay",
diff --git a/js/panels/CSSPanel/css-shorthand-map.js b/js/panels/CSSPanel/css-shorthand-map.js
index bc43ebc4..191dbae5 100755
--- a/js/panels/CSSPanel/css-shorthand-map.js
+++ b/js/panels/CSSPanel/css-shorthand-map.js
@@ -52,7 +52,6 @@ exports.CSS_SHORTHAND_MAP = {
52 'font-style' : ['font'], 52 'font-style' : ['font'],
53 'font-family' : ['font'], 53 'font-family' : ['font'],
54 'font-size' : ['font'], 54 'font-size' : ['font'],
55 'font-style' : ['font'],
56 'font-variant' : ['font'], 55 'font-variant' : ['font'],
57 'font-weight' : ['font'], 56 'font-weight' : ['font'],
58 57
@@ -74,4 +73,21 @@ exports.CSS_SHORTHAND_MAP = {
74 '-webkit-transition-duration' : ['-webkit-transition'], 73 '-webkit-transition-duration' : ['-webkit-transition'],
75 '-webkit-transition-timing-function' : ['-webkit-transition'], 74 '-webkit-transition-timing-function' : ['-webkit-transition'],
76 '-webkit-transition-delay' : ['-webkit-transition'] 75 '-webkit-transition-delay' : ['-webkit-transition']
76};
77
78exports.CSS_SHORTHAND_TO_SUBPROP_MAP = {
79 'background' : ["background-image", "background-repeat-x", "background-repeat-y", "background-attachment",
80 "background-position-x", "background-position-y", "background-origin", "background-clip",
81 "background-color"],
82 'border' : ["border-top-width", "border-right-width", "border-bottom-width", "border-left-width",
83 "border-top-style", "border-right-style", "border-bottom-style", "border-left-style",
84 "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", "border-image"],
85 'border-radius' : ["border-top-left-radius", "border-top-right-radius", "border-bottom-right-radius",
86 "border-bottom-left-radius"],
87 'font' : ["font-family", "font-size", "font-style", "font-variant", "font-weight", "line-height"],
88 'list' : ["list-style-type", "list-style-image", "list-style-position"],
89 'margin' : ["margin-top", "margin-right", "margin-bottom", "margin-left"],
90 'padding' : ["padding-top", "padding-right", "padding-bottom", "padding-left"],
91 '-webkit-transition' : ["-webkit-transition-property", "-webkit-transition-duration",
92 "-webkit-transition-timing-function", "-webkit-transition-delay"]
77}; \ No newline at end of file 93}; \ No newline at end of file
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html
index e5cbbe32..900930d9 100755
--- a/js/panels/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer.reel/PanelContainer.html
@@ -54,11 +54,18 @@
54 "element": {"#": "panel_5"} 54 "element": {"#": "panel_5"}
55 } 55 }
56 }, 56 },
57
58 "panel_6": { 57 "panel_6": {
58 "module": "js/panels/Panel.reel",
59 "name": "Panel",
60 "properties": {
61 "element": {"#": "panel_6"}
62 }
63 },
64
65 "panel_7": {
59 "prototype": "js/panels/Panel.reel", 66 "prototype": "js/panels/Panel.reel",
60 "properties": { 67 "properties": {
61 "element": {"#": "panel_6"} 68 "element": {"#": "panel_7"}
62 } 69 }
63 }, 70 },
64 71
@@ -74,7 +81,8 @@
74 "panel_3": {"@": "panel_3"}, 81 "panel_3": {"@": "panel_3"},
75 "panel_4": {"@": "panel_4"}, 82 "panel_4": {"@": "panel_4"},
76 "panel_5": {"@": "panel_5"}, 83 "panel_5": {"@": "panel_5"},
77 "panel_6": {"@": "panel_6"} 84 "panel_6": {"@": "panel_6"},
85 "panel_7": {"@": "panel_7"}
78 }, 86 },
79 "listeners": [ 87 "listeners": [
80 { 88 {
@@ -105,6 +113,7 @@
105 <article data-montage-id="panel_4"></article> 113 <article data-montage-id="panel_4"></article>
106 <article data-montage-id="panel_5"></article> 114 <article data-montage-id="panel_5"></article>
107 <article data-montage-id="panel_6"></article> 115 <article data-montage-id="panel_6"></article>
116 <article data-montage-id="panel_7"></article>
108 </article> 117 </article>
109 </section> 118 </section>
110</body> 119</body>
diff --git a/js/panels/collapse-composer.js b/js/panels/collapse-composer.js
new file mode 100644
index 00000000..0bd916c8
--- /dev/null
+++ b/js/panels/collapse-composer.js
@@ -0,0 +1,137 @@
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;
8var Composer = require("montage/ui/compo