[Libreoffice-commits] online.git: loleaflet/css loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 10 13:52:09 UTC 2020
loleaflet/css/toolbar.css | 1 -
loleaflet/src/control/Control.Menubar.js | 2 +-
loleaflet/src/control/Control.Toolbar.js | 5 +++--
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 49bbd53f702acac714efedb570008b2faecf14c9
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Jul 9 10:53:48 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Fri Jul 10 15:51:51 2020 +0200
loleaflet: fix the show/hide close button
Explicit show/hide the close button if the page is loaded by
a WOPI Integrator.
Change-Id: I13d58bbbff03f283ed033a12a4489b610839748e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98443
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 297605e56..11cbec629 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -230,7 +230,6 @@ td[id^=tb_editbar_item_sidebar]{
}
.closebuttonimage {
- display: none;
background: url('images/closedoc.svg') no-repeat center !important;
}
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index ead7ebd34..b83a78a55 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1364,7 +1364,7 @@ L.Control.Menubar = L.Control.extend({
if (menuItem.type === 'action') {
if ((menuItem.id === 'rev-history' && !L.Params.revHistoryEnabled) ||
- (menuItem.id === 'closedocument' && !window.closebutton) ||
+ (menuItem.id === 'closedocument' && !L.Params.closeButtonEnabled) ||
(menuItem.id === 'latest-updates' && !window.enableWelcomeMessage)) {
return false;
}
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index e8dce9bc3..de0447a39 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1060,11 +1060,12 @@ function setupToolbar(e) {
map.on('commandresult', onCommandResult);
map.on('updateparts pagenumberchanged', onUpdateParts);
- if (!L.Params.closeButtonEnabled) {
+ if (map.options.wopi && L.Params.closeButtonEnabled) {
+ $('#closebuttonwrapper').show();
+ } else if (!L.Params.closeButtonEnabled) {
$('#closebuttonwrapper').hide();
} else if (L.Params.closeButtonEnabled && !window.mode.isMobile()) {
$('#closebuttonwrapper').show();
- $('.closebuttonimage').show();
}
$('#closebutton').click(function() {
More information about the Libreoffice-commits
mailing list