Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fui

# Conflicts:
#	dist/_fineui.min.js
#	dist/fineui.min.js
master
windy 7 years ago
parent
commit
9ab90b1458
  1. 30
      dist/base.js
  2. 30
      dist/bundle.js
  3. 24
      dist/bundle.min.js
  4. 30
      dist/fineui.js
  5. 4
      src/base/single/editor/editor.js
  6. 26
      src/base/single/input/input.js

30
dist/base.js vendored

@ -18602,9 +18602,9 @@ BI.Editor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
if (!this.isValid()) { if (!this.isValid()) {
return BI.trim(this.editor.getLastValidValue()); return this.editor.getLastValidValue();
} }
return BI.trim(this.editor.getValue()); return this.editor.getValue();
}, },
isEditing: function () { isEditing: function () {
@ -19727,7 +19727,7 @@ BI.Input = BI.inherit(BI.Single, {
} }
function blur () { function blur () {
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { if (!self.isValid() && self.options.quitChecker.apply(self, [self.getValue()]) !== false) {
self.element.val(self._lastValidValue ? self._lastValidValue : ""); self.element.val(self._lastValidValue ? self._lastValidValue : "");
self._checkValidationOnValueChange(); self._checkValidationOnValueChange();
self._defaultState(); self._defaultState();
@ -19757,11 +19757,11 @@ BI.Input = BI.inherit(BI.Single, {
}, },
onKeyDown: function (keyCode, ctrlKey) { onKeyDown: function (keyCode, ctrlKey) {
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { if (!this.isValid() || this._lastValidValue !== this.getValue()) {
this._checkValidationOnValueChange(); this._checkValidationOnValueChange();
} }
if (this.isValid() && BI.trim(this.getValue()) !== "") { if (this.isValid() && this.getValue() !== "") {
if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") if (this.getValue() !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "")
|| (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) {
this._start = true; this._start = true;
this._pause = false; this._pause = false;
@ -19773,7 +19773,7 @@ BI.Input = BI.inherit(BI.Single, {
this._valueChange(); this._valueChange();
} else { } else {
if (keyCode == BI.KeyCode.ENTER) { if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { if (this.isValid() || this.options.quitChecker.apply(this, [this.getValue()]) !== false) {
this.blur(); this.blur();
this.fireEvent(BI.Input.EVENT_ENTER); this.fireEvent(BI.Input.EVENT_ENTER);
} else { } else {
@ -19798,7 +19798,7 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_PAUSE); this.fireEvent(BI.Input.EVENT_PAUSE);
this._defaultState(); this._defaultState();
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { this.getValue() === "" && (this._lastValue !== null && this._lastValue !== "")) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_STOP); this.fireEvent(BI.Input.EVENT_STOP);
this._valueChange(); this._valueChange();
@ -19818,10 +19818,10 @@ BI.Input = BI.inherit(BI.Single, {
}, },
_valueChange: function () { _valueChange: function () {
if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { if (this.isValid() && this.getValue() !== this._lastSubmitValue) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_CHANGE); this.fireEvent(BI.Input.EVENT_CHANGE);
this._lastSubmitValue = BI.trim(this.getValue()); this._lastSubmitValue = this.getValue();
} }
if (this.getValue() == "") { if (this.getValue() == "") {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);
@ -19834,10 +19834,10 @@ BI.Input = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var v = this.getValue(); var v = this.getValue();
this.setValid( this.setValid(
(o.allowBlank === true && BI.trim(v) == "") || (o.allowBlank === true && v == "") ||
(BI.isNotEmptyString(BI.trim(v)) (BI.isNotEmptyString(v)
&& (v === this._lastValidValue || && (v === this._lastValidValue ||
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) o.validationChecker.apply(this, [v]) !== false))
); );
}, },
@ -19897,13 +19897,13 @@ BI.Input = BI.inherit(BI.Single, {
BI.Input.superclass._setValid.apply(this, arguments); BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) { if (this.isValid()) {
this.element.removeClass("bi-input-error"); this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_VALID, this.getValue(), this);
} else { } else {
if (this._lastValidValue === this.getValue()) { if (this._lastValidValue === this.getValue()) {
this._lastValidValue = null; this._lastValidValue = null;
} }
this.element.addClass("bi-input-error"); this.element.addClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_ERROR, this.getValue(), this);
} }
}, },

30
dist/bundle.js vendored

@ -54368,9 +54368,9 @@ BI.Editor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
if (!this.isValid()) { if (!this.isValid()) {
return BI.trim(this.editor.getLastValidValue()); return this.editor.getLastValidValue();
} }
return BI.trim(this.editor.getValue()); return this.editor.getValue();
}, },
isEditing: function () { isEditing: function () {
@ -55493,7 +55493,7 @@ BI.Input = BI.inherit(BI.Single, {
} }
function blur () { function blur () {
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { if (!self.isValid() && self.options.quitChecker.apply(self, [self.getValue()]) !== false) {
self.element.val(self._lastValidValue ? self._lastValidValue : ""); self.element.val(self._lastValidValue ? self._lastValidValue : "");
self._checkValidationOnValueChange(); self._checkValidationOnValueChange();
self._defaultState(); self._defaultState();
@ -55523,11 +55523,11 @@ BI.Input = BI.inherit(BI.Single, {
}, },
onKeyDown: function (keyCode, ctrlKey) { onKeyDown: function (keyCode, ctrlKey) {
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { if (!this.isValid() || this._lastValidValue !== this.getValue()) {
this._checkValidationOnValueChange(); this._checkValidationOnValueChange();
} }
if (this.isValid() && BI.trim(this.getValue()) !== "") { if (this.isValid() && this.getValue() !== "") {
if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") if (this.getValue() !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "")
|| (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) {
this._start = true; this._start = true;
this._pause = false; this._pause = false;
@ -55539,7 +55539,7 @@ BI.Input = BI.inherit(BI.Single, {
this._valueChange(); this._valueChange();
} else { } else {
if (keyCode == BI.KeyCode.ENTER) { if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { if (this.isValid() || this.options.quitChecker.apply(this, [this.getValue()]) !== false) {
this.blur(); this.blur();
this.fireEvent(BI.Input.EVENT_ENTER); this.fireEvent(BI.Input.EVENT_ENTER);
} else { } else {
@ -55564,7 +55564,7 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_PAUSE); this.fireEvent(BI.Input.EVENT_PAUSE);
this._defaultState(); this._defaultState();
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { this.getValue() === "" && (this._lastValue !== null && this._lastValue !== "")) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_STOP); this.fireEvent(BI.Input.EVENT_STOP);
this._valueChange(); this._valueChange();
@ -55584,10 +55584,10 @@ BI.Input = BI.inherit(BI.Single, {
}, },
_valueChange: function () { _valueChange: function () {
if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { if (this.isValid() && this.getValue() !== this._lastSubmitValue) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_CHANGE); this.fireEvent(BI.Input.EVENT_CHANGE);
this._lastSubmitValue = BI.trim(this.getValue()); this._lastSubmitValue = this.getValue();
} }
if (this.getValue() == "") { if (this.getValue() == "") {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);
@ -55600,10 +55600,10 @@ BI.Input = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var v = this.getValue(); var v = this.getValue();
this.setValid( this.setValid(
(o.allowBlank === true && BI.trim(v) == "") || (o.allowBlank === true && v == "") ||
(BI.isNotEmptyString(BI.trim(v)) (BI.isNotEmptyString(v)
&& (v === this._lastValidValue || && (v === this._lastValidValue ||
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) o.validationChecker.apply(this, [v]) !== false))
); );
}, },
@ -55663,13 +55663,13 @@ BI.Input = BI.inherit(BI.Single, {
BI.Input.superclass._setValid.apply(this, arguments); BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) { if (this.isValid()) {
this.element.removeClass("bi-input-error"); this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_VALID, this.getValue(), this);
} else { } else {
if (this._lastValidValue === this.getValue()) { if (this._lastValidValue === this.getValue()) {
this._lastValidValue = null; this._lastValidValue = null;
} }
this.element.addClass("bi-input-error"); this.element.addClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_ERROR, this.getValue(), this);
} }
}, },

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.js vendored

@ -54611,9 +54611,9 @@ BI.Editor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
if (!this.isValid()) { if (!this.isValid()) {
return BI.trim(this.editor.getLastValidValue()); return this.editor.getLastValidValue();
} }
return BI.trim(this.editor.getValue()); return this.editor.getValue();
}, },
isEditing: function () { isEditing: function () {
@ -55736,7 +55736,7 @@ BI.Input = BI.inherit(BI.Single, {
} }
function blur () { function blur () {
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { if (!self.isValid() && self.options.quitChecker.apply(self, [self.getValue()]) !== false) {
self.element.val(self._lastValidValue ? self._lastValidValue : ""); self.element.val(self._lastValidValue ? self._lastValidValue : "");
self._checkValidationOnValueChange(); self._checkValidationOnValueChange();
self._defaultState(); self._defaultState();
@ -55766,11 +55766,11 @@ BI.Input = BI.inherit(BI.Single, {
}, },
onKeyDown: function (keyCode, ctrlKey) { onKeyDown: function (keyCode, ctrlKey) {
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { if (!this.isValid() || this._lastValidValue !== this.getValue()) {
this._checkValidationOnValueChange(); this._checkValidationOnValueChange();
} }
if (this.isValid() && BI.trim(this.getValue()) !== "") { if (this.isValid() && this.getValue() !== "") {
if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") if (this.getValue() !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "")
|| (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) {
this._start = true; this._start = true;
this._pause = false; this._pause = false;
@ -55782,7 +55782,7 @@ BI.Input = BI.inherit(BI.Single, {
this._valueChange(); this._valueChange();
} else { } else {
if (keyCode == BI.KeyCode.ENTER) { if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { if (this.isValid() || this.options.quitChecker.apply(this, [this.getValue()]) !== false) {
this.blur(); this.blur();
this.fireEvent(BI.Input.EVENT_ENTER); this.fireEvent(BI.Input.EVENT_ENTER);
} else { } else {
@ -55807,7 +55807,7 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_PAUSE); this.fireEvent(BI.Input.EVENT_PAUSE);
this._defaultState(); this._defaultState();
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { this.getValue() === "" && (this._lastValue !== null && this._lastValue !== "")) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_STOP); this.fireEvent(BI.Input.EVENT_STOP);
this._valueChange(); this._valueChange();
@ -55827,10 +55827,10 @@ BI.Input = BI.inherit(BI.Single, {
}, },
_valueChange: function () { _valueChange: function () {
if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { if (this.isValid() && this.getValue() !== this._lastSubmitValue) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_CHANGE); this.fireEvent(BI.Input.EVENT_CHANGE);
this._lastSubmitValue = BI.trim(this.getValue()); this._lastSubmitValue = this.getValue();
} }
if (this.getValue() == "") { if (this.getValue() == "") {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);
@ -55843,10 +55843,10 @@ BI.Input = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var v = this.getValue(); var v = this.getValue();
this.setValid( this.setValid(
(o.allowBlank === true && BI.trim(v) == "") || (o.allowBlank === true && v == "") ||
(BI.isNotEmptyString(BI.trim(v)) (BI.isNotEmptyString(v)
&& (v === this._lastValidValue || && (v === this._lastValidValue ||
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) o.validationChecker.apply(this, [v]) !== false))
); );
}, },
@ -55906,13 +55906,13 @@ BI.Input = BI.inherit(BI.Single, {
BI.Input.superclass._setValid.apply(this, arguments); BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) { if (this.isValid()) {
this.element.removeClass("bi-input-error"); this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_VALID, this.getValue(), this);
} else { } else {
if (this._lastValidValue === this.getValue()) { if (this._lastValidValue === this.getValue()) {
this._lastValidValue = null; this._lastValidValue = null;
} }
this.element.addClass("bi-input-error"); this.element.addClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_ERROR, this.getValue(), this);
} }
}, },

4
src/base/single/editor/editor.js

@ -288,9 +288,9 @@ BI.Editor = BI.inherit(BI.Single, {
getValue: function () { getValue: function () {
if (!this.isValid()) { if (!this.isValid()) {
return BI.trim(this.editor.getLastValidValue()); return this.editor.getLastValidValue();
} }
return BI.trim(this.editor.getValue()); return this.editor.getValue();
}, },
isEditing: function () { isEditing: function () {

26
src/base/single/input/input.js

@ -88,7 +88,7 @@ BI.Input = BI.inherit(BI.Single, {
} }
function blur () { function blur () {
if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) { if (!self.isValid() && self.options.quitChecker.apply(self, [self.getValue()]) !== false) {
self.element.val(self._lastValidValue ? self._lastValidValue : ""); self.element.val(self._lastValidValue ? self._lastValidValue : "");
self._checkValidationOnValueChange(); self._checkValidationOnValueChange();
self._defaultState(); self._defaultState();
@ -118,11 +118,11 @@ BI.Input = BI.inherit(BI.Single, {
}, },
onKeyDown: function (keyCode, ctrlKey) { onKeyDown: function (keyCode, ctrlKey) {
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { if (!this.isValid() || this._lastValidValue !== this.getValue()) {
this._checkValidationOnValueChange(); this._checkValidationOnValueChange();
} }
if (this.isValid() && BI.trim(this.getValue()) !== "") { if (this.isValid() && this.getValue() !== "") {
if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "") if (this.getValue() !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === "")
|| (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) { || (this._pause === true && !/(\s|\u00A0)$/.test(this.getValue()))) {
this._start = true; this._start = true;
this._pause = false; this._pause = false;
@ -134,7 +134,7 @@ BI.Input = BI.inherit(BI.Single, {
this._valueChange(); this._valueChange();
} else { } else {
if (keyCode == BI.KeyCode.ENTER) { if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) { if (this.isValid() || this.options.quitChecker.apply(this, [this.getValue()]) !== false) {
this.blur(); this.blur();
this.fireEvent(BI.Input.EVENT_ENTER); this.fireEvent(BI.Input.EVENT_ENTER);
} else { } else {
@ -159,7 +159,7 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_PAUSE); this.fireEvent(BI.Input.EVENT_PAUSE);
this._defaultState(); this._defaultState();
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) && } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) { this.getValue() === "" && (this._lastValue !== null && this._lastValue !== "")) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_STOP); this.fireEvent(BI.Input.EVENT_STOP);
this._valueChange(); this._valueChange();
@ -179,10 +179,10 @@ BI.Input = BI.inherit(BI.Single, {
}, },
_valueChange: function () { _valueChange: function () {
if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) { if (this.isValid() && this.getValue() !== this._lastSubmitValue) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_CHANGE); this.fireEvent(BI.Input.EVENT_CHANGE);
this._lastSubmitValue = BI.trim(this.getValue()); this._lastSubmitValue = this.getValue();
} }
if (this.getValue() == "") { if (this.getValue() == "") {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);
@ -195,10 +195,10 @@ BI.Input = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var v = this.getValue(); var v = this.getValue();
this.setValid( this.setValid(
(o.allowBlank === true && BI.trim(v) == "") || (o.allowBlank === true && v == "") ||
(BI.isNotEmptyString(BI.trim(v)) (BI.isNotEmptyString(v)
&& (v === this._lastValidValue || && (v === this._lastValidValue ||
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) o.validationChecker.apply(this, [v]) !== false))
); );
}, },
@ -258,13 +258,13 @@ BI.Input = BI.inherit(BI.Single, {
BI.Input.superclass._setValid.apply(this, arguments); BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) { if (this.isValid()) {
this.element.removeClass("bi-input-error"); this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_VALID, this.getValue(), this);
} else { } else {
if (this._lastValidValue === this.getValue()) { if (this._lastValidValue === this.getValue()) {
this._lastValidValue = null; this._lastValidValue = null;
} }
this.element.addClass("bi-input-error"); this.element.addClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); this.fireEvent(BI.Input.EVENT_ERROR, this.getValue(), this);
} }
}, },

Loading…
Cancel
Save