From 24b483db367291b72170f969de78efcb1a9b95bd Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 3 May 2012 22:53:07 -0700 Subject: integrating the latest montage version Signed-off-by: Valerio Virgillito --- .../montage/ui/radio-button.reel/radio-button.js | 65 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) (limited to 'node_modules/montage/ui/radio-button.reel') 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 b6f87205..450207a7 100755 --- a/node_modules/montage/ui/radio-button.reel/radio-button.js +++ b/node_modules/montage/ui/radio-button.reel/radio-button.js @@ -3,11 +3,19 @@ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ + +/** + @module "montage/ui/radio-button.reel" + @requires montage/ui/component + @requires montage/ui/check-input +*/ var Montage = require("montage").Montage, Component = require("ui/component").Component, CheckInput = require("ui/check-input").CheckInput; /** - * The Text input + * Wraps the a <input type="radio"> element with binding support for the element's standard attributes. + @class module:"montage/ui/radio-button.reel".RadioButton + @extends module:montage/check-input.CheckInput */ var RadioButton = exports.RadioButton = Montage.create(CheckInput, { _fakeCheck: { @@ -36,6 +44,12 @@ var RadioButton = exports.RadioButton = Montage.create(CheckInput, { enumerable: false, value: null }, + +/** + Specifies if the RadioButton is in its checked state or not. + @type {boolean} + @default false +*/ checked: { get: function() { // If we haven't synced with the input field then our value is @@ -95,13 +109,55 @@ var RadioButton = exports.RadioButton = Montage.create(CheckInput, { } } }); -RadioButton.addAttributes({ +RadioButton.addAttributes(/** @lends module:"montage/ui/radio-button.reel".RadioButton */ { + +/** + Specifies whether the radio button should be focused as soon as the page is loaded. + @type {boolean} + @default false +*/ autofocus: {value: false, dataType: 'boolean'}, + +/** + When true, the radio button is disabled to user input and "disabled" is added to the element's CSS class list, allowing you to style the disabled control. + @type {boolean} + @default false +*/ disabled: {value: false, dataType: 'boolean'}, + +/** + Specifies if the radio button is checked or not. + @type {boolean} + @default false +*/ checked: {value: false, dataType: 'boolean'}, + +/** + The value of the id attribute on the form with which to associate the radio button element. + @type string} + @default null +*/ form: null, + +/** + The name associated with the radio button's element. + @type {string} + @default null +*/ name: null, + +/** + Specifies whether or not the user can edit the radio button. + @type {boolean} + @default false +*/ readonly: {value: false, dataType: 'boolean'}, + +/** + Advisory information for the element, rendered as the element's tooltip. + @type {string}, + @default null +*/ title: null, /* "On getting, if the element has a value attribute, it must return that @@ -109,5 +165,10 @@ RadioButton.addAttributes({ it must set the element's value attribute to the new value." http://www.w3.org/TR/html5/common-input-element-attributes.html#dom-input-value-default-on */ +/** + The value associated with the element. + @type {string} + @default "on" +*/ value: {value: 'on'} }); -- cgit v1.2.3