From 0ad0d9fb2eb29693582b890fa1b159fae1b77aa6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 5 Apr 2022 19:04:05 +0300 Subject: [PATCH 1/3] Bug 41546 --- apps/common/main/lib/view/Comments.js | 6 ++++-- apps/common/main/resources/less/comments.less | 16 ++++++++++++++++ apps/documenteditor/main/locale/en.json | 1 + apps/presentationeditor/main/locale/en.json | 1 + apps/spreadsheeteditor/main/locale/en.json | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index dd04ce064..93f1ac783 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -443,7 +443,8 @@ define([ textReply: me.textReply, textClose: me.textClose, maxCommLength: Asc.c_oAscMaxCellOrCommentLength - })) + })), + emptyText: me.txtEmpty }); var addtooltip = function (dataview, view, record) { @@ -860,6 +861,7 @@ define([ textClosePanel: 'Close comments', textViewResolved: 'You have not permission for reopen comment', mniFilterGroups: 'Filter by Group', - textAll: 'All' + textAll: 'All', + txtEmpty: 'There are no comments in the document.' }, Common.Views.Comments || {})) }); \ No newline at end of file diff --git a/apps/common/main/resources/less/comments.less b/apps/common/main/resources/less/comments.less index 2a42718e1..2e57ac446 100644 --- a/apps/common/main/resources/less/comments.less +++ b/apps/common/main/resources/less/comments.less @@ -45,6 +45,22 @@ margin-bottom: 5px; right: 4px !important; } + + .dataview-ct.inner { + .empty-text { + text-align: center; + height: 100%; + width: 100%; + color: @text-tertiary-ie; + color: @text-tertiary; + tr { + vertical-align: top; + td { + padding-top: 18px; + } + } + } + } } .add-link-ct { diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 64980f678..de8340b16 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -262,6 +262,7 @@ "Common.Views.Comments.textResolved": "Resolved", "Common.Views.Comments.textSort": "Sort comments", "Common.Views.Comments.textViewResolved": "You have no permission to reopen the comment", + "Common.Views.Comments.txtEmpty": "There are no comments in the document.", "Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again", "Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.

To copy or paste to or from applications outside the editor tab use the following keyboard combinations:", "Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 75e9558f7..a069edf6d 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -349,6 +349,7 @@ "Common.Views.Comments.textResolved": "Resolved", "Common.Views.Comments.textSort": "Sort comments", "Common.Views.Comments.textViewResolved": "You have no permission to reopen the comment", + "Common.Views.Comments.txtEmpty": "There are no comments in the document.", "Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again", "Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.

To copy or paste to or from applications outside the editor tab use the following keyboard combinations:", "Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 96cd0ef76..708e5417d 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -202,6 +202,7 @@ "Common.Views.Comments.textResolved": "Resolved", "Common.Views.Comments.textSort": "Sort comments", "Common.Views.Comments.textViewResolved": "You have no permission to reopen the comment", + "Common.Views.Comments.txtEmpty": "There are no comments in the document.", "Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again", "Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.

To copy or paste to or from applications outside the editor tab use the following keyboard combinations:", "Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions", From 7e20c7eb94c688276fc4c76e7c7c8fb1fa7d031d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 5 Apr 2022 20:17:08 +0300 Subject: [PATCH 2/3] [DE] Change text for empty list in the navigation panel in viewer. --- apps/common/main/lib/component/DataView.js | 6 ++++++ apps/documenteditor/main/app/controller/Navigation.js | 2 ++ apps/documenteditor/main/app/view/Navigation.js | 3 ++- apps/documenteditor/main/locale/en.json | 1 + apps/documenteditor/main/locale/ru.json | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 26fefc738..dbd240ec8 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -803,6 +803,12 @@ define([ setEmptyText: function(emptyText) { this.emptyText = emptyText; + + if (this.store.length < 1) { + var el = $(this.el).find('.inner').addBack().filter('.inner').find('.empty-text td'); + if ( el.length>0 ) + el.text(this.emptyText); + } }, alignPosition: function() { diff --git a/apps/documenteditor/main/app/controller/Navigation.js b/apps/documenteditor/main/app/controller/Navigation.js index b36373da3..bbb09fca9 100644 --- a/apps/documenteditor/main/app/controller/Navigation.js +++ b/apps/documenteditor/main/app/controller/Navigation.js @@ -103,6 +103,8 @@ define([ setMode: function(mode) { this.mode = mode; this.canUseViwerNavigation = this.mode.canUseViwerNavigation; + if (this.panelNavigation && this.panelNavigation.viewNavigationList) + this.panelNavigation.viewNavigationList.setEmptyText(this.mode.isEdit ? this.panelNavigation.txtEmpty : this.panelNavigation.txtEmptyViewer); return this; }, diff --git a/apps/documenteditor/main/app/view/Navigation.js b/apps/documenteditor/main/app/view/Navigation.js index 68269cf72..dd1a396b1 100644 --- a/apps/documenteditor/main/app/view/Navigation.js +++ b/apps/documenteditor/main/app/view/Navigation.js @@ -158,7 +158,8 @@ define([ txtCollapse: 'Collapse all', txtExpandToLevel: 'Expand to level...', txtEmpty: 'There are no headings in the document.
Apply a heading style to the text so that it appears in the table of contents.', - txtEmptyItem: 'Empty Heading' + txtEmptyItem: 'Empty Heading', + txtEmptyViewer: 'There are no headings in the document.' }, DE.Views.Navigation || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index de8340b16..e0a1dedac 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2125,6 +2125,7 @@ "DE.Views.Navigation.txtDemote": "Demote", "DE.Views.Navigation.txtEmpty": "There are no headings in the document.
Apply a heading style to the text so that it appears in the table of contents.", "DE.Views.Navigation.txtEmptyItem": "Empty Heading", + "DE.Views.Navigation.txtEmptyViewer": "There are no headings in the document.", "DE.Views.Navigation.txtExpand": "Expand all", "DE.Views.Navigation.txtExpandToLevel": "Expand to level", "DE.Views.Navigation.txtHeadingAfter": "New heading after", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 69afbaccf..fa57ebaec 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -2117,6 +2117,7 @@ "DE.Views.Navigation.txtCollapse": "Свернуть все", "DE.Views.Navigation.txtDemote": "Понизить уровень", "DE.Views.Navigation.txtEmpty": "В документе нет заголовков.
Примените стиль заголовка к тексту, чтобы он появился в оглавлении.", + "DE.Views.Navigation.txtEmptyViewer": "В документе нет заголовков.", "DE.Views.Navigation.txtEmptyItem": "Пустой заголовок", "DE.Views.Navigation.txtExpand": "Развернуть все", "DE.Views.Navigation.txtExpandToLevel": "Развернуть до уровня", From ba973981d74618852d8a1b76058a8f2ea978949f Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 5 Apr 2022 20:18:15 +0300 Subject: [PATCH 3/3] [SSE] For Bug 41546 --- apps/spreadsheeteditor/main/locale/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 708e5417d..ba16f20f5 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -202,7 +202,7 @@ "Common.Views.Comments.textResolved": "Resolved", "Common.Views.Comments.textSort": "Sort comments", "Common.Views.Comments.textViewResolved": "You have no permission to reopen the comment", - "Common.Views.Comments.txtEmpty": "There are no comments in the document.", + "Common.Views.Comments.txtEmpty": "There are no comments in the sheet.", "Common.Views.CopyWarningDialog.textDontShow": "Don't show this message again", "Common.Views.CopyWarningDialog.textMsg": "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.

To copy or paste to or from applications outside the editor tab use the following keyboard combinations:", "Common.Views.CopyWarningDialog.textTitle": "Copy, Cut and Paste Actions",