diff options
Diffstat (limited to 'node_modules/montage-user/ui/checkbox.reel/checkbox.js')
-rw-r--r-- | node_modules/montage-user/ui/checkbox.reel/checkbox.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/node_modules/montage-user/ui/checkbox.reel/checkbox.js b/node_modules/montage-user/ui/checkbox.reel/checkbox.js new file mode 100644 index 00000000..df2995c3 --- /dev/null +++ b/node_modules/montage-user/ui/checkbox.reel/checkbox.js | |||
@@ -0,0 +1,26 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<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. | ||
5 | </copyright> */ | ||
6 | var Montage = require("montage").Montage, | ||
7 | Component = require("ui/component").Component, | ||
8 | CheckInput = require("ui/check-input").CheckInput; | ||
9 | |||
10 | var Checkbox = exports.Checkbox = Montage.create(CheckInput, {}); | ||
11 | Checkbox.addAttributes({ | ||
12 | autofocus: 'off', // on/off | ||
13 | disabled: {value: false, dataType: 'boolean'}, | ||
14 | checked: {value: false, dataType: 'boolean'}, | ||
15 | form: null, | ||
16 | name: null, | ||
17 | readonly: {value: false, dataType: 'boolean'}, | ||
18 | title: null, | ||
19 | /* | ||
20 | "On getting, if the element has a value attribute, it must return that | ||
21 | attribute's value; otherwise, it must return the string "on". On setting, | ||
22 | it must set the element's value attribute to the new value." | ||
23 | http://www.w3.org/TR/html5/common-input-element-attributes.html#dom-input-value-default-on | ||
24 | */ | ||
25 | value: {value: 'on'} | ||
26 | }); | ||