aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-25 13:34:04 -0700
committerNivesh Rajbhandari2012-04-25 13:34:04 -0700
commit32a24988add5ba0ecf80caa31871cdd90e3eea5b (patch)
treefbf05f2dfc91e57ab9598046ff16798ea0ae1966 /node_modules/montage/ui
parent60d6346a78fb5257eaf36f17a5fcb764a342c012 (diff)
parentd3a6350163ada5644d34ed8d5c2a00cef4db2afc (diff)
downloadninja-32a24988add5ba0ecf80caa31871cdd90e3eea5b.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Diffstat (limited to 'node_modules/montage/ui')
-rw-r--r--node_modules/montage/ui/bluemoon/slider.reel/slider.js14
-rw-r--r--node_modules/montage/ui/button.reel/button.js95
-rw-r--r--node_modules/montage/ui/check-input.js4
-rwxr-xr-xnode_modules/montage/ui/component.js23
-rw-r--r--node_modules/montage/ui/composer/long-press-composer.js232
-rw-r--r--node_modules/montage/ui/composer/press-composer.js126
-rw-r--r--node_modules/montage/ui/composer/translate-composer.js133
-rwxr-xr-xnode_modules/montage/ui/condition.reel/condition.js2
-rwxr-xr-xnode_modules/montage/ui/flow-bezier-spline.js405
-rw-r--r--node_modules/montage/ui/flow-path-cubic.js115
-rw-r--r--node_modules/montage/ui/flow-path-lerp.js112
-rw-r--r--node_modules/montage/ui/flow-path-linear.js83
-rw-r--r--node_modules/montage/ui/flow-path-sigmoid.js148
-rw-r--r--node_modules/montage/ui/flow-path.js215
-rw-r--r--node_modules/montage/ui/flow.reel/flow.html48
-rw-r--r--node_modules/montage/ui/flow.reel/flow.js1003
-rwxr-xr-xnode_modules/montage/ui/list.reel/list.html38
-rwxr-xr-xnode_modules/montage/ui/loading-panel.reel/loading-panel.html32
-rw-r--r--node_modules/montage/ui/native-control.js14
-rw-r--r--node_modules/montage/ui/picasa-carousel.reel/image.reel/image.html3
-rwxr-xr-xnode_modules/montage/ui/picasa-carousel.reel/picasa-carousel.css15
-rwxr-xr-xnode_modules/montage/ui/picasa-carousel.reel/picasa-carousel.html242
-rw-r--r--node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js210
-rwxr-xr-xnode_modules/montage/ui/popup/alert.reel/alert.html32
-rwxr-xr-xnode_modules/montage/ui/popup/confirm.reel/confirm.html32
-rwxr-xr-xnode_modules/montage/ui/popup/notifier.reel/notifier.js4
-rwxr-xr-xnode_modules/montage/ui/popup/popup.reel/popup.js135
-rw-r--r--node_modules/montage/ui/range-input.reel/range-input.js6
-rwxr-xr-xnode_modules/montage/ui/repetition.reel/repetition.js18
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.css31
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.html37
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.js274
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-resizer.reel/rich-text-resizer.css141
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-resizer.reel/rich-text-resizer.html45
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-resizer.reel/rich-text-resizer.js568
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js1706
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor.css30
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor.html41
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor.js614
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-sanitizer.js132
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.html56
-rw-r--r--node_modules/montage/ui/scroller.reel/scroller.js49
-rw-r--r--node_modules/montage/ui/select-input.reel/select-input.js7
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.html19
-rwxr-xr-xnode_modules/montage/ui/tabs.reel/tabs.html20
-rwxr-xr-xnode_modules/montage/ui/template.js313
-rw-r--r--node_modules/montage/ui/text-input.js24
-rw-r--r--node_modules/montage/ui/textarea.reel/textarea.js4
-rwxr-xr-xnode_modules/montage/ui/video-player.reel/video-player.html24
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.html1
50 files changed, 5799 insertions, 1876 deletions
diff --git a/node_modules/montage/ui/bluemoon/slider.reel/slider.js b/node_modules/montage/ui/bluemoon/slider.reel/slider.js
index 56c4faa8..1a0e3d6e 100644
--- a/node_modules/montage/ui/bluemoon/slider.reel/slider.js
+++ b/node_modules/montage/ui/bluemoon/slider.reel/slider.js
@@ -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 @module "montage/ui/bluemoon/slider.reel" 7 @module "montage/ui/bluemoon/slider.reel"
8 @requires montage/core/core 8 @requires montage/core/core
9 @requires montage/ui/component 9 @requires montage/ui/component
10*/ 10*/
@@ -199,6 +199,9 @@ exports.Slider = Montage.create(Component,/** @lends module:"montage/ui/bluemoon
199 }, 199 },
200 set: function (value) { 200 set: function (value) {
201 if (value !== this._minValue) { 201 if (value !== this._minValue) {
202 if(String.isString(value)) {
203 value = parseFloat(value);
204 }
202 this._minValue = value; 205 this._minValue = value;
203 this._valueRange = null; 206 this._valueRange = null;
204 this.needsDraw = true; 207 this.needsDraw = true;
@@ -226,6 +229,9 @@ exports.Slider = Montage.create(Component,/** @lends module:"montage/ui/bluemoon
226 }, 229 },
227 set: function (value) { 230 set: function (value) {
228 if (value !== this._maxValue) { 231 if (value !== this._maxValue) {
232 if(String.isString(value)) {
233 value = parseFloat(value);
234 }
229 this._maxValue = value; 235 this._maxValue = value;
230 this._valueRange = null; 236 this._valueRange = null;
231 this.needsDraw = true; 237 this.needsDraw = true;
@@ -288,6 +294,9 @@ exports.Slider = Montage.create(Component,/** @lends module:"montage/ui/bluemoon
288 }, 294 },
289 set: function (value) { 295 set: function (value) {
290 if (!isNaN(value)) { 296 if (!isNaN(value)) {
297 if(String.isString(value)) {
298 value = parseFloat(value);
299 }
291 if (value !== this._value) { 300 if (value !== this._value) {
292 this._value = parseFloat(value); 301 this._value = parseFloat(value);
293 this.needsDraw = true; 302 this.needsDraw = true;
@@ -450,7 +459,8 @@ exports.Slider = Montage.create(Component,/** @lends module:"montage/ui/bluemoon
450 */ 459 */
451 handleMousemove: { 460 handleMousemove: {
452 value: function (event) { 461 value: function (event) {
453 this.value = this._value + ((event.clientX - this._cursorPosition) * (this.valueRange)) / this._width; 462 this.value = this.value + ((event.clientX - this._cursorPosition) * (this.valueRange)) / this._width;
463
454 this._cursorPosition = event.clientX; 464 this._cursorPosition = event.clientX;
455 event.preventDefault(); 465 event.preventDefault();
456 event.stopPropagation(); 466 event.stopPropagation();
diff --git a/node_modules/montage/ui/button.reel/button.js b/node_modules/montage/ui/button.reel/button.js
index 5da92482..315cf505 100644
--- a/node_modules/montage/ui/button.reel/button.js
+++ b/node_modules/montage/ui/button.reel/button.js
@@ -13,6 +13,24 @@ var Montage = require("montage").Montage,
13 */ 13 */
14var Button = exports.Button = Montage.create(NativeControl, { 14var Button = exports.Button = Montage.create(NativeControl, {
15 15
16 /**
17 @event
18 @name action
19 @param {Event} event
20
21 Dispatched when the button is activated through a mouse click, finger tap,
22 or when focused and the spacebar is pressed.
23 */
24
25 /**
26 @event
27 @name hold
28 @param {Event} event
29
30 Dispatched when the button is pressed for a period of time, set by
31 {@link holdTimeout}.
32 */
33
16/** 34/**
17 Description TODO 35 Description TODO
18 @private 36 @private
@@ -105,6 +123,23 @@ var Button = exports.Button = Montage.create(NativeControl, {
105 }, 123 },
106 124
107 /** 125 /**
126 How long a press has to last for a hold event to be dispatched
127 */
128 holdTimeout: {
129 get: function() {
130 return this._pressComposer.longPressTimeout;
131 },
132 set: function(value) {
133 this._pressComposer.longPressTimeout = value;
134 }
135 },
136
137 _pressComposer: {
138 enumberable: false,
139 value: null
140 },
141
142 /**
108 True when the button is being interacted with, either through mouse click or 143 True when the button is being interacted with, either through mouse click or
109 touch event. 144 touch event.
110 @private 145 @private
@@ -129,13 +164,28 @@ var Button = exports.Button = Montage.create(NativeControl, {
129 } 164 }
130 }, 165 },
131 166
167 didCreate: {
168 value: function() {
169 this._pressComposer = PressComposer.create();
170 this.addComposer(this._pressComposer);
171 }
172 },
173