|
|
|
@ -45196,7 +45196,7 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onKeyDown: function (keyCode, ctrlKey) { |
|
|
|
|
if (!this.isValid() || BI.trim(this._lastValidValue) !== BI.trim(this.getValue())) { |
|
|
|
|
if (!this.isValid() || BI.trim(this._lastChangedValue) !== BI.trim(this.getValue())) { |
|
|
|
|
this._checkValidationOnValueChange(); |
|
|
|
|
} |
|
|
|
|
if (this.isValid() && BI.trim(this.getValue()) !== "") { |
|
|
|
@ -45275,7 +45275,7 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
this.setValid( |
|
|
|
|
(o.allowBlank === true && BI.trim(v) == "") || |
|
|
|
|
(BI.isNotEmptyString(BI.trim(v)) |
|
|
|
|
&& (v === this._lastValidValue || |
|
|
|
|
&& (v === this._lastChangedValue || |
|
|
|
|
o.validationChecker.apply(this, [BI.trim(v)]) !== false)) |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
@ -45328,17 +45328,18 @@ BI.Input = BI.inherit(BI.Single, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getLastValidValue: function () { |
|
|
|
|
return this._lastValidValue; |
|
|
|
|
return this._lastChangedValue; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setValid: function () { |
|
|
|
|
BI.Input.superclass._setValid.apply(this, arguments); |
|
|
|
|
if (this.isValid()) { |
|
|
|
|
this._lastChangedValue = this.getValue(); |
|
|
|
|
this.element.removeClass("bi-input-error"); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this); |
|
|
|
|
} else { |
|
|
|
|
if (this._lastValidValue === this.getValue()) { |
|
|
|
|
this._lastValidValue = null; |
|
|
|
|
if (this._lastChangedValue === this.getValue()) { |
|
|
|
|
this._lastChangedValue = null; |
|
|
|
|
} |
|
|
|
|
this.element.addClass("bi-input-error"); |
|
|
|
|
this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this); |
|
|
|
@ -64017,7 +64018,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getKeywords: function () { |
|
|
|
|
var val = this.editor.getValue(); |
|
|
|
|
var val = this.editor.getLastValidValue(); |
|
|
|
|
var keywords = val.match(/[\S]+/g); |
|
|
|
|
if (BI.isEndWithBlank(val)) { |
|
|
|
|
return keywords.concat([" "]); |
|
|
|
@ -64035,7 +64036,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
this.clear.visible(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isEditing: function () { |
|
|
|
|
return this.editor.isEditing(); |
|
|
|
|
}, |
|
|
|
@ -70140,8 +70141,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getKeywords: function () { |
|
|
|
|
// BI-37541 这个editor不会check内容, 没有上一次有效值的说法
|
|
|
|
|
var val = this.editor.getValue(); |
|
|
|
|
var val = this.editor.getLastValidValue(); |
|
|
|
|
var keywords = val.match(/[\S]+/g); |
|
|
|
|
if (BI.isEndWithBlank(val)) { |
|
|
|
|
return keywords.concat([" "]); |
|
|
|
@ -76998,8 +76998,7 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getKeywords: function () { |
|
|
|
|
// BI-37541 这个editor不会check内容, 没有上一次有效值的说法
|
|
|
|
|
var val = this.editor.getValue(); |
|
|
|
|
var val = this.editor.getLastValidValue(); |
|
|
|
|
var keywords = val.match(/[\S]+/g); |
|
|
|
|
if (BI.isEndWithBlank(val)) { |
|
|
|
|
return keywords.concat([" "]); |
|
|
|
|