From 22f765387fccbf2f63ce365a17b103e5175d50f7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 25 Jun 2022 22:36:11 +0300 Subject: [PATCH] Fix Bug 57652 --- apps/documenteditor/main/app/template/Toolbar.template | 4 ++-- apps/documenteditor/main/app/view/Toolbar.js | 9 ++++++--- .../main/app/template/Toolbar.template | 4 ++-- apps/presentationeditor/main/app/view/Toolbar.js | 8 +++++--- .../spreadsheeteditor/main/app/template/Toolbar.template | 4 ++-- apps/spreadsheeteditor/main/app/view/Toolbar.js | 5 +++-- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template index 74b46dfcc..7e73f8f50 100644 --- a/apps/documenteditor/main/app/template/Toolbar.template +++ b/apps/documenteditor/main/app/template/Toolbar.template @@ -8,10 +8,10 @@
- +
- +
diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 843c688f9..c9089e8b0 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -191,7 +191,7 @@ define([ lock: [_set.cantPrint, _set.disableOnStart], signals: ['disabled'], dataHint: '1', - dataHintDirection: 'top', + dataHintDirection: 'bottom', dataHintTitle: 'P' }); this.toolbarControls.push(this.btnPrint); @@ -203,7 +203,7 @@ define([ lock: [_set.lostConnect, _set.disableOnStart], signals: ['disabled'], dataHint: '1', - dataHintDirection: 'bottom', + dataHintDirection: 'top', dataHintTitle: 'S' }); this.toolbarControls.push(this.btnSave); @@ -2419,8 +2419,11 @@ define([ this.synchTooltip.hide(); if (!mode.enableDownload) this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]}); - } else + } else { this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); + !mode.canPrint && this.btnPrint.hide(); + } + this.mode = mode; diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template index f221d4c87..346cdcd21 100644 --- a/apps/presentationeditor/main/app/template/Toolbar.template +++ b/apps/presentationeditor/main/app/template/Toolbar.template @@ -8,10 +8,10 @@
- +
- +
diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 9690619b1..a81f286f4 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -211,7 +211,7 @@ define([ lock: [_set.slideDeleted, _set.noSlides, _set.cantPrint, _set.disableOnStart], signals: ['disabled'], dataHint: '1', - dataHintDirection: 'top', + dataHintDirection: 'bottom', dataHintTitle: 'P' }); me.slideOnlyControls.push(me.btnPrint); @@ -223,7 +223,7 @@ define([ lock: [_set.lostConnect], signals: ['disabled'], dataHint: '1', - dataHintDirection: 'bottom', + dataHintDirection: 'top', dataHintTitle: 'S' }); me.btnCollabChanges = me.btnSave; @@ -1588,8 +1588,10 @@ define([ this.synchTooltip.hide(); if (!mode.enableDownload) this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]}); - } else + } else { this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); + !mode.canPrint && this.btnPrint.hide(); + } this.mode = mode; }, diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index 502449a0e..ca1be8060 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -8,10 +8,10 @@
- +
- +
diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index f391c50ec..f92258cf8 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -783,7 +783,7 @@ define([ lock : [_set.editCell, _set.cantPrint, _set.disableOnStart], signals: ['disabled'], dataHint : '1', - dataHintDirection: 'top', + dataHintDirection: 'bottom', dataHintTitle: 'P' }); @@ -794,7 +794,7 @@ define([ lock : [_set.lostConnect], signals : ['disabled'], dataHint : '1', - dataHintDirection: 'bottom', + dataHintDirection: 'top', dataHintTitle: 'S' }); me.btnCollabChanges = me.btnSave; @@ -2792,6 +2792,7 @@ define([ this.lockToolbar(Common.enumLock.cantPrint, true, {array: [this.btnPrint]}); } else { this.mode = mode; + !mode.canPrint && this.btnPrint.hide(); this.lockToolbar(Common.enumLock.cantPrint, !mode.canPrint, {array: [this.btnPrint]}); }