From 25fd370d9ea9c94b5f2c8342fd9beffaec879b9a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 30 Oct 2024 21:02:36 +0300 Subject: [PATCH] Fix Bug 65935 --- apps/documenteditor/main/app/view/Toolbar.js | 7 +++++++ apps/pdfeditor/main/app/view/Toolbar.js | 6 ++++++ apps/presentationeditor/main/app/view/Toolbar.js | 7 +++++++ apps/spreadsheeteditor/main/app/view/Toolbar.js | 7 +++++++ 4 files changed, 27 insertions(+) diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index b6d99bee7f..c6c182cc2c 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1996,6 +1996,7 @@ define([ me.onUpdateLastCustomMargins(); Common.NotificationCenter.on('margins:update', _.bind(me.onUpdateLastCustomMargins, me)); + Common.NotificationCenter.on('desktop:window', _.bind(me.onDesktopWindow, me)); } if ( me.isCompactView ) @@ -3498,6 +3499,12 @@ define([ } }, + onDesktopWindow: function() { + if (this.synchTooltip && this.synchTooltip.isVisible()) { + this.synchTooltip.show(); // change position for visible tip + } + }, + lockToolbar: function (causes, lock, opts) { Common.Utils.lockControls(causes, lock, opts, this.lockControls); } diff --git a/apps/pdfeditor/main/app/view/Toolbar.js b/apps/pdfeditor/main/app/view/Toolbar.js index 6a871752f4..783baf26c8 100644 --- a/apps/pdfeditor/main/app/view/Toolbar.js +++ b/apps/pdfeditor/main/app/view/Toolbar.js @@ -1214,6 +1214,7 @@ define([ this.showSynchTip = !Common.localStorage.getBool("pdfe-hide-synch"); this.needShowSynchTip = false; /** coauthoring end **/ + Common.NotificationCenter.on('desktop:window', _.bind(this.onDesktopWindow, this)); } (mode.isEdit || mode.isRestrictedEdit) && me.setTab('home'); @@ -1777,6 +1778,11 @@ define([ } }, + onDesktopWindow: function() { + if (this.synchTooltip && this.synchTooltip.isVisible()) { + this.synchTooltip.show(); // change position for visible tip + } + }, /** coauthoring end **/ lockToolbar: function (causes, lock, opts) { diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 7cef18b061..e3278ff769 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -1374,6 +1374,7 @@ define([ if ( mode.isEdit ) { me.setTab('home'); me.processPanelVisible(); + Common.NotificationCenter.on('desktop:window', _.bind(me.onDesktopWindow, me)); } if ( me.isCompactView ) @@ -2407,6 +2408,12 @@ define([ return !!specSymbol ? specSymbol.description : this.capBtnInsSymbol + ': ' + symbol; }, + onDesktopWindow: function() { + if (this.synchTooltip && this.synchTooltip.isVisible()) { + this.synchTooltip.show(); // change position for visible tip + } + }, + tipNumCapitalLetters: 'A. B. C.', tipNumLettersParentheses: 'a) b) c)', tipNumLettersPoints: 'a. b. c.', diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 4f3f8f01f6..8a6685c456 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -2360,6 +2360,7 @@ define([ me.onUpdateLastCustomMargins(); Common.NotificationCenter.on('margins:update', _.bind(me.onUpdateLastCustomMargins, me)); this.btnInsertImage.menu.items[2].setVisible(mode.canRequestInsertImage || mode.fileChoiceUrl && mode.fileChoiceUrl.indexOf("{documentType}")>-1); + Common.NotificationCenter.on('desktop:window', _.bind(me.onDesktopWindow, me)); } me.setTab('home'); @@ -3508,6 +3509,12 @@ define([ getSymbolDescription: function(symbol){ var specSymbol = this.specSymbols.find(function (item){return item.symbol == symbol}); return !!specSymbol ? specSymbol.description : this.capBtnInsSymbol + ': ' + symbol; + }, + + onDesktopWindow: function() { + if (this.synchTooltip && this.synchTooltip.isVisible()) { + this.synchTooltip.show(); // change position for visible tip + } } }, SSE.Views.Toolbar || {})); }); \ No newline at end of file