From cfb06354caf488bd7791a3a48287128e233c11c8 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 6 Nov 2019 17:22:12 +0300 Subject: [PATCH] Refactoring add/remove comments buttons: change icons, change caption of buttons on Collaboration tab. --- apps/common/main/lib/view/ReviewChanges.js | 4 ++-- apps/common/main/resources/less/toolbar.less | 1 + apps/documenteditor/main/app/controller/Toolbar.js | 2 ++ apps/documenteditor/main/app/view/Toolbar.js | 3 ++- apps/documenteditor/main/locale/en.json | 3 ++- apps/presentationeditor/main/app/controller/Toolbar.js | 2 ++ apps/presentationeditor/main/app/view/Toolbar.js | 3 ++- apps/presentationeditor/main/locale/en.json | 3 ++- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 2 ++ apps/spreadsheeteditor/main/app/view/Toolbar.js | 3 ++- apps/spreadsheeteditor/main/locale/en.json | 3 ++- 11 files changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index b76e67510..8f8ad705a 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -307,7 +307,7 @@ define([ cls: 'btn-toolbar x-huge icon-top', caption: this.txtCommentRemove, split: true, - iconCls: 'btn-menu-comments' + iconCls: 'btn-rem-comment' }); } @@ -654,7 +654,7 @@ define([ txtOriginalCap: 'Original', strFastDesc: 'Real-time co-editing. All changes are saved automatically.', strStrictDesc: 'Use the \'Save\' button to sync the changes you and others make.', - txtCommentRemove: 'Remove Comments', + txtCommentRemove: 'Remove', tipCommentRemCurrent: 'Remove current comments', tipCommentRem: 'Remove comments', txtCommentRemCurrent: 'Remove Current Comments', diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index cbab0599b..902acb77f 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -533,6 +533,7 @@ .button-normal-icon(btn-caption, 76, @toolbar-big-icon-size); .button-normal-icon(btn-calculation, 80, @toolbar-big-icon-size); .button-normal-icon(btn-scale, 81, @toolbar-big-icon-size); +.button-normal-icon(btn-rem-comment, 83, @toolbar-big-icon-size); [applang=ru] { .btn-toolbar { diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 71c5041ce..dbc9b8076 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2887,6 +2887,8 @@ define([ btn.on('click', function (btn, e) { Common.NotificationCenter.trigger('app:comment:add', 'toolbar'); }); + if (btn.cmpEl.closest('#review-changes-panel').length>0) + btn.setCaption(me.toolbar.capBtnAddComment); }, this); } } diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index acdb1b86a..be8f49475 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2324,7 +2324,8 @@ define([ capBtnWatermark: 'Watermark', textEditWatermark: 'Custom Watermark', textRemWatermark: 'Remove Watermark', - tipWatermark: 'Edit watermark' + tipWatermark: 'Edit watermark', + capBtnAddComment: 'Add Comment' } })(), DE.Views.Toolbar || {})); }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 6a57861b1..0556b0d6d 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -253,7 +253,7 @@ "Common.Views.ReviewChanges.txtSpelling": "Spell Checking", "Common.Views.ReviewChanges.txtTurnon": "Track Changes", "Common.Views.ReviewChanges.txtView": "Display Mode", - "Common.Views.ReviewChanges.txtCommentRemove": "Remove Comments", + "Common.Views.ReviewChanges.txtCommentRemove": "Remove", "Common.Views.ReviewChanges.tipCommentRemCurrent": "Remove current comments", "Common.Views.ReviewChanges.tipCommentRem": "Remove comments", "Common.Views.ReviewChanges.txtCommentRemCurrent": "Remove Current Comments", @@ -2056,6 +2056,7 @@ "DE.Views.TextArtSettings.textTemplate": "Template", "DE.Views.TextArtSettings.textTransform": "Transform", "DE.Views.TextArtSettings.txtNoBorders": "No Line", + "DE.Views.Toolbar.capBtnAddComment": "Add Comment", "DE.Views.Toolbar.capBtnBlankPage": "Blank Page", "DE.Views.Toolbar.capBtnColumns": "Columns", "DE.Views.Toolbar.capBtnComment": "Comment", diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 3b30b425a..ea971034b 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -2164,6 +2164,8 @@ define([ btn.on('click', function (btn, e) { Common.NotificationCenter.trigger('app:comment:add', 'toolbar'); }); + if (btn.cmpEl.closest('#review-changes-panel').length>0) + btn.setCaption(me.toolbar.capBtnAddComment); }, this); this.toolbar.lockToolbar(PE.enumLock.noSlides, this._state.no_slides, { array: this.btnsComment }); } diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 13f52082c..e4ae5f3bc 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1676,7 +1676,8 @@ define([ capBtnInsHeader: 'Header/Footer', capBtnSlideNum: 'Slide Number', capBtnDateTime: 'Date & Time', - textListSettings: 'List Settings' + textListSettings: 'List Settings', + capBtnAddComment: 'Add Comment' } }()), PE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 65bb2aca5..a8bd0bc44 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -178,7 +178,7 @@ "Common.Views.ReviewChanges.txtSpelling": "Spell Checking", "Common.Views.ReviewChanges.txtTurnon": "Track Changes", "Common.Views.ReviewChanges.txtView": "Display Mode", - "Common.Views.ReviewChanges.txtCommentRemove": "Remove Comments", + "Common.Views.ReviewChanges.txtCommentRemove": "Remove", "Common.Views.ReviewChanges.tipCommentRemCurrent": "Remove current comments", "Common.Views.ReviewChanges.tipCommentRem": "Remove comments", "Common.Views.ReviewChanges.txtCommentRemCurrent": "Remove Current Comments", @@ -1672,6 +1672,7 @@ "PE.Views.TextArtSettings.txtPapyrus": "Papyrus", "PE.Views.TextArtSettings.txtWood": "Wood", "PE.Views.Toolbar.capAddSlide": "Add Slide", + "PE.Views.Toolbar.capBtnAddComment": "Add Comment", "PE.Views.Toolbar.capBtnComment": "Comment", "PE.Views.Toolbar.capBtnDateTime": "Date & Time", "PE.Views.Toolbar.capBtnInsHeader": "Header/Footer", diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index f37309543..ae6f8b660 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3234,6 +3234,8 @@ define([ btn.on('click', function (btn, e) { Common.NotificationCenter.trigger('app:comment:add', 'toolbar', me.api.asc_getCellInfo().asc_getFlags().asc_getSelectionType() != Asc.c_oAscSelectionType.RangeCells); }); + if (btn.cmpEl.closest('#review-changes-panel').length>0) + btn.setCaption(me.toolbar.capBtnAddComment); }, this); } } diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 08ac23eba..757bc82d9 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2520,6 +2520,7 @@ define([ textManyPages: 'pages', textHeight: 'Height', textWidth: 'Width', - textMorePages: 'More pages' + textMorePages: 'More pages', + capBtnAddComment: 'Add Comment' }, SSE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 8935111a0..bca6b30fb 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -172,7 +172,7 @@ "Common.Views.ReviewChanges.txtSpelling": "Spell Checking", "Common.Views.ReviewChanges.txtTurnon": "Track Changes", "Common.Views.ReviewChanges.txtView": "Display Mode", - "Common.Views.ReviewChanges.txtCommentRemove": "Remove Comments", + "Common.Views.ReviewChanges.txtCommentRemove": "Remove", "Common.Views.ReviewChanges.tipCommentRemCurrent": "Remove current comments", "Common.Views.ReviewChanges.tipCommentRem": "Remove comments", "Common.Views.ReviewChanges.txtCommentRemCurrent": "Remove Current Comments", @@ -2199,6 +2199,7 @@ "SSE.Views.TextArtSettings.txtNoBorders": "No Line", "SSE.Views.TextArtSettings.txtPapyrus": "Papyrus", "SSE.Views.TextArtSettings.txtWood": "Wood", + "SSE.Views.Toolbar.capBtnAddComment": "Add Comment", "SSE.Views.Toolbar.capBtnComment": "Comment", "SSE.Views.Toolbar.capBtnInsHeader": "Header/Footer", "SSE.Views.Toolbar.capBtnMargins": "Margins",