From 8221ad5e63c970adbef68cb3bbdd03bc771fd3ac Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 26 Aug 2021 16:43:18 +0300 Subject: [PATCH] [DE] Add settings for changes display: tooltips or balloons (customization->review->hoverMode) --- .../main/app/view/FileMenuPanels.js | 37 ++++++++++++++++++- apps/documenteditor/main/locale/en.json | 3 ++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 6bdc32cad..eb70fd98a 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -212,6 +212,10 @@ define([ '
', '','', /** coauthoring end **/ + '', + '', + '', + '','', '', '', '
', @@ -522,6 +526,20 @@ define([ dataHintOffset: 'big' }); + this.cmbReviewHover = new Common.UI.ComboBox({ + el : $markup.findById('#fms-cmb-review-hover'), + style : 'width: 160px;', + editable : false, + cls : 'input-group-nr', + data : [ + { value: false, displayValue: this.txtChangesBalloons }, + { value: true, displayValue: this.txtChangesTip } + ], + dataHint: '2', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + $markup.find('.btn.primary').each(function(index, el){ (new Common.UI.Button({ el: $(el) @@ -587,6 +605,7 @@ define([ $('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); + $('tr.view-review', this.el)[mode.canViewReview ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ @@ -666,6 +685,12 @@ define([ item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.currentThemeId()}); this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.defaultThemeId()); } + + if (this.mode.canViewReview) { + value = Common.Utils.InternalSettings.get("de-settings-review-hover-mode"); + item = this.cmbReviewHover.store.findWhere({value: value}); + this.cmbReviewHover.setValue(item ? item.get('value') : false); + } }, applySettings: function() { @@ -698,6 +723,13 @@ define([ Common.localStorage.setItem("de-macros-mode", this.cmbMacros.getValue()); Common.Utils.InternalSettings.set("de-macros-mode", this.cmbMacros.getValue()); + if (this.mode.canViewReview) { + var val = this.cmbReviewHover.getValue(); + Common.localStorage.setBool("de-settings-review-hover-mode", val); + Common.Utils.InternalSettings.set("de-settings-review-hover-mode", val); + this.mode.reviewHoverMode = val; + } + Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); Common.localStorage.save(); @@ -794,7 +826,10 @@ define([ strPasteButton: 'Show Paste Options button when content is pasted', txtProofing: 'Proofing', strTheme: 'Theme', - txtAutoCorrect: 'AutoCorrect options...' + txtAutoCorrect: 'AutoCorrect options...', + strReviewHover: 'Track Changes Display', + txtChangesTip: 'Show by hover in tooltips', + txtChangesBalloons: 'Show by click in balloons' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 21c03ec22..99575292a 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1755,6 +1755,9 @@ "DE.Views.FileMenuPanels.Settings.txtWarnMacros": "Show Notification", "DE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with a notification", "DE.Views.FileMenuPanels.Settings.txtWin": "as Windows", + "DE.Views.FileMenuPanels.Settings.strReviewHover": "Track Changes Display", + "DE.Views.FileMenuPanels.Settings.txtChangesTip": "Show by hover in tooltips", + "DE.Views.FileMenuPanels.Settings.txtChangesBalloons": "Show by click in balloons", "DE.Views.FormSettings.textAlways": "Always", "DE.Views.FormSettings.textAspect": "Lock aspect ratio", "DE.Views.FormSettings.textAutofit": "AutoFit",