aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/checkbox.reel/checkbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/ui/checkbox.reel/checkbox.js')
-rw-r--r--node_modules/montage/ui/checkbox.reel/checkbox.js63
1 files changed, 58 insertions, 5 deletions
diff --git a/node_modules/montage/ui/checkbox.reel/checkbox.js b/node_modules/montage/ui/checkbox.reel/checkbox.js
index c6364e97..71c331da 100644
--- a/node_modules/montage/ui/checkbox.reel/checkbox.js
+++ b/node_modules/montage/ui/checkbox.reel/checkbox.js
@@ -3,24 +3,77 @@
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> 3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
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/**
7 @module "montage/ui/checkbox.reel"
8 @requires montage/core/core
9 @requires montage/ui/check-input
10*/
6var Montage = require("montage").Montage, 11var Montage = require("montage").Montage,
7 Component = require("ui/component").Component, 12 Component = require("ui/component").Component,
8 CheckInput = require("ui/check-input").CheckInput; 13 CheckInput = require("ui/check-input").CheckInput;
9 14
15/**
16
17 @class module:"montage/ui/checkbox.reel".Checkbox
18 @extends module:montage/ui/check-input.CheckInput
19 @example
20 TODO
21*/
10var Checkbox = exports.Checkbox = Montage.create(CheckInput, {}); 22var Checkbox = exports.Checkbox = Montage.create(CheckInput, {});
11Checkbox.addAttributes({ 23Checkbox.addAttributes( /** @lends module:"montage/ui/checkbox.reel".Checkbox# */ {
24
25/**
26 Specifies if the checkbox control should receive focus when the document loads. Because Montage components are loaded asynchronously after the document has loaded, setting this property has no effect on the element's focus state.
27 @type {boolean}
28 @default false
29*/
12 autofocus: {value: false, dataType: 'boolean'}, 30 autofocus: {value: false, dataType: 'boolean'},
31
32/**
33 Specifies if the checkbox control is disabled.
34 @type {boolean}
35 @default false
36*/
13 disabled: {value: false, dataType: 'boolean'}, 37 disabled: {value: false, dataType: 'boolean'},
38
39/**
40 Specifies if the checkbox is in it checked state or not.
41 @type {boolean}
42 @default false
43*/
14 checked: {value: false, dataType: 'boolean'}, 44 checked: {value: false, dataType: 'boolean'},
45
46/**
47 The value of the id attribute of the form with which to associate the element.
48 @type {string}
49 @default null
50*/
15 form: null, 51 form: null,
52
53/**
54 The name part of the name/value pair associated with this element for the purposes of form submission.
55 @type {string}
56 @default null
57*/
16 name: null, 58 name: null,
59
60/**
61 Specifies if this control is readonly.
62 @type {boolean}
63 @default false
64*/
17 readonly: {value: false, dataType: 'boolean'}, 65 readonly: {value: false, dataType: 'boolean'},
66
67/**
68 A string the browser displays in a tooltip when the user hovers their mouse over the element.
69 @type {string}
70 @default null
71*/
18 title: null, 72 title: null,
19 /* 73 /*
20 "On getting, if the element has a value attribute, it must return that 74 The value associated with the checkbox. Per the WC3 specification, if the element has a <code>value</code> attribute then the value of that attribute's value is returned; otherwise, it returns "on".
21 attribute's value; otherwise, it must return the string "on". On setting, 75 @type {string}
22 it must set the element's value attribute to the new value." 76 @default "on"
23 http://www.w3.org/TR/html5/common-input-element-attributes.html#dom-input-value-default-on
24 */ 77 */
25 value: {value: 'on'} 78 value: {value: 'on'}
26}); 79});