aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/components/editable.reel/editable.js23
-rw-r--r--js/components/toolbar.reel/toolbar.css53
-rw-r--r--js/components/toolbar.reel/toolbar.html73
-rw-r--r--js/components/toolbar.reel/toolbar.js57
-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.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.js171
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.css49
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.html76
-rw-r--r--js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js91
-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.js137
-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.js99
-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.css164
-rw-r--r--js/panels/css-panel/style.reel/style.html77
-rw-r--r--js/panels/css-panel/style.reel/style.js178
-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.html81
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js59
-rw-r--r--js/panels/css-panel/styles-view-mediator.js38
42 files changed, 3014 insertions, 23 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index 9c8946c4..1ebe33f1 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -122,7 +122,7 @@ exports.Editable = Montage.create(Component, {
122 if(this.stopOnBlur) { 122 if(this.stopOnBlur) {
123 console.log('adding mousedown event listener'); 123 console.log('adding mousedown event listener');
124 ///// Simulate blur on editable node by listening to the doc 124 ///// Simulate blur on editable node by listening to the doc
125 document.addEventListener('mouseup', this, false); 125 document.addEventListener('mousedown', this, false);
126 } 126 }
127 127
128 this._sendEvent('start'); 128 this._sendEvent('start');
@@ -131,11 +131,11 @@ exports.Editable = Montage.create(Component, {
131 } 131 }
132 }, 132 },
133 stop : { 133 stop : {
134 value: function() { 134 value: function(eventData) {
135 this._isEditable = this._element.contentEditable = false; 135 this._isEditable = this._element.contentEditable = false;
136 this._element.classList.remove(this.editingClass); 136 this._element.classList.remove(this.editingClass);
137 137
138 this._sendEvent('stop'); 138 this._sendEvent('stop', eventData);
139 139
140 ///// if value is different than pre-edit val, call onchange method 140 ///// if value is different than pre-edit val, call onchange method
141 if(this._preEditValue !== this.value) { 141 if(this._preEditValue !== this.value) {
@@ -174,12 +174,12 @@ exports.Editable = Montage.create(Component, {
174 } 174 }
175 }, 175 },
176 blur : { 176 blur : {
177 value : function() { 177 value : function(eventData) {
178 if(this._hint) { 178 if(this._hint) {
179 this.accept(); 179 this.accept();
180 } 180 }
181 this.stop(); 181 this.stop(eventData);
182 document.removeEventListener('mouseup', this, false); 182 document.removeEventListener('mousedown', this, false);
183 this._sendEvent('blur'); 183 this._sendEvent('blur');
184 } 184 }
185 }, 185 },
@@ -202,12 +202,15 @@ exports.Editable = Montage.create(Component, {
202 this._sendEvent('input'); 202 this._sendEvent('input');
203 } 203 }
204 }, 204 },
205 handleMouseup : { 205 handleMousedown : {
206 value : function(e) { 206 value : function(e) {
207 console.log('handle mouse down'); 207 console.log('handle mouse down');
208 ///// Listen for simulated blur event 208 ///// Listen for simulated blur event
209 if(this.stopOnBlur && e._event.target !== this._element) { 209 if(this.stopOnBlur && e._event.target !== this._element) {
210 this.blur(); 210 this.blur({
211 "originalEventType": "mousedown",
212 "originalEvent": e
213 });
211 } 214 }
212 } 215 }
213 }, 216 },
@@ -221,9 +224,9 @@ exports.Editable = Montage.create(Component, {
221 } 224 }
222 }, 225 },
223 _sendEvent : { 226 _sendEvent : {
224 value : function(type) { 227 value : function(type, data) {
225 var evt = document.createEvent("CustomEvent"); 228 var evt = document.createEvent("CustomEvent");
226 evt.initCustomEvent(type, true, true); 229 evt.initCustomEvent(type, true, true, data);
227 this.dispatchEvent(evt); 230 this.dispatchEvent(evt);
228 } 231 }
229 }, 232 },
diff --git a/js/components/toolbar.reel/toolbar.css b/js/components/toolbar.reel/toolbar.css
new file mode 100644
index 00000000..e63b043e
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.css
@@ -0,0 +1,53 @@
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/*---------------------
8 Toolbar Container
9-----------------------*/
10
11.toolbar-container {
12 background-color: #474747;
13 border-bottom: 1px solid #333;
14 border-top: 1px solid #505050;
15 box-shadow: 0 4px 8px 0px rgba(0,0,0,0.75);
16 height: 22px;
17 overflow: hidden;
18 width: 100%;
19 -webkit-box-flex: 0;
20}
21.toolbar-container ul, .toolbar-container li {
22 margin: 0;
23 padding: 0;
24}
25
26/*---------------------
27 Button Types
28-----------------------*/
29
30.toolbar-add-button {
31 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1%2BjfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8%2FL5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N%2BQWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE%2BCDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9%2FNocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A%2FhXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V%2FpHDBYY1hrFGNuayJsym740u2C%2B02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT%2F%2FID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs%2BZmX8xlz7PPryjYVPiuWLskq3RV2ZsK%2FcqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta%2Bx%2F%2B5Em0mzJ%2F%2BdGj%2Ft8AyNmf2zvs9JmHt6vvmCpYtEFrcu%2BbYsc%2Fm9lSGrTq9xWbtvveWGbZtMNm%2FZarJt%2Bw6rnft3u%2B45uy9s%2F4ODOYd%2BHmk%2FJn58xUnrU%2BfOJJ%2F9dX7SRe1LR68kXv13fc5Nm1t379TfU75%2F4mHeY7En%2B59lvhB5efB1%2Flv5dxc%2BNH0y%2Ffzq64Lv4T8Ffp360%2FrP8f9%2FAA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA%2Bf8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADPSURBVHjadNC7TQNREIXh75oNCIlWG0JC7BJoAmrAIVAAIkRCog9ThFtwCYTrtS2vBBKbDcG%2BbLD%2F5GpGc885M8nAItZga5YcYx4tD6Fw3ncn40Aa36mLIwM94YRC%2FFHqqkVshCRwCz6QhGRjloZo%2F1nFYygmTlC1ptNsbOTgy7czsJYosq2nLuK1e%2Fx4o0u1Qza7cuMS5s%2BVXC68v4xWmUbZFzkqiUatAWWmtmzPkrpoqC27b82BQoU1NEqfvcXeJV%2FB7mDdvYG7Ie4%2BvwMA%2BFNeHV16KUYAAAAASUVORK5CYII%3D);
32}
33
34/*---------------------
35 Generic button styles
36-----------------------*/
37
38.toolbar-container .toolbar-button {
39 background-color: transparent;
40 background-repeat: no-repeat;
41 border-style: none;
42 border-radius: 4px;
43 height: 16px;
44 margin: 3px 5px 0 0;
45 padding: 0 2px;
46 opacity: .85;
47 text-indent: -9999999px;
48 width: 16px;
49 float: right;
50}
51.left-button {
52 float: left;
53} \ 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..53c6627a
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.html
@@ -0,0 +1,73 @@
1<!DOCTYPE html>