diff options
author | Armen Kesablyan | 2012-05-23 14:34:58 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-23 14:34:58 -0700 |
commit | c21db7f1e4a0582777bdb5366df5d023a915b779 (patch) | |
tree | c4d29cb4686101d4a480ae836d20187879cf5400 /js/panels/CSSPanel | |
parent | 3ed95247e9ea4b0a7833401ed6809647b7c4acbf (diff) | |
parent | 1a7e347810401e6262d9d7bad1c3583e6773993b (diff) | |
download | ninja-c21db7f1e4a0582777bdb5366df5d023a915b779.tar.gz |
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts:
js/data/panels-data.js
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/panels/CSSPanel')
6 files changed, 64 insertions, 51 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 | ||
7 | var cssPropertyNameList = require("js/panels/CSSPanel/css-property-name-list").cssPropertyNameList, | 7 | var 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/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html index 25196bc6..cf5bbbdd 100755 --- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html +++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html | |||
@@ -25,11 +25,11 @@ | |||
25 | </script> | 25 | </script> |
26 | 26 | ||
27 | </head> | 27 | </head> |
28 | <body id="computestylesubpanel" onload=""> | 28 | <body> |
29 | <div data-montage-id="nj-css-panel-computed" class="nj-css-panel-hide"> | 29 | <div data-montage-id="nj-css-panel-computed" class="nj-css-panel-computed"> |
30 | <div id="nj-css-filter-panel"> | 30 | <div data-montage-id="nj-css-filter-panel" class="nj-css-filter-panel"> |
31 | <input data-montage-id="nj-css-filter" class="nj-skinned" type="search"> | 31 | <input data-montage-id="nj-css-filter" class="nj-skinned nj-css-filter-input" type="search"> |
32 | <select data-montage-id="nj-css-group-select" class="nj-skinned"> | 32 | <select data-montage-id="nj-css-group-select" class="nj-skinned nj-css-group-select"> |
33 | <option value="all">All</option> | 33 | <option value="all">All</option> |
34 | <option value="summary" selected>Summary</option> | 34 | <option value="summary" selected>Summary</option> |
35 | <option value="background">Background</option> | 35 | <option value="background">Background</option> |
@@ -40,7 +40,7 @@ | |||
40 | </select> | 40 | </select> |
41 | </div> | 41 | </div> |
42 | <div class="nj-sub-panel"> | 42 | <div class="nj-sub-panel"> |
43 | <dl data-montage-id="nj-css-computed-list" class="nj-css-style-list"></dl> | 43 | <dl data-montage-id="nj-css-computed-list" class="nj-css-style-list nj-css-computed-list"></dl> |
44 | </div> | 44 | </div> |
45 | </div> | 45 | </div> |
46 | </body> | 46 | </body> |
diff --git a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css index e9af9b88..d60f2d9c 100755 --- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css +++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css | |||
@@ -4,7 +4,7 @@ | |||
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 | ||
7 | #nj-css-filter-panel { | 7 | .nj-css-filter-panel { |
8 | background-color: #474747; | 8 | background-color: #474747; |
9 | box-shadow: 0 1px 1px #505050; | 9 | box-shadow: 0 1px 1px #505050; |
10 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); | 10 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); |
@@ -12,51 +12,51 @@ | |||
12 | padding: 8px 0; | 12 | padding: 8px 0; |
13 | position: relative; | 13 | position: relative; |
14 | } | 14 | } |
15 | #nj-computed-sub-panel { | 15 | .nj-css-panel-computed { |
16 | display:-webkit-box; | 16 | display:-webkit-box; |
17 | -webkit-box-flex: 1; | 17 | -webkit-box-flex: 1; |
18 | -webkit-box-orient: vertical; | 18 | -webkit-box-orient: vertical; |
19 | } | 19 | } |
20 | #nj-computed-sub-panel .nj-sub-panel { | 20 | /*#nj-computed-sub-panel .nj-sub-panel {*/ |
21 | .sub-panel-slot .nj-sub-panel { | ||
21 | -webkit-box-flex: 1; | 22 | -webkit-box-flex: 1; |
22 | background-color: #474747; | 23 | background-color: #474747; |
23 | color: #FFF; | 24 | color: #FFF; |
24 | font-family: 'Droid Sans', sans-serif; | 25 | font-family: 'Droid Sans', sans-serif; |
25 | overflow-y: scroll; | 26 | overflow-y: scroll; |
26 | } | 27 | } |
27 | #nj-css-filter, #nj-css-group-select { | 28 | .nj-css-filter-input, .nj-css-group-select { |
28 | width: 42%; | 29 | width: 42%; |
29 | } | 30 | } |
30 | #nj-css-filter { | 31 | .nj-css-filter-input{ |
31 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1%2BjfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8%2FL5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQ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kJggg%3D%3D); |
32 | background-position: 1px 1px; | 33 | background-position: 1px 1px; |
33 | background-repeat: no-repeat; | 34 | background-repeat: no-repeat; |
34 | padding-left: 11px; | 35 | padding-left: 11px; |
35 | } | ||
36 | #nj-css-filter { | ||
37 | margin-right: 4%; | 36 | margin-right: 4%; |
38 | } | 37 | } |
39 | #nj-css-group-select { | 38 | .nj-css-group-select { |
40 | padding-left: 5px; | 39 | padding-left: 5px; |
41 | } | 40 | } |
42 | /* ---------------------------------------- | 41 | /* ---------------------------------------- |
43 | Computed Style List | 42 | Computed Style List |
44 | ---------------------------------------- */ | 43 | ---------------------------------------- */ |
45 | #nj-css-computed-list > div { | 44 | .nj-css-computed-list > div { |
46 | margin: 0 15px; | 45 | margin: 0 15px; |
47 | border-bottom: 1px solid #505050; | 46 | border-bottom: 1px solid #505050; |
48 | padding: 1px 0; | 47 | padding: 1px 0; |
49 | } | 48 | } |
50 | #nj-css-computed-list > div:last-child { | 49 | .nj-css-computed-list > div:last-child { |
51 | margin-bottom: 10px; | 50 | margin-bottom: 10px; |
52 | } | 51 | } |
53 | #nj-css-computed-list { | 52 | .nj-css-computed-list { |
54 | margin-top: 7px; | 53 | margin-top: 7px; |
55 | } | 54 | } |
56 | #nj-css-computed-list dt { | 55 | .nj-css-computed-list dt, .nj-css-computed-list dd { |
56 | cursor: default; | ||
57 | display: inline-block; | ||
58 | } | ||
59 | .nj-css-style-list.nj-css-computed-list dt { | ||
57 | color: #FFF; | 60 | color: #FFF; |
58 | width: 55%; | 61 | width: 48%; |
59 | } | 62 | } |
60 | #nj-computed-sub-panel.nj-css-panel-hide { | ||
61 | display: none; | ||
62 | } \ No newline at end of file | ||
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 | ||