[SSE] Fix range validation

This commit is contained in:
Julia Radzhabova 2021-06-23 18:07:56 +03:00
parent 877ac8f18d
commit 9a8a40dd09
2 changed files with 5 additions and 3 deletions

View file

@ -174,8 +174,9 @@ define([
btnHint : this.textSelectData,
blankError : this.txtEmpty,
validateOnChange: true,
validateOnBlur: false,
validation : function(value) {
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.ConditionalFormattingRule, value, false);
var isvalid = me.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.ConditionalFormattingRule, value, true);
return (isvalid!==Asc.c_oAscError.ID.DataRangeError) ? true : me.textInvalidRange;
}
});
@ -423,7 +424,8 @@ define([
txtRangeName: 'Title',
txtRange: 'Range',
txtEmpty: 'This field is required',
textSelectData: 'Select Data'
textSelectData: 'Select Data',
textInvalidRange: 'ERROR! Invalid cells range'
}, SSE.Views.ProtectDialog || {}));
});

View file

@ -166,7 +166,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ProtectRangesDlg.template',
arr.push({
name: ranges[i].asc_getName() || '',
pwd: ranges[i].asc_isPassword(),
range: ranges[i].asc_getSqref(),
range: ranges[i].asc_getSqref() || '',
props: ranges[i],
lock: (id!==null && id!==undefined),
lockuser: (id) ? this.getUserName(id) : this.guestText