[SSE] Fix range validation
This commit is contained in:
parent
877ac8f18d
commit
9a8a40dd09
|
@ -174,8 +174,9 @@ define([
|
||||||
btnHint : this.textSelectData,
|
btnHint : this.textSelectData,
|
||||||
blankError : this.txtEmpty,
|
blankError : this.txtEmpty,
|
||||||
validateOnChange: true,
|
validateOnChange: true,
|
||||||
|
validateOnBlur: false,
|
||||||
validation : function(value) {
|
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;
|
return (isvalid!==Asc.c_oAscError.ID.DataRangeError) ? true : me.textInvalidRange;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -423,7 +424,8 @@ define([
|
||||||
txtRangeName: 'Title',
|
txtRangeName: 'Title',
|
||||||
txtRange: 'Range',
|
txtRange: 'Range',
|
||||||
txtEmpty: 'This field is required',
|
txtEmpty: 'This field is required',
|
||||||
textSelectData: 'Select Data'
|
textSelectData: 'Select Data',
|
||||||
|
textInvalidRange: 'ERROR! Invalid cells range'
|
||||||
|
|
||||||
}, SSE.Views.ProtectDialog || {}));
|
}, SSE.Views.ProtectDialog || {}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -166,7 +166,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ProtectRangesDlg.template',
|
||||||
arr.push({
|
arr.push({
|
||||||
name: ranges[i].asc_getName() || '',
|
name: ranges[i].asc_getName() || '',
|
||||||
pwd: ranges[i].asc_isPassword(),
|
pwd: ranges[i].asc_isPassword(),
|
||||||
range: ranges[i].asc_getSqref(),
|
range: ranges[i].asc_getSqref() || '',
|
||||||
props: ranges[i],
|
props: ranges[i],
|
||||||
lock: (id!==null && id!==undefined),
|
lock: (id!==null && id!==undefined),
|
||||||
lockuser: (id) ? this.getUserName(id) : this.guestText
|
lockuser: (id) ? this.getUserName(id) : this.guestText
|
||||||
|
|
Loading…
Reference in a new issue