[SSE] Bug 65923

This commit is contained in:
Julia Radzhabova
2024-01-17 21:33:07 +03:00
parent f5254d16f2
commit ae071c427d

View File

@ -305,16 +305,6 @@ define([
},
getSettings: function () {
if (this.isStepChanged) {
var value = this.inputStep.getValue();
(typeof value === 'string') && (value = value.replace(',','.'));
this._changedProps.asc_setStepValue(value!=='' ? parseFloat(value) : null);
}
if (this.isStopChanged) {
var value = this.inputStop.getValue();
(typeof value === 'string') && (value = value.replace(',','.'));
this._changedProps.asc_setStopValue(value!=='' ? parseFloat(value) : null);
}
return this._changedProps;
},
@ -338,26 +328,25 @@ 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!=='' && (!regstr.test(value.trim()) || isNaN(parseFloat(value)))) {
var res = this._changedProps.asc_isValidStepValue(this.inputStep.getValue());
if (res[0]!==Asc.c_oAscError.ID.No || res[1]===null) {
this.inputStep.showError([this.txtErrorNumber]);
this.inputStep.focus();
this.isInputStepFirstChange = true;
return false;
}
} else
this._changedProps.asc_setStepValue(res[1]);
}
if (this.isStopChanged) {
var value = this.inputStop.getValue();
(typeof value === 'string') && (value = value.replace(',','.'));
if (value!=='' && (!regstr.test(value.trim()) || isNaN(parseFloat(value)))) {
var res = this._changedProps.asc_isValidStepValue(this.inputStop.getValue());
if (res[0]!==Asc.c_oAscError.ID.No || res[1]===null) {
this.inputStop.showError([this.txtErrorNumber]);
this.inputStop.focus();
this.isInputStopFirstChange = true;
return false;
}
} else
this._changedProps.asc_setStopValue(res[1]);
}
return true;
},