[Libreoffice-commits] online.git: loleaflet/src
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 16 11:46:13 UTC 2020
loleaflet/src/control/Control.Menubar.js | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
New commits:
commit 69b0df7578c6c7aa203dbf355c38e3cb91c09506
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Thu Apr 16 12:49:01 2020 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Thu Apr 16 13:45:53 2020 +0200
Welcome: Re-add the Latest Updates to the menu
Since we now have the window.enableWelcomeMessage value
Change-Id: I2870c9d0ab025182788e1f6e131b0f8ef260c299
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92351
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 8d77a6dc3..3d3f8307c 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -241,6 +241,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('Report an issue'), id: 'report-an-issue', type: 'action', iosapp: false},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -342,6 +343,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('Report an issue'), id: 'report-an-issue', type: 'action', iosapp: false},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -458,6 +460,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Online Help'), id: 'online-help', type: 'action', iosapp: false},
{name: _('Keyboard shortcuts'), id: 'keyboard-shortcuts', type: 'action', iosapp: false},
{name: _('Report an issue'), id: 'report-an-issue', type: 'action', iosapp: false},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'}]
},
{name: _('Last modification'), id: 'last-mod', type: 'action', tablet: false}
@@ -510,6 +513,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:ShowResolvedAnnotations', 'text'), id: 'showresolved', type: 'action'},
]
},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'},
],
@@ -556,6 +560,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:FullScreen', 'presentation'), id: 'fullscreen', type: 'action', mobileapp: false},
{uno: '.uno:SpellOnline'},
{name: _('Fullscreen presentation'), id: 'fullscreen-presentation', type: 'action'},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'},
],
@@ -619,6 +624,7 @@ L.Control.Menubar = L.Control.extend({
]},
{uno: '.uno:SpellOnline'},
{name: _UNO('.uno:FullScreen', 'spreadsheet'), id: 'fullscreen', type: 'action', mobileapp: false},
+ {name: _('Latest Updates'), id: 'latest-updates', type: 'action', iosapp: false},
{name: _('About'), id: 'about', type: 'action'},
],
@@ -706,7 +712,7 @@ L.Control.Menubar = L.Control.extend({
'downloadas-odp', 'downloadas-ppt', 'downloadas-pptx', 'print', // file menu
'downloadas-ods', 'downloadas-xls', 'downloadas-xlsx', 'closedocument', // file menu
'fullscreen', 'zoomin', 'zoomout', 'zoomreset', 'showresolved', // view menu
- 'about', 'keyboard-shortcuts', 'online-help', 'report-an-issue' // help menu
+ 'about', 'keyboard-shortcuts', 'latest-updates', 'online-help', 'report-an-issue' // help menu
]
},
@@ -1175,6 +1181,8 @@ L.Control.Menubar = L.Control.extend({
});
} else if (id === 'about') {
this._map.showLOAboutDialog();
+ } else if (id === 'latest-updates') {
+ this._map.showWelcomeDialog(/*calledFromMenu=*/true);
} else if (id === 'report-an-issue') {
window.open('https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice%20Online', '_blank');
} else if (id === 'inserthyperlink') {
@@ -1327,7 +1335,8 @@ 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' && !window.closebutton) ||
+ (menuItem.id === 'latest-updates' && !window.enableWelcomeMessage)) {
return false;
}
}
More information about the Libreoffice-commits
mailing list