mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 09:34:29 +08:00
Merge pull request #2787 from ONLYOFFICE/fix/bugfix
[SSE] Fix Bug 65882
This commit is contained in:
@ -242,6 +242,10 @@ define([
|
||||
}).on('changed:after', function() {
|
||||
me.isStepChanged = true;
|
||||
});
|
||||
this.inputStep._input.on('input', function (e) {
|
||||
me.isInputStepFirstChange && me.inputStep.showError();
|
||||
me.isInputStepFirstChange = false;
|
||||
});
|
||||
|
||||
this.inputStop = new Common.UI.InputField({
|
||||
el : $window.find('#fill-input-stop-value'),
|
||||
@ -251,6 +255,10 @@ define([
|
||||
}).on('changed:after', function() {
|
||||
me.isStopChanged = true;
|
||||
});
|
||||
this.inputStop._input.on('input', function (e) {
|
||||
me.isInputStopFirstChange && me.inputStop.showError();
|
||||
me.isInputStopFirstChange = false;
|
||||
});
|
||||
|
||||
this.afterRender();
|
||||
},
|
||||
@ -330,21 +338,24 @@ define([
|
||||
},
|
||||
|
||||
isValid: function() {
|
||||
var regstr = new RegExp('^\s*[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)\s*$');
|
||||
if (this.isStepChanged) {
|
||||
var value = this.inputStep.getValue();
|
||||
(typeof value === 'string') && (value = value.replace(',','.'));
|
||||
if (value!=='' && isNaN(parseFloat(value))) {
|
||||
if (value!=='' && (!regstr.test(value.trim()) || isNaN(parseFloat(value)))) {
|
||||
this.inputStep.showError([this.txtErrorNumber]);
|
||||
this.inputStep.focus();
|
||||
this.isInputStepFirstChange = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.isStopChanged) {
|
||||
var value = this.inputStop.getValue();
|
||||
(typeof value === 'string') && (value = value.replace(',','.'));
|
||||
if (value!=='' && isNaN(parseFloat(value))) {
|
||||
if (value!=='' && (!regstr.test(value.trim()) || isNaN(parseFloat(value)))) {
|
||||
this.inputStop.showError([this.txtErrorNumber]);
|
||||
this.inputStop.focus();
|
||||
this.isInputStopFirstChange = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user