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