From f7e4257745ccd44b8d24555f0ef787429d6e472c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 00:11:03 -0700 Subject: adding the latest v0.10 montage Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/text-input.js | 43 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'node_modules/montage/ui/text-input.js') diff --git a/node_modules/montage/ui/text-input.js b/node_modules/montage/ui/text-input.js index ef8beb5d..483a8126 100644 --- a/node_modules/montage/ui/text-input.js +++ b/node_modules/montage/ui/text-input.js @@ -42,27 +42,25 @@ var TextInput = exports.TextInput = Montage.create(NativeControl, /** @lends mo value: false }, -/** - The "typed" data value associated with the input element. When this property is set, if the component's converter property is non-null then its revert() method is invoked, passing it the newly assigned value. The revert() function is responsible for validating and converting the user-supplied value to its typed format. For example, in the case of a DateInput component (which extends TextInput) a user enters a string for the date (for example, "10-12-2005"). A DateConverter object is assigned to the component's converter property. + /** + The "typed" data value associated with the input element. When this property is set, if the component's converter property is non-null then its revert() method is invoked, passing it the newly assigned value. The revert() function is responsible for validating and converting the user-supplied value to its typed format. For example, in the case of a DateInput component (which extends TextInput) a user enters a string for the date (for example, "10-12-2005"). A DateConverter object is assigned to the component's converter property. - If the comopnent doesn't specify a converter object then the raw value is assigned to value. + If the comopnent doesn't specify a converter object then the raw value is assigned to value. - @type {string} - @default null -*/ -value: { - enumerable: true, - serializable: true, - get: function() { - return this._value; - }, - set: function(value, fromInput) { + @type {string} + @default null + */ + value: { + get: function() { + return this._value; + }, + set: function(value, fromInput) { - if(value !== this._value) { - if(this.converter) { - var convertedValue; - try { - convertedValue = this.converter.revert(value); + if(value !== this._value) { + if(this.converter) { + var convertedValue; + try { + convertedValue = this.converter.revert(value); if (this.error) { this.error = null; } @@ -86,7 +84,8 @@ value: { this.needsDraw = true; } } - } + }, + serializable: true }, // set value from user input @@ -107,7 +106,8 @@ value: { @see {@link module:montage/core/converter.Converter} */ converter:{ - value: null + value: null, + serializable: true }, _error: { @@ -162,7 +162,8 @@ value: { }, set: function(v) { this._updateOnInput = v; - } + }, + serializable: true }, // HTMLInputElement methods -- cgit v1.2.3