Fix app sidebar mountpoint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
parent
9979b6d4e0
commit
2ead7732a7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,12 +37,13 @@ Object.assign(window.OCA.Files, { Sidebar: new Sidebar() })
|
||||||
Object.assign(window.OCA.Files.Sidebar, { Tab })
|
Object.assign(window.OCA.Files.Sidebar, { Tab })
|
||||||
|
|
||||||
window.addEventListener('DOMContentLoaded', function() {
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
// Make sure we have a proper layout
|
const contentElement = document.querySelector('body > .content')
|
||||||
if (document.getElementById('content')) {
|
|| document.querySelector('body > #content')
|
||||||
|
|
||||||
|
// Make sure we have a proper layout
|
||||||
|
if (contentElement) {
|
||||||
// Make sure we have a mountpoint
|
// Make sure we have a mountpoint
|
||||||
if (!document.getElementById('app-sidebar')) {
|
if (!document.getElementById('app-sidebar')) {
|
||||||
const contentElement = document.getElementById('content')
|
|
||||||
const sidebarElement = document.createElement('div')
|
const sidebarElement = document.createElement('div')
|
||||||
sidebarElement.id = 'app-sidebar'
|
sidebarElement.id = 'app-sidebar'
|
||||||
contentElement.appendChild(sidebarElement)
|
contentElement.appendChild(sidebarElement)
|
||||||
|
|
Loading…
Reference in New Issue