From 72063fafa2dcb638be17f3f2bc225f6893107ed0 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 16 Nov 2020 17:06:24 +0300 Subject: [PATCH] [SSE] Fix Bug 47449 --- apps/common/main/lib/view/EditNameDialog.js | 2 +- apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js | 8 ++++++-- apps/spreadsheeteditor/main/locale/en.json | 1 + apps/spreadsheeteditor/main/locale/ru.json | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/view/EditNameDialog.js b/apps/common/main/lib/view/EditNameDialog.js index d4f6d4f514..aa68e7e2d6 100644 --- a/apps/common/main/lib/view/EditNameDialog.js +++ b/apps/common/main/lib/view/EditNameDialog.js @@ -78,7 +78,7 @@ define([ blankError : me.options.error ? me.options.error : me.textLabelError, style : 'width: 100%;', validateOnBlur: false, - validation : function(value) { + validation : me.options.validation || function(value) { return value ? true : ''; } }); diff --git a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js index b69ff2bfcf..a6647b8ecd 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js @@ -71,7 +71,7 @@ define([ '', '', '', - '
', + '
', '', '', '', @@ -270,6 +270,9 @@ define([ label: this.textRenameLabel, error: this.textRenameError, value: rec.get('name'), + validation: function(value) { + return value.length<=128 ? true : me.textLongName; + }, handler: function(result, value) { if (result == 'ok') { rec.get('view').asc_setName(value); @@ -340,7 +343,8 @@ define([ tipIsLocked: 'This element is being edited by another user.', textRenameLabel: 'Rename view', textRenameError: 'View name must not be empty.', - warnDeleteView: "You are trying to delete the currently enabled view '%1'.
Close this view and delete it?" + warnDeleteView: "You are trying to delete the currently enabled view '%1'.
Close this view and delete it?", + textLongName: 'View name is limited to 128 characters.' }, SSE.Views.ViewManagerDlg || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index a6ebc4f5ff..4ac0794749 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2953,6 +2953,7 @@ "SSE.Views.ViewManagerDlg.tipIsLocked": "This element is being edited by another user.", "SSE.Views.ViewManagerDlg.txtTitle": "Sheet View Manager", "SSE.Views.ViewManagerDlg.warnDeleteView": "You are trying to delete the currently enabled view '%1'.
Close this view and delete it?", + "SSE.Views.ViewManagerDlg.textLongName": "View name is limited to 128 characters.", "SSE.Views.ViewTab.capBtnFreeze": "Freeze Panes", "SSE.Views.ViewTab.capBtnSheetView": "Sheet View", "SSE.Views.ViewTab.textClose": "Close", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 3737a22d05..be71eef2d2 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -2953,6 +2953,7 @@ "SSE.Views.ViewManagerDlg.tipIsLocked": "Этот элемент редактируется другим пользователем.", "SSE.Views.ViewManagerDlg.txtTitle": "Диспетчер представлений листа", "SSE.Views.ViewManagerDlg.warnDeleteView": "Вы пытаетесь удалить активированное в данный момент представление '%1'.
Закрыть это представление и удалить его?", + "SSE.Views.ViewManagerDlg.textLongName": "Имя представления ограничено 128 символами.", "SSE.Views.ViewTab.capBtnFreeze": "Закрепить области", "SSE.Views.ViewTab.capBtnSheetView": "Представление листа", "SSE.Views.ViewTab.textClose": "Закрыть",