add options to select apps that must be displayed in the top menu (replace exteral sites option)

This commit is contained in:
Simon Vieille
2020-08-12 10:51:49 +02:00
parent caa9c092ef
commit ffab77aff2
8 changed files with 66 additions and 22 deletions
@@ -1,5 +1,3 @@
sideMenuContainer.attr('data-externalsitesintopmenu', '1')
var menuCache = null
var updateTopMenu = function() {
@@ -31,7 +29,7 @@ var updateTopMenu = function() {
return
}
if (dataId.indexOf('external_index') === -1) {
if (topMenuApps.indexOf(dataId) === -1) {
app.classList.add('hidden')
app.classList.add('app-hidden')
} else {
+4 -2
View File
@@ -104,7 +104,9 @@
sideMenuOpener.insertAfter('#nextcloud')
<?php endif; ?>
<?php if ($_['external-sites-in-top-menu']): ?>
<?php require_once __DIR__.'/_externalSitesInTopMenu.js'; ?>
<?php if (!empty($_['top-menu-apps'])): ?>
var topMenuApps = <?php echo json_encode($_['top-menu-apps']); ?>;
<?php require_once __DIR__.'/_topMenuApps.js'; ?>
<?php endif; ?>
})();