diff options
Diffstat (limited to 'node_modules/montage/ui/check-input.js')
-rw-r--r-- | node_modules/montage/ui/check-input.js | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/node_modules/montage/ui/check-input.js b/node_modules/montage/ui/check-input.js index 58f1cbc7..aeba7a86 100644 --- a/node_modules/montage/ui/check-input.js +++ b/node_modules/montage/ui/check-input.js | |||
@@ -4,13 +4,32 @@ | |||
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 | /*global require, exports */ | 6 | /*global require, exports */ |
7 | |||
8 | /** | ||
9 | @module montage/ui/check-input | ||
10 | @requires montage/ui/component | ||
11 | @requires montage/ui/native-control | ||
12 | @requires montage/ui/composer/press-composer | ||
13 | */ | ||
7 | var Montage = require("montage").Montage, | 14 | var Montage = require("montage").Montage, |
8 | Component = require("ui/component").Component, | 15 | Component = require("ui/component").Component, |
9 | NativeControl = require("ui/native-control").NativeControl, | 16 | NativeControl = require("ui/native-control").NativeControl, |
10 | PressComposer = require("ui/composer/press-composer").PressComposer; | 17 | PressComposer = require("ui/composer/press-composer").PressComposer; |
11 | 18 | ||
19 | /** | ||
20 | The base class for the Checkbox component. You will not typically create this class directly but instead use the Checkbox component. | ||
21 | @class module:montage/ui/text-input.CheckInput | ||
22 | @extends module:montage/ui/native-control.NativeControl | ||
23 | @see module:"montage/ui/checkbox.reel".CheckBox | ||
24 | */ | ||
12 | var CheckInput = exports.CheckInput = Montage.create(NativeControl, { | 25 | var CheckInput = exports.CheckInput = Montage.create(NativeControl, { |
13 | 26 | ||
27 | // HTMLInputElement methods | ||
28 | |||
29 | blur: { value: function() { this._element.blur(); } }, | ||
30 | focus: { value: function() { this._element.focus(); } }, | ||
31 | // click() deliberately omitted, use checked = instead | ||
32 | |||
14 | // Callbacks | 33 | // Callbacks |
15 | draw: { | 34 | draw: { |
16 | value: function() { | 35 | value: function() { |
@@ -41,8 +60,6 @@ var CheckInput = exports.CheckInput = Montage.create(NativeControl, { | |||
41 | } | 60 | } |
42 | }, | 61 | }, |
43 | 62 | ||
44 | |||
45 | |||
46 | /** | 63 | /** |
47 | Fake the checking of the element. | 64 | Fake the checking of the element. |
48 | 65 | ||
@@ -66,7 +83,7 @@ var CheckInput = exports.CheckInput = Montage.create(NativeControl, { | |||
66 | }, | 83 | }, |
67 | 84 | ||
68 | /** | 85 | /** |
69 | Stores if we need to fake checking. | 86 | Stores if we need to "fake" checking of the input element. |
70 | 87 | ||
71 | When preventDefault is called on touchstart and touchend events (e.g. by | 88 | When preventDefault is called on touchstart and touchend events (e.g. by |
72 | the scroller component) the checkbox doesn't check itself, so we need | 89 | the scroller component) the checkbox doesn't check itself, so we need |