aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/check-input.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-07 16:55:34 -0800
committerArmen Kesablyan2012-02-07 16:55:34 -0800
commit10f0ad4c15f090b2d0d50d11e4c7aaf291e9eb0e (patch)
tree12b31910a3c7c7fa2ee0b26d8aaa611710e139a5 /node_modules/montage/ui/check-input.js
parent7f8730c3add146f1ba107e6fc22d1f5a8348ed8b (diff)
parent668510892537eaaeb2e11520831d87b44b2489b7 (diff)
downloadninja-10f0ad4c15f090b2d0d50d11e4c7aaf291e9eb0e.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into text-tool
Conflicts: _scss/compass_app_log.txt css/ninja.css
Diffstat (limited to 'node_modules/montage/ui/check-input.js')
-rw-r--r--node_modules/montage/ui/check-input.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/node_modules/montage/ui/check-input.js b/node_modules/montage/ui/check-input.js
new file mode 100644
index 00000000..6338c42c
--- /dev/null
+++ b/node_modules/montage/ui/check-input.js
@@ -0,0 +1,46 @@
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
7var Montage = require("montage").Montage,
8 Component = require("ui/component").Component,
9 NativeControl = require("ui/native-control").NativeControl;
10
11var CheckInput = exports.CheckInput = Montage.create(NativeControl, {
12
13 // Callbacks
14 draw: {
15 value: function() {
16 // Call super
17 Object.getPrototypeOf(CheckInput).draw.call(this);
18 this._element.setAttribute("aria-checked", this._checked);
19 }
20 },
21
22 /**
23 Description TODO
24 @function
25 */
26 prepareForDraw: {
27 enumerable: false,
28 value: function() {
29 this.element.addEventListener('change', this);
30 }
31 },
32
33/**
34 Description TODO
35 @function
36 @param {Event Handler} event TODO
37 */
38 handleChange: {
39 enumerable: false,
40 value: function(event) {
41 Object.getPropertyDescriptor(this, "checked").set.call(this,
42 this.element.checked, true);
43 this._dispatchActionEvent();
44 }
45 }
46});