aboutsummaryrefslogtreecommitdiff
path: root/js/panels/CSSPanel
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/panels/CSSPanel
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'js/panels/CSSPanel')
-rw-r--r--js/panels/CSSPanel/CSSPanel.js53
-rw-r--r--js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css464
-rw-r--r--js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.html64
-rw-r--r--js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js2885
-rw-r--r--js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.html48
-rw-r--r--js/panels/CSSPanel/ComputedStyleSubPanel.reel/ComputedStyleSubPanel.js192
-rw-r--r--js/panels/CSSPanel/ComputedStyleSubPanel.reel/computed-style-sub-panel.css62
-rw-r--r--js/panels/CSSPanel/css-property-name-list.js336
-rw-r--r--js/panels/CSSPanel/css-shorthand-map.js77
-rw-r--r--js/panels/CSSPanel/css-value-completion-map.js404
10 files changed, 4585 insertions, 0 deletions
<
diff --git a/js/panels/CSSPanel/CSSPanel.js b/js/panels/CSSPanel/CSSPanel.js
new file mode 100644
index 00000000..94860b30
--- /dev/null
+++ b/js/panels/CSSPanel/CSSPanel.js
@@ -0,0 +1,53 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No 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 PanelBase = require("js/panels/PanelBase").PanelBase;
9
10var CSSPanelBase = require("js/panels/CSSPanel/CSSPanelBase.reel").CSSPanelBase;
11
12exports.CSSPanel = Montage.create(PanelBase, {
13 id : {value : "cssPanel", writable:true, enumerable:true, configurable:true},
14 panelName : {value : "CSS", writable:true, enumerable:true, configurable:true},
15 panelHeaderID : {value : "cssPanelHeader", writable:true, enumerable:true, configurable:true},
16 disclosureIconID : {value : "cssPanelDisclosureIcon", writable:true, enumerable:true, configurable:true},
17 closeButtonID : {value : "cssPanelCloseButton", writable:true, enumerable:true, configurable:true},
18 panelContentID : {value : "cssPanelContent", writable:true, enumerable:true, configurable:true},
19
20 init : {
21 enumerable:true,
22 value : function (){
23 this.minHeight = 300;
24 this.contentHeight = 300;
25 this.defaultHeight= 300;
26
27 /* OLD WAY -- Removing the temporary div
28 // TODO: Remove this comment once this is tested.
29
30 var panelContainer = document.createElement("div");
31 this._cssPanelBase = CSSPanelBase.create();
32 this._cssPanelBase.element = panelContainer;
33
34 this.content = this._cssPanelBase;
35 this._cssPanelBase.needsDraw = true;
36 */
37 //debugger;
38 this.content = CSSPanelBase.create();
39 }
40 },
41 reinit : {
42 value : function() {
43 this._cssPanelBase.clearStyleSheetList();
44 this._cssPanelBase.clearCSSRules();
45 this._cssPanelBase.populateStyleSheetList();
46 }
47 },
48 _cssPanelBase : {
49 enumerable: true,
50 value: null,
51 writable:true
52 }
53}); \ No newline at end of file
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css
new file mode 100644
index 00000000..ff70b5b6
--- /dev/null
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css
@@ -0,0 +1,464 @@
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
7.css_panel {
8 background-color: #FFF;
9 display: -webkit-box;
10 -webkit-box-orient: vertical;
11 height:100%;
12}
13.nj-section-header {
14 background-color: #333;
15 border-top: 1px solid #3D3D3D;
16 color: #FFF;
17 cursor: default;
18 font-size: 12px;
19 font-weight: normal;
20 height: 16px;
21 margin: 0;
22 padding: 4px 0 2px 10px;
23 vertical-align: top;
24 -webkit-box-flex: 0;
25 -webkit-user-select: none;
26}
27#nj-status-heading {
28 color: #CCC;
29 float: right;
30 margin-right: 15px;
31}
32#nj-css-styles-header {
33 box-shadow: 0 1px 4px rgba(0,0,0,0.25);
34 position: relative;
35}
36#nj-section-stylesheets {
37 -webkit-box-flex: 0;
38 background-color: #474747;
39 color: #FFF;
40 max-height: 68px;
41 overflow-y: scroll;
42}
43#nj-section-styles {
44 background-color: #FFF;
45 font-family: monospace;
46 overflow-y: scroll;
47 -webkit-box-orient: vertical;
48}
49.nj-sub-panel {
50 color: #333;
51 padding: 0;
52 overflow: hidden;
53 opacity: 1;
54 -webkit-box-flex: 1;
55}
56.nj-sub-panel.closed {
57 opacity: 0;
58}
59.panelDisclosureIcon {
60 position: relative;
61 top: -2px;
62}
63.panelDisclosureIcon.closed {
64 -webkit-transform: rotate(-90deg);
65}
66.nj-sub-panel ul {
67 list-style-type: none;
68 margin: 4px 0 5px;
69 padding: 0;
70}
71/* ----------------------------------------
72 CSS Stylesheet List
73---------------------------------------- */
74#nj-sheet-list li {
75 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89%2BbN%2FrXXPues852zzwfACAyWSDNRNYAMqUIeEeCD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i753GDborZ752PO32oPb%2B%2B6EHTh0kX%2Fi%2Bc7vDvOXPK4dPKy2%2BUTV7hXmq86X23qdOo8%2FpPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb%2F1tWeOT3dvfN6b%2FfF9%2FXfFt1%2Bcif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v%2B3Njv3H9qwHeg89HcR%2FcGhYPP%2FpH1jw9DBY%2BZj8uGDYbrnjg%2BOTniP3L96fynQ89kzyaeF%2F6i%2FsuuFxYvfvjV69fO0ZjRoZfyl5O%2FbXyl%2FerA6xmv28bCxh6%2ByXgzMV70VvvtwXfcdx3vo98PT%2BR8IH8o%2F2j5sfVT0Kf7kxmTk%2F8EA5jz%2FGMzLdsAAAAgY0hSTQAAeiUAAICDAAD5%2FwAAgOkAAHUwAADqYAAAOpgAABdvkl%2FFRgAAAKJJREFUeNrUU7ERwyAMfOU8BDUrxNukcCf3HsQ96SgyiqnwCq69xadKLtiYAqr8nQr%2BBNKLl5BEC25oRPMDXXJagek1FTXNj1lw%2FyFIfkNVuSwLc1BVMhKMTO50xwrGGGzbVikBwL7v2cRhGDA%2BRzp1cjlEp0689w1DPEip%2BsZSFx8Z1T7IdXUpwVp74kIIJ06SXViBfuyLRoouJkaS%2F1%2Bm9wA1r162GS72SwAAAABJRU5ErkJggg%3D%3D);
76 background-position: 0 3px;
77 background-repeat: no-repeat;
78 border-bottom: 1px solid #505050;
79 margin: 1px 0 1px 10px;
80 padding: 4px 0 3px;
81}
82#nj-sheet-list input[type="checkbox"] {
83 margin: 1px 3px 0 2px;
84}
85#nj-sheet-list .nj-css-disabled input[type="checkbox"] {
86 margin-top: 2px;
87}
88#nj-sheet-list .nj-css-sheetname {
89 color: #FFF;
90 display: inline-block;
91 margin-right: 4%;
92 width: 30%;
93 white-space: nowrap;
94 overflow: hidden;
95 text-decoration: none;
96 text-overflow: ellipsis;
97}
98.nj-css-default-sheet .nj-css-sheetname {
99 font-weight: bold;
100}
101#nj-sheet-list label {
102 float: right;
103 margin-right: 4px;
104}
105#nj-sheet-list input[type="text"] {
106 margin-top: -2px;
107 float: right;
108 height: 11px;
109 width: 29%;
110}
111.nj-sheet-delete {
112 color: #FFF;
113 float: right;
114 height: 12px;
115 margin-left: 5px;
116 text-decoration: none;
117 width: 12px;
118}
119.nj-css-protected-sheet .nj-sheet-delete {
120 visibility: hidden;
121}
122.nj-sheet-delete:after {
123 content: "\2716";
124 opacity: 0.7;
125}
126.nj-sheet-delete:hover:after {
127 opacity: 1;
128}
129#nj-sheet-list li:hover, #nj-sheet-list .nj-css-disabled {
130 background: none;
131}
132#nj-sheet-list li .nj-css-dirty-marker {
133 color: #BF3B3B;
134 visibility: hidden;
135}
136#nj-sheet-list li span.nj-css-dirty {
137 visibility: visible;
138}