aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/ui')
-rwxr-xr-xnode_modules/montage/ui/application.js4
-rw-r--r--node_modules/montage/ui/bluemoon/progress.reel/progress.js20
-rw-r--r--node_modules/montage/ui/check-input.js2
-rw-r--r--node_modules/montage/ui/checkbox.reel/checkbox.js2
-rwxr-xr-xnode_modules/montage/ui/component.js115
-rw-r--r--node_modules/montage/ui/composer/press-composer.js9
-rw-r--r--node_modules/montage/ui/composer/translate-composer.js77
-rwxr-xr-xnode_modules/montage/ui/condition.reel/condition.js24
-rwxr-xr-xnode_modules/montage/ui/controller/array-controller.js8
-rwxr-xr-xnode_modules/montage/ui/list.reel/list.html10
-rwxr-xr-xnode_modules/montage/ui/loader.reel/loader.js6
-rwxr-xr-xnode_modules/montage/ui/loading-panel.reel/loading-panel.css38
-rwxr-xr-xnode_modules/montage/ui/loading-panel.reel/loading-panel.html6
-rw-r--r--node_modules/montage/ui/native-control.js3
-rwxr-xr-xnode_modules/montage/ui/popup/confirm.reel/confirm.js4
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.js159
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.css51
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.html32
-rwxr-xr-xnode_modules/montage/ui/progress.reel/progress.js144
-rwxr-xr-xnode_modules/montage/ui/progress.reel/rule.pngbin956 -> 0 bytes
-rwxr-xr-xnode_modules/montage/ui/progress.reel/scroll.pngbin272 -> 0 bytes
-rwxr-xr-xnode_modules/montage/ui/radio-button.reel/radio-button.js3
-rwxr-xr-xnode_modules/montage/ui/repetition.reel/repetition.js127
-rwxr-xr-xnode_modules/montage/ui/scroll.js820
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.html1
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.js36
-rw-r--r--node_modules/montage/ui/select-input.reel/select-input.js115
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.css27
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.html62
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.js234
-rwxr-xr-xnode_modules/montage/ui/slot.reel/slot.js19
-rwxr-xr-xnode_modules/montage/ui/template.js4
-rw-r--r--node_modules/montage/ui/text-input.js16
-rw-r--r--node_modules/montage/ui/textarea.reel/textarea.js2
-rw-r--r--node_modules/montage/ui/toggle-button.reel/toggle-button.js9
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.css162
-rwxr-xr-xnode_modules/montage/ui/toggle-switch.reel/toggle-switch.html16
-rw-r--r--node_modules/montage/ui/toggle-switch.reel/toggle-switch.js424
38 files changed, 1454 insertions, 1337 deletions
diff --git a/node_modules/montage/ui/application.js b/node_modules/montage/ui/application.js
index c7b3dc73..7cb4bd97 100755
--- a/node_modules/montage/ui/application.js
+++ b/node_modules/montage/ui/application.js
@@ -175,7 +175,7 @@ var Application = exports.Application = Montage.create(Montage, /** @lends monta
175 _createPopupSlot: {value: function(zIndex) { 175 _createPopupSlot: {value: function(zIndex) {
176 var slotEl = document.createElement('div'); 176 var slotEl = document.createElement('div');
177 document.body.appendChild(slotEl); 177 document.body.appendChild(slotEl);
178 slotEl.style['z-index'] = zIndex; 178 slotEl.style.zIndex = zIndex;
179 slotEl.style.position = 'absolute'; 179 slotEl.style.position = 'absolute';
180 180
181 var popupSlot = Slot.create(); 181 var popupSlot = Slot.create();
@@ -221,7 +221,7 @@ var Application = exports.Application = Montage.create(Montage, /** @lends monta
221 } 221 }
222 // use the new zIndex for custom popup 222 // use the new zIndex for custom popup
223 if(!isSystemPopup) { 223 if(!isSystemPopup) {
224 popupSlot.element.style['z-index'] = zIndex; 224 popupSlot.element.style.zIndex = zIndex;
225 } 225 }
226 226
227 popupSlot.content = content; 227 popupSlot.content = content;
diff --git a/node_modules/montage/ui/bluemoon/progress.reel/progress.js b/node_modules/montage/ui/bluemoon/progress.reel/progress.js
index 8bc68b05..20c60d94 100644
--- a/node_modules/montage/ui/bluemoon/progress.reel/progress.js
+++ b/node_modules/montage/ui/bluemoon/progress.reel/progress.js
@@ -43,8 +43,8 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo
43 set: function(val) { 43 set: function(val) {
44 if(val !== this._value) { 44 if(val !== this._value) {
45 this._value = val; 45 this._value = val;
46 if(this._value > this._maximumValue) { 46 if(this._value > this._max) {
47 this._value = this._maximumValue; 47 this._value = this._max;
48 } 48 }
49 if(this._value < 0) { 49 if(this._value < 0) {
50 this._value = 0; 50 this._value = 0;
@@ -57,7 +57,7 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo
57 Description TODO 57 Description TODO
58 @private 58 @private
59*/ 59*/
60 _maximumValue: { 60 _max: {
61 enumerable: false, 61 enumerable: false,
62 value: 100 62 value: 100
63 }, 63 },
@@ -66,15 +66,15 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo
66 @type {Function} 66 @type {Function}
67 @default {Number} 100 67 @default {Number} 100
68 */ 68 */
69 maximumValue: { 69 max: {
70 get: function() { 70 get: function() {
71 return this._maximumValue; 71 return this._max;
72 }, 72 },
73 set: function(val) { 73 set: function(val) {
74 if(val !== this._maximumValue) { 74 if(val !== this._max) {
75 this._maximumValue = val; 75 this._max = val;
76 if(this._maximumValue <= 0) { 76 if(this._max <= 0) {
77 this._maximumValue = 1; // Prevent divide by zero errors 77 this._max = 1; // Prevent divide by zero errors
78 } 78 }
79 this.needsDraw = true; 79 this.needsDraw = true;
80 } 80 }
@@ -120,7 +120,7 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo
120 draw: { 120 draw: {
121 enumerable: false, 121 enumerable: false,
122 value: function() { 122 value: function() {
123 var ratio = this._value / this._maximumValue; 123 var ratio = this._value / this._max;
124 // constrain to interval [0, 1] 124 // constrain to interval [0, 1]
125 ratio = Math.min(Math.max(ratio, 0), 1); 125 ratio = Math.min(Math.max(ratio, 0), 1);
126 // map into [0, 100] 126 // map into [0, 100]
diff --git a/node_modules/montage/ui/check-input.js b/node_modules/montage/ui/check-input.js
index 42538c02..1621eb45 100644
--- a/node_modules/montage/ui/check-input.js
+++ b/node_modules/montage/ui/check-input.js
@@ -69,7 +69,7 @@ var CheckInput = exports.CheckInput = Montage.create(NativeControl, {
69 Stores if we need to fake checking. 69 Stores if we need to fake checking.
70 70
71 When preventDefault is called on touchstart and touchend events (e.g. by 71 When preventDefault is called on touchstart and touchend events (e.g. by
72 the scrollview component) the checkbox doesn't check itself, so we need 72 the scroller component) the checkbox doesn't check itself, so we need
73 to fake it later. 73 to fake it later.
74 74
75 @default false 75 @default false
diff --git a/node_modules/montage/ui/checkbox.reel/checkbox.js b/node_modules/montage/ui/checkbox.reel/checkbox.js
index df2995c3..c6364e97 100644
--- a/node_modules/montage/ui/checkbox.reel/checkbox.js
+++ b/node_modules/montage/ui/checkbox.reel/checkbox.js
@@ -9,7 +9,7 @@ var Montage = require("montage").Montage,
9 9
10var Checkbox = exports.Checkbox = Montage.create(CheckInput, {}); 10var Checkbox = exports.Checkbox = Montage.create(CheckInput, {});
11Checkbox.addAttributes({ 11Checkbox.addAttributes({
12 autofocus: 'off', // on/off 12 autofocus: {value: false, dataType: 'boolean'},
13 disabled: {value: false, dataType: 'boolean'}, 13 disabled: {value: false, dataType: 'boolean'},
14 checked: {value: false, dataType: 'boolean'}, 14 checked: {value: false, dataType: 'boolean'},
15 form: null, 15 form: null,
diff --git a/node_modules/montage/ui/component.js b/node_modules/montage/ui/component.js
index d347f655..69559fc1 100755
--- a/node_modules/montage/ui/component.js
+++ b/node_modules/montage/ui/component.js
@@ -59,7 +59,6 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon
59 value: function() { 59 value: function() {
60 var actionEvent = document.createEvent("CustomEvent"); 60 var actionEvent = document.createEvent("CustomEvent");
61 actionEvent.initCustomEvent("action", true, true, null); 61 actionEvent.initCustomEvent("action", true, true, null);
62 actionEvent.type = "action";
63 return actionEvent; 62 return actionEvent;
64 } 63 }
65 }, 64 },
@@ -162,6 +161,15 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon
162 } 161 }
163 }, 162 },
164 163
164 setElementWithParentComponent: {
165 value: function(element, parent) {
166 this._alternateParentComponent = parent;
167 if (this.element != element) {
168 this.element = element;
169 }
170 }
171 },
172
165 // access to the Application object 173 // access to the Application object
166/** 174/**
167 Description TODO 175 Description TODO
@@ -215,6 +223,11 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon
215 return targetElementController; 223 return targetElementController;
216 } 224 }
217 }, 225 },
226
227 _alternateParentComponent: {
228 value: null
229 },
230
218/** 231/**
219 Description TODO 232 Description TODO
220 @private 233 @private
@@ -235,21 +248,27 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon
235 get: function() { 248 get: function() {