Commit 2bc6ee63 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige gestión de deshabilitado de booleanos

Revisa evaluación de valor a setear en el modelo por parte de los campos
booleanos (CheckBoxImpl), respetando el valor nulo cuando se
deshabilitan, en lugar de forzar un valor falso.

Arregla detalles de sintaxis.
parent efaf4ca5
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ define([
	, put
	, Input
) {

	return declare(Input, {
		//	summary:
		//		Implementación de input CheckBox.
@@ -33,18 +34,24 @@ define([

			var widget = new CheckBox(this._inputProps).placeAt(this.containerInput);

			if (this._inputProps.description)
			if (this._inputProps.description) {
				put(this.containerInput, 'span[title=$].separateLeft.fa.fa-info-circle', this._inputProps.description);
			}

			return widget;
		},

		_getValueToSet: function(value) {

			if (value)
				return this._inputProps.value || value;
			if (this._disableInputActive && this._inputDisabled) {
				return null;
			}

			if (value !== undefined && value !== null) {
				return value;
			}

			return this._inputProps.value !== undefined ? null : false;
			return this._inputProps.value || false;
		}
	});
});
+1 −7
Original line number Diff line number Diff line
@@ -117,13 +117,7 @@ define([

		_isValidDate: function(valueMoment) {

			valueMomentFormat = valueMoment.format(this.formatDateTimeModel);

			if (valueMomentFormat !== 'Invalid date') {
				return true;
			}

			return false;
			return valueMoment.format(this.formatDateTimeModel) !== 'Invalid date';
		},

		_setValueTimeDefault: function(valueMoment, value) {
+1 −1

File changed.

Contains only whitespace changes.