fix #19: add option to keep external sites in the top menu
This commit is contained in:
@@ -9,6 +9,30 @@
|
||||
sideMenuContainer.attr('data-forcelighticon', '1')
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($_['external-sites-in-top-menu']): ?>
|
||||
sideMenuContainer.attr('data-externalsitesintopmenu', '1')
|
||||
|
||||
var externalSitesInTopMenu = function() {
|
||||
var items = $('#appmenu').find('li')
|
||||
|
||||
items.each(function(i, item) {
|
||||
var dataId = item.getAttribute('data-id')
|
||||
|
||||
if (dataId === null || dataId.indexOf('external_index') === -1) {
|
||||
item.style.display = 'none'
|
||||
item.classList.remove('hidden')
|
||||
} else {
|
||||
item.style.display = 'flex'
|
||||
item.classList.add('hidden')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(window).resize(externalSitesInTopMenu);
|
||||
|
||||
setInterval(externalSitesInTopMenu, 500);
|
||||
<?php endif; ?>
|
||||
|
||||
body.on('side-menu.apps', function(e, apps) {
|
||||
<?php if ($_['hide-when-no-apps']): ?>
|
||||
sideMenu = $('#side-menu')
|
||||
|
||||
Reference in New Issue
Block a user