Fix Bug 59766
This commit is contained in:
parent
9232bcdcac
commit
7a11ecd7d7
|
@ -1091,7 +1091,7 @@ define([
|
|||
this.txtName = new Common.UI.InputField({
|
||||
el: $window.find('#txt-sheet-name'),
|
||||
style: 'width:100%;',
|
||||
value: Common.Utils.String.htmlEncode(this.options.current),
|
||||
value: this.options.current,
|
||||
allowBlank: false,
|
||||
maxLength: 31,
|
||||
validation: _.bind(this.nameValidator, this)
|
||||
|
@ -1155,14 +1155,13 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
if (value.length > 2 && value[0]=='"' && value[value.length-1]=='"') return true;
|
||||
if (!/[:\\\/\*\?\[\]\']/.test(value)) return true;
|
||||
if (!/^(\')|[:\\\/\*\?\[\]]|(\')$/.test(value)) return true;
|
||||
|
||||
return this.errNameWrongChar;
|
||||
},
|
||||
|
||||
errNameExists : 'Worksheet with such name already exist.',
|
||||
errNameWrongChar: 'A sheet name cannot contains characters: \\, \/, *, ?, [, ], :',
|
||||
errNameWrongChar: 'A sheet name cannot contains characters: \\, \/, *, ?, [, ], : or the character \' as first or last character',
|
||||
labelSheetName : 'Sheet Name'
|
||||
}, RenameDialog||{}));
|
||||
|
||||
|
|
|
@ -3461,7 +3461,7 @@
|
|||
"SSE.Views.Statusbar.itemTabColor": "Tab Color",
|
||||
"SSE.Views.Statusbar.itemUnProtect": "Unprotect",
|
||||
"SSE.Views.Statusbar.RenameDialog.errNameExists": "Worksheet with such a name already exists.",
|
||||
"SSE.Views.Statusbar.RenameDialog.errNameWrongChar": "A sheet name cannot contain the following characters: \\/*?[]:",
|
||||
"SSE.Views.Statusbar.RenameDialog.errNameWrongChar": "A sheet name cannot contain the following characters: \\/*?[]: or the character ' as first or last character",
|
||||
"SSE.Views.Statusbar.RenameDialog.labelSheetName": "Sheet name",
|
||||
"SSE.Views.Statusbar.selectAllSheets": "Select All Sheets",
|
||||
"SSE.Views.Statusbar.sheetIndexText": "Sheet {0} of {1}",
|
||||
|
|
|
@ -304,7 +304,7 @@
|
|||
"textDelete": "Delete",
|
||||
"textDuplicate": "Duplicate",
|
||||
"textErrNameExists": "Worksheet with this name already exists.",
|
||||
"textErrNameWrongChar": "A sheet name cannot contains characters: \\, /, *, ?, [, ], :",
|
||||
"textErrNameWrongChar": "A sheet name cannot contains characters: \\, /, *, ?, [, ], : or the character ' as first or last character",
|
||||
"textErrNotEmpty": "Sheet name must not be empty",
|
||||
"textErrorLastSheet": "The workbook must have at least one visible worksheet.",
|
||||
"textErrorRemoveSheet": "Can't delete the worksheet.",
|
||||
|
|
|
@ -251,7 +251,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props =>
|
|||
onClick: function () {
|
||||
let s = $$('input[name="modal-sheet-name"]').val(),
|
||||
wc = api.asc_getWorksheetsCount(), items = [],
|
||||
err = !s.trim().length ? _t.textErrNotEmpty : ((s.length > 2 && s[0] == '"' && s[s.length-1] == '"' || !/[:\\\/\*\?\[\]\']/.test(s)) ? null : _t.textErrNameWrongChar);
|
||||
err = !s.trim().length ? _t.textErrNotEmpty : ((!/^(\')|[:\\\/\*\?\[\]]|(\')$/.test(s)) ? null : _t.textErrNameWrongChar);
|
||||
if (!err) {
|
||||
while (wc--) {
|
||||
if (sindex !== wc) {
|
||||
|
|
Loading…
Reference in a new issue