diff options
Diffstat (limited to 'js/panels/CSSPanel/ComputedStyleSubPanel.reel')
3 files changed, 74 insertions, 71 deletions
diff --git a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html index a65fd32f..d07a5e20 100755 --- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html +++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html | |||
@@ -1,25 +1,26 @@ | |||
1 | <!DOCTYPE html> | 1 | <!doctype html> |
2 | <!-- <copyright> | 2 | <!-- <copyright> |
3 | Copyright (c) 2012, Motorola Mobility, Inc | 3 | Copyright (c) 2012, Motorola Mobility LLC. |
4 | All Rights Reserved. | 4 | All Rights Reserved. |
5 | BSD License. | ||
6 | 5 | ||
7 | Redistribution and use in source and binary forms, with or without | 6 | Redistribution and use in source and binary forms, with or without |
8 | modification, are permitted provided that the following conditions are met: | 7 | modification, are permitted provided that the following conditions are met: |
9 | 8 | ||
10 | - Redistributions of source code must retain the above copyright notice, | 9 | * Redistributions of source code must retain the above copyright notice, |
11 | this list of conditions and the following disclaimer. | 10 | this list of conditions and the following disclaimer. |
12 | - Redistributions in binary form must reproduce the above copyright | 11 | |
13 | notice, this list of conditions and the following disclaimer in the | 12 | * Redistributions in binary form must reproduce the above copyright notice, |
14 | documentation and/or other materials provided with the distribution. | 13 | this list of conditions and the following disclaimer in the documentation |
15 | - Neither the name of Motorola Mobility nor the names of its contributors | 14 | and/or other materials provided with the distribution. |
16 | may be used to endorse or promote products derived from this software | 15 | |
17 | without specific prior written permission. | 16 | * Neither the name of Motorola Mobility LLC nor the names of its |
17 | contributors may be used to endorse or promote products derived from this | ||
18 | software without specific prior written permission. | ||
18 | 19 | ||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -30,9 +31,9 @@ POSSIBILITY OF SUCH DAMAGE. | |||
30 | </copyright> --> | 31 | </copyright> --> |
31 | <html> | 32 | <html> |
32 | <head> | 33 | <head> |
33 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | 34 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
34 | <title>ComputedStyleSubPanel</title> | 35 | <title>ComputedStyleSubPanel</title> |
35 | <link href="computed-style-sub-panel.css" type="text/css" rel="stylesheet"> | 36 | <link href="computed-style-sub-panel.css" type="text/css" rel="stylesheet"> |
36 | <script type="text/montage-serialization"> | 37 | <script type="text/montage-serialization"> |
37 | { | 38 | { |
38 | "owner": { | 39 | "owner": { |
@@ -45,27 +46,27 @@ POSSIBILITY OF SUCH DAMAGE. | |||
45 | } | 46 | } |
46 | } | 47 | } |
47 | 48 | ||
48 | } | 49 | } |
49 | </script> | 50 | </script> |
50 | 51 | ||
51 | </head> | 52 | </head> |
52 | <body> | 53 | <body> |
53 | <div data-montage-id="nj-css-panel-computed" class="nj-css-panel-computed"> | 54 | <div data-montage-id="nj-css-panel-computed" class="nj-css-panel-computed"> |
54 | <div data-montage-id="nj-css-filter-panel" class="nj-css-filter-panel"> | 55 | <div data-montage-id="nj-css-filter-panel" class="nj-css-filter-panel"> |
55 | <input data-montage-id="nj-css-filter" class="nj-skinned nj-css-filter-input" type="search"> | 56 | <input data-montage-id="nj-css-filter" class="nj-skinned nj-css-filter-input" type="search"> |
56 | <select data-montage-id="nj-css-group-select" class="nj-skinned nj-css-group-select"> | 57 | <select data-montage-id="nj-css-group-select" class="nj-skinned nj-css-group-select"> |
57 | <option value="all">All</option> | 58 | <option value="all">All</option> |
58 | <option value="summary" selected>Summary</option> | 59 | <option value="summary" selected>Summary</option> |
59 | <option value="background">Background</option> | 60 | <option value="background">Background</option> |
60 | <option value="dimensions">Dimensions</option> | 61 | <option value="dimensions">Dimensions</option> |
61 | <option value="border">Border</option> | 62 | <option value="border">Border</option> |
62 | <option value="font">Font</option> | 63 | <option value="font">Font</option> |
63 | <option value="layout">Layout</option> | 64 | <option value="layout">Layout</option> |
64 | </select> | 65 | </select> |
65 | </div> | 66 | </div> |
66 | <div class="nj-sub-panel"> | 67 | <div class="nj-sub-panel"> |
67 | <dl data-montage-id="nj-css-computed-list" class="nj-css-style-list nj-css-computed-list"></dl> | 68 | <dl data-montage-id="nj-css-computed-list" class="nj-css-style-list nj-css-computed-list"></dl> |
68 | </div> | 69 | </div> |
69 | </div> | 70 | </div> |
70 | </body> | 71 | </body> |
71 | </html> | 72 | </html> |
diff --git a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js index e214a49b..c997a207 100755 --- a/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js +++ b/js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js | |||
@@ -1,24 +1,25 @@ | |||
1 | /* <copyright> | 1 | /* <copyright> |
2 | Copyright (c) 2012, Motorola Mobility, Inc | 2 | Copyright (c) 2012, Motorola Mobility LLC. |
3 | All Rights Reserved. | 3 | All Rights Reserved. |
4 | BSD License. | ||
5 | 4 | ||
6 | Redistribution and use in source and binary forms, with or without | 5 | Redistribution and use in source and binary forms, with or without |
7 | modification, are permitted provided that the following conditions are met: | 6 | modification, are permitted provided that the following conditions are met: |
8 | 7 | ||
9 | - Redistributions of source code must retain the above copyright notice, | 8 | * Redistributions of source code must retain the above copyright notice, |
10 | this list of conditions and the following disclaimer. | 9 | this list of conditions and the following disclaimer. |
11 | - Redistributions in binary form must reproduce the above copyright | 10 | |
12 | notice, this list of conditions and the following disclaimer in the | 11 | * Redistributions in binary form must reproduce the above copyright notice, |
13 | documentation and/or other materials provided with the distribution. | 12 | this list of conditions and the following disclaimer in the documentation |
14 | - Neither the name of Motorola Mobility nor the names of its contributors | 13 | and/or other materials provided with the distribution. |
15 | may be used to endorse or promote products derived from this software | 14 | |
16 | without specific prior written permission. | 15 | * Neither the name of Motorola Mobility LLC nor the names of its |
16 | contributors may be used to endorse or promote products derived from this | ||
17 | software without specific prior written permission. | ||
17 | 18 | ||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
@@ -49,25 +50,25 @@ exports.ComputedStyleSubPanel = Montage.create(Component, { | |||
49 | }, | 50 | }, |
50 | // prepareForDraw : { | 51 | // prepareForDraw : { |
51 | // value: function() { | 52 | // value: function() { |
52 | // | 53 | // |
53 | // } | 54 | // } |
54 | // }, | 55 | // }, |
55 | willDraw : { | 56 | willDraw : { |
56 | value: function() { | 57 | value: function() { |
57 | if(this._declaration) { | 58 | if(this._declaration) { |
58 | 59 | ||
59 | var group = this.staticGroupingMap[this._group], | 60 | var group = this.staticGroupingMap[this._group], |
60 | matchedInGroup, elementList; | 61 | matchedInGroup, elementList; |
61 | 62 | ||
62 | if(this._group === 'all' && !group) { | 63 | if(this._group === 'all' && !group) { |
63 | group = this.staticGroupingMap['all'] = nj.toArray(this._declaration).sort(); | 64 | group = this.staticGroupingMap['all'] = nj.toArray(this._declaration).sort(); |
64 | } | 65 | } |
65 | 66 | ||
66 | ///// Filter group to show only the styles that match search filter | 67 | ///// Filter group to show only the styles that match search filter |
67 | matchedInGroup = group.filter(function(item) { | 68 | matchedInGroup = group.filter(function(item) { |
68 | return (item.indexOf(this._filter) > -1); | 69 | return (item.indexOf(this._filter) > -1); |
69 | }, this); | 70 | }, this); |
70 | 71 | ||
71 | this._elementList = matchedInGroup.map(function(propName) { | 72 | this._elementList = matchedInGroup.map(function(propName) { |
72 | var propEl = nj.make('dt'), | 73 | var propEl = nj.make('dt'), |
73 | valEl = nj.make('dd'), | 74 | valEl = nj.make('dd'), |
@@ -75,20 +76,20 @@ exports.ComputedStyleSubPanel = Montage.create(Component, { | |||
75 |