aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/radio-button.reel
diff options
context:
space:
mode:
authorEric Guzman2012-02-16 14:20:40 -0800
committerEric Guzman2012-02-16 14:20:40 -0800
commit6960f62a84b946c92a59e5f5dc537a818f9f62b8 (patch)
tree49cbff3fdd8dab11846e5a278406915ec0ec1508 /node_modules/montage/ui/radio-button.reel
parent82b1a273219f0ae3d119e156c7acccdbe478f441 (diff)
parent81942bd52f0713c9ff5d479ebd12fce577f45e45 (diff)
downloadninja-6960f62a84b946c92a59e5f5dc537a818f9f62b8.tar.gz
Merge branch 'refs/heads/master' into PresetsPanel
Diffstat (limited to 'node_modules/montage/ui/radio-button.reel')
-rwxr-xr-xnode_modules/montage/ui/radio-button.reel/radio-button.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/node_modules/montage/ui/radio-button.reel/radio-button.js b/node_modules/montage/ui/radio-button.reel/radio-button.js
index 8468ee21..9fe43336 100755
--- a/node_modules/montage/ui/radio-button.reel/radio-button.js
+++ b/node_modules/montage/ui/radio-button.reel/radio-button.js
@@ -10,6 +10,23 @@ var Montage = require("montage").Montage,
10 * The Text input 10 * The Text input
11 */ 11 */
12var RadioButton = exports.RadioButton = Montage.create(CheckInput, { 12var RadioButton = exports.RadioButton = Montage.create(CheckInput, {
13 _fakeCheck: {
14 enumerable: false,
15 value: function() {
16 var changeEvent;
17 // NOTE: this may be BAD, modifying the element outside of
18 // the draw loop, but it's what a click/touch would
19 // actually have done
20
21 if (!this._element.checked) {
22 this._element.checked = true;
23 changeEvent = document.createEvent("HTMLEvents");
24 changeEvent.initEvent("change", true, true);
25 this._element.dispatchEvent(changeEvent);
26 }
27 }
28 },
29
13 _checkedSyncedWithInputField: { 30 _checkedSyncedWithInputField: {
14 enumerable: false, 31 enumerable: false,
15 value: false 32 value: false
@@ -75,7 +92,7 @@ var RadioButton = exports.RadioButton = Montage.create(CheckInput, {
75 } 92 }
76 93
77 // Call super 94 // Call super
78 var fn = Object.getPrototypeOf(RadioButton).draw.call(this); 95 Object.getPrototypeOf(RadioButton).draw.call(this);
79 } 96 }
80 } 97 }
81}); 98});