diff options
author | Valerio Virgillito | 2012-02-16 22:08:04 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-16 22:08:04 -0800 |
commit | 0175cb67e426a27a3ecfb7b81317caa383c8a5a5 (patch) | |
tree | b4fbfcaabaadff508ad5463e8f71fd643995aacb /node_modules/montage/ui/radio-button.reel | |
parent | fe71cb9aa1700199c0089166ad54fc56eb760644 (diff) | |
parent | 9f0c4efe2ed9a00f2c5d85c9d88a8040fedb5d8f (diff) | |
download | ninja-0175cb67e426a27a3ecfb7b81317caa383c8a5a5.tar.gz |
Merge branch 'refs/heads/master' into components
Diffstat (limited to 'node_modules/montage/ui/radio-button.reel')
-rwxr-xr-x | node_modules/montage/ui/radio-button.reel/radio-button.js | 19 |
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 | */ |
12 | var RadioButton = exports.RadioButton = Montage.create(CheckInput, { | 12 | var 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 | }); |