fix issue #19: add a hack to show external sites in the top menu with navigation
This commit is contained in:
+10
-2
@@ -54,9 +54,17 @@ export default {
|
||||
|
||||
for (let element of links) {
|
||||
let href = element.getAttribute('href')
|
||||
var parent = element.parentNode
|
||||
|
||||
if (this.ignoreExternalSites && element.parentNode.getAttribute('data-id').indexOf('external_index') !== -1) {
|
||||
continue;
|
||||
if (!parent) {
|
||||
continue
|
||||
}
|
||||
|
||||
var dataId = parent.getAttribute('data-id')
|
||||
dataId = dataId !== null ? dataId : ''
|
||||
|
||||
if (this.ignoreExternalSites && dataId.indexOf('external_index') !== -1) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (href !== '#') {
|
||||
|
||||
@@ -30,7 +30,6 @@ const appConfig = (name, value, callbacks) => {
|
||||
OCP.AppConfig.setValue('side_menu', name, value, callbacks)
|
||||
}
|
||||
|
||||
|
||||
const saveSettings = (key) => {
|
||||
const element = elements.get(key)
|
||||
const name = $(element).attr('name')
|
||||
|
||||
Reference in New Issue
Block a user