[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/debug loleaflet/dist loleaflet/main.js loleaflet/src
Jan Holesovsky
kendy at collabora.com
Fri May 26 08:32:16 UTC 2017
loleaflet/debug/document/loleaflet.html | 1 -
loleaflet/dist/loleaflet.html | 1 +
loleaflet/main.js | 3 ---
loleaflet/src/control/Control.Menubar.js | 4 ++--
4 files changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 255518878d6e48ae85726838a9c7f87d5c292cb2
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri May 26 10:18:05 2017 +0200
loleaflet: Let's not use a 'disableabout' param.
Instead, just disable the Help -> About choice if the 'about-dialog' div was
removed from loleaflet.html.
Change-Id: I997aa5489bcfbd02f56feb79bea14e92d3666bf2
Reviewed-on: https://gerrit.libreoffice.org/38056
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/loleaflet/debug/document/loleaflet.html b/loleaflet/debug/document/loleaflet.html
index f5462f84..33364cea 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -106,7 +106,6 @@
var permission = getParameterByName('permission') || 'edit';
var timestamp = getParameterByName('timestamp');
var closebutton = getParameterByName('closebutton');
- var disableAbout = getParameterByName('disableabout');
if (wopiSrc === '' && filePath === '') {
vex.dialog.alert(wrongwopisrc);
}
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 0d587090..dfa03200 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -68,6 +68,7 @@
<div id="toolbar-down"></div>
+ <!-- Remove if you don't want the About dialog -->
<div id="about-dialog" style="display:none; text-align: center;">
<h1 id="product-name">LibreOffice Online</h1>
<hr/>
diff --git a/loleaflet/main.js b/loleaflet/main.js
index 2fb44b3d..48200cd9 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -75,8 +75,6 @@ var closebutton = getParameterByName('closebutton');
var revHistoryEnabled = getParameterByName('revisionhistory');
// Should the document go inactive or not
var alwaysActive = getParameterByName('alwaysactive');
-// Disable the about dialog
-var disableAbout = getParameterByName('disableabout');
// Loleaflet Debug mode
var debugMode = getParameterByName('debug');
if (wopiSrc === '' && filePath === '') {
@@ -90,7 +88,6 @@ if (host === '') {
// TODO: Get rid of these globals
global.closebutton = closebutton;
global.revHistoryEnabled = revHistoryEnabled;
-global.disableAbout = disableAbout;
global.title = title;
global.errorMessages = errorMessages;
var docURL, docParams;
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 29c64bbb..0b786615 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -2,7 +2,7 @@
* Control.Menubar
*/
-/* global $ _ map title vex revHistoryEnabled closebutton disableAbout*/
+/* global $ _ map title vex revHistoryEnabled closebutton */
L.Control.Menubar = L.Control.extend({
// TODO: Some mechanism to stop the need to copy duplicate menus (eg. Help)
options: {
@@ -541,7 +541,7 @@ L.Control.Menubar = L.Control.extend({
_createMenu: function(menu) {
var itemList = [];
for (var i in menu) {
- if (menu[i].id === 'about' && disableAbout) {
+ if (menu[i].id === 'about' && (L.DomUtil.get('about-dialog') === null)) {
continue;
}
More information about the Libreoffice-commits
mailing list