Browse Source

Merge pull request #293 in FUI/fineui from ~WINDY/fui:master to master

* commit 'a327f29c00cb0dfd847effdbf3fd1d6d098efbcd':
  update
  BI-16663 编辑框控件上一次有效值的问题
  fineui的demo报错
master
guy 7 years ago
parent
commit
56c24cf2a9
  1. 2
      demo/js/case/editor/demo.sign_editor.js
  2. 2
      dist/_fineui.min.js
  3. 4
      dist/base.js
  4. 4
      dist/bundle.js
  5. 6
      dist/bundle.min.js
  6. 2
      dist/demo.js
  7. 2
      dist/fineui.min.js
  8. 4
      src/base/single/input/input.js

2
demo/js/case/editor/demo.sign_editor.js

@ -10,7 +10,7 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
cls: "bi-border",
validationChecker: function (v) {
return v != "a";
return v != "abc";
},
watermark: "可以设置标记的输入框",
text: "这是一个标记,点击它即可进行输入"

2
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/base.js vendored

@ -19706,6 +19706,7 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
}
@ -19845,7 +19846,7 @@ BI.Input = BI.inherit(BI.Single, {
this._checkValidationOnValueChange();
this._defaultState();
if (this.isValid()) {
this._lastSubmitValue = this.getValue();
this._lastValidValue = this._lastSubmitValue = this.getValue();
}
}, this));
},
@ -19865,7 +19866,6 @@ BI.Input = BI.inherit(BI.Single, {
_setValid: function () {
BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) {
this._lastValidValue = this.getValue();
this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);
} else {

4
dist/bundle.js vendored

@ -53561,6 +53561,7 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
}
@ -53700,7 +53701,7 @@ BI.Input = BI.inherit(BI.Single, {
this._checkValidationOnValueChange();
this._defaultState();
if (this.isValid()) {
this._lastSubmitValue = this.getValue();
this._lastValidValue = this._lastSubmitValue = this.getValue();
}
}, this));
},
@ -53720,7 +53721,6 @@ BI.Input = BI.inherit(BI.Single, {
_setValid: function () {
BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) {
this._lastValidValue = this.getValue();
this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);
} else {

6
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js vendored

@ -2536,7 +2536,7 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
cls: "bi-border",
validationChecker: function (v) {
return v != "a";
return v != "abc";
},
watermark: "可以设置标记的输入框",
text: "这是一个标记,点击它即可进行输入"

2
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

4
src/base/single/input/input.js

@ -97,6 +97,7 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
}
@ -236,7 +237,7 @@ BI.Input = BI.inherit(BI.Single, {
this._checkValidationOnValueChange();
this._defaultState();
if (this.isValid()) {
this._lastSubmitValue = this.getValue();
this._lastValidValue = this._lastSubmitValue = this.getValue();
}
}, this));
},
@ -256,7 +257,6 @@ BI.Input = BI.inherit(BI.Single, {
_setValid: function () {
BI.Input.superclass._setValid.apply(this, arguments);
if (this.isValid()) {
this._lastValidValue = this.getValue();
this.element.removeClass("bi-input-error");
this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);
} else {

Loading…
Cancel
Save