Browse Source
Merge pull request #3573 from nextcloud/fix-talk-sidebar-in-public-share-pages-without-header-actions
Fix Talk sidebar in public share pages without header actions
pull/3579/head
Joas Schilling
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
0 deletions
-
src/mainPublicShareSidebar.js
|
|
@ -86,6 +86,15 @@ function addTalkSidebarTrigger() { |
|
|
|
talkSidebarTriggerElement.addEventListener('click', () => { |
|
|
|
sidebarState.isOpen = !sidebarState.isOpen |
|
|
|
}) |
|
|
|
|
|
|
|
// The ".header-right" element may not exist in the public share page if
|
|
|
|
// there are no header actions.
|
|
|
|
if (!document.querySelector('.header-right')) { |
|
|
|
const headerRightElement = document.createElement('div') |
|
|
|
headerRightElement.setAttribute('class', 'header-right') |
|
|
|
document.querySelector('#header').append(headerRightElement) |
|
|
|
} |
|
|
|
|
|
|
|
document.querySelector('.header-right').append(talkSidebarTriggerElement) |
|
|
|
} |
|
|
|
|
|
|
|