summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-12-18 13:49:52 +0200
committerTor Lillqvist <tml@collabora.com>2019-12-18 13:43:23 +0100
commit8e8f081e483412249dce090efd5276beb493c78f (patch)
treee6a2d64266da3de0c4cd1e6a36f443a139f6b822
parent9fa14f7c245dc31de1b1885f5387fef8aed23982 (diff)
tdf#129378: Remove useless menu entries in the iOS app
The 'online-help' and 'keyboard-shortcuts' actions use the L.Map.showHelp function that would try to open a web page, which doesn't work from the WKWebView without some special sauce, and would be silly anyway as the app should work without any net connection. Change-Id: Iae8709018616b3a9954686143362319730a7bf13 Reviewed-on: https://gerrit.libreoffice.org/85378 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--loleaflet/src/control/Control.Menubar.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 327c6d53d..a9ad06f6d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -236,8 +236,8 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:OnlineAutoFormat'}]}
]},
{name: _UNO('.uno:HelpMenu', 'text'), id: 'help', type: 'menu', menu: [
- {name: _('Online Help'), id: 'online-help', type: 'action'},
- {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+ {name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+ {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -335,8 +335,8 @@ L.Control.Menubar = L.Control.extend({
{name: _('None (Do not check spelling)'), id: 'nonelanguage', uno: '.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]}
]},
{name: _UNO('.uno:HelpMenu', 'presentation'), id: 'help', type: 'menu', menu: [
- {name: _('Online Help'), id: 'online-help', type: 'action'},
- {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+ {name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+ {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -450,8 +450,8 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:GoalSeekDialog'}
]},
{name: _UNO('.uno:HelpMenu', 'spreadsheet'), id: 'help', type: 'menu', menu: [
- {name: _('Online Help'), id: 'online-help', type: 'action'},
- {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action'},
+ {name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
+ {name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -1244,6 +1244,9 @@ L.Control.Menubar = L.Control.extend({
},
_checkItemVisibility: function(menuItem) {
+ if (window.ThisIsTheiOSApp && menuItem.iosapp === false) {
+ return false;
+ }
if (menuItem.id === 'about' && (L.DomUtil.get('about-dialog') === null)) {
return false;
}