Browse Source

BI-40871 fix: 还原_lastValidValue的意义并更名为_lastChangedValue && _lastValidValue作为上一次提交有效值存在

es6
windy 6 years ago
parent
commit
4ac636a32a
  1. 11
      dist/base.js
  2. 21
      dist/bundle.ie.js
  3. 48
      dist/bundle.ie.min.js
  4. 21
      dist/bundle.js
  5. 48
      dist/bundle.min.js
  6. 21
      dist/fineui.ie.js
  7. 46
      dist/fineui.ie.min.js
  8. 21
      dist/fineui.js
  9. 48
      dist/fineui.min.js
  10. 21
      dist/fineui_without_jquery_polyfill.js
  11. 2
      dist/utils.min.js
  12. 10
      dist/widget.js
  13. 11
      src/base/single/input/input.js
  14. 4
      src/widget/editor/editor.search.js
  15. 3
      src/widget/multiselect/trigger/editor.multiselect.js
  16. 3
      src/widget/singleselect/trigger/editor.singleselect.js

11
dist/base.js vendored

@ -10072,7 +10072,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()) !== "") {
@ -10151,7 +10151,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))
);
},
@ -10204,17 +10204,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);

21
dist/bundle.ie.js vendored

@ -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([" "]);

48
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/bundle.js vendored

@ -45600,7 +45600,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()) !== "") {
@ -45679,7 +45679,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))
);
},
@ -45732,17 +45732,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);
@ -64421,7 +64422,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([" "]);
@ -64439,7 +64440,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},
@ -70544,8 +70545,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([" "]);
@ -77402,8 +77402,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([" "]);

48
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/fineui.ie.js vendored

@ -45441,7 +45441,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()) !== "") {
@ -45520,7 +45520,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))
);
},
@ -45573,17 +45573,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);
@ -64262,7 +64263,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([" "]);
@ -64280,7 +64281,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},
@ -70385,8 +70386,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([" "]);
@ -77243,8 +77243,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([" "]);

46
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/fineui.js vendored

@ -45845,7 +45845,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()) !== "") {
@ -45924,7 +45924,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))
);
},
@ -45977,17 +45977,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);
@ -64666,7 +64667,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([" "]);
@ -64684,7 +64685,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},
@ -70789,8 +70790,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([" "]);
@ -77647,8 +77647,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([" "]);

48
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/fineui_without_jquery_polyfill.js vendored

@ -32815,7 +32815,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()) !== "") {
@ -32894,7 +32894,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))
);
},
@ -32947,17 +32947,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);
@ -47464,7 +47465,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([" "]);
@ -47482,7 +47483,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},
@ -53587,8 +53588,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([" "]);
@ -60445,8 +60445,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([" "]);

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

10
dist/widget.js vendored

@ -4907,7 +4907,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([" "]);
@ -4925,7 +4925,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},
@ -11030,8 +11030,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([" "]);
@ -17888,8 +17887,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([" "]);

11
src/base/single/input/input.js

@ -129,7 +129,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()) !== "") {
@ -208,7 +208,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))
);
},
@ -261,17 +261,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);

4
src/widget/editor/editor.search.js

@ -144,7 +144,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([" "]);
@ -162,7 +162,7 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.clear.visible();
}
},
isEditing: function () {
return this.editor.isEditing();
},

3
src/widget/multiselect/trigger/editor.multiselect.js

@ -70,8 +70,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([" "]);

3
src/widget/singleselect/trigger/editor.singleselect.js

@ -64,8 +64,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([" "]);

Loading…
Cancel
Save