Skip to content

Commit

Permalink
Ensure the content taks the whole height when we hide the footer
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Jun 23, 2022
1 parent 641d8ea commit 8f833e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/files_pdfviewer-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ window.addEventListener('DOMContentLoaded', function() {
const contentElmt = document.getElementById('files-public-content')
const sharingTokenElmt = document.getElementById('sharingToken')
const footerElmt = document.querySelector('body > footer')
const mainContent = document.querySelector('#content')

const sharingToken = sharingTokenElmt.value
const downloadUrl = generateUrl('/s/{token}/download', { token: sharingToken })
Expand All @@ -67,6 +68,7 @@ window.addEventListener('DOMContentLoaded', function() {
contentElmt.appendChild(viewerNode)
viewerNode.src = viewerUrl
footerElmt.style.display = 'none'
mainContent.style.minHeight = '100%' // Make the viewer take the whole height as the footer is now hidden.
} else {
logger.error('Unable to inject the PDF Viewer')
}
Expand Down

0 comments on commit 8f833e0

Please sign in to comment.