Skip to content

Commit

Permalink
Fix bug sidebar in mobile mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Oct 13, 2024
1 parent 1dd10cb commit e0da2b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions public/js/organization.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
function responsiveDisplay() {
let menu = document.getElementById('sidebarTools');
let menuOffcanvas = new bootstrap.Offcanvas(menu);
if(is_mobile()) {
document.getElementById('page-organization').classList.remove('decalage-pdf-div');
menu.classList.remove('show');
menuOffcanvas.hide();
document.getElementById('sidebarTools').classList.remove('show');
document.getElementById('container-pages').classList.remove('vh-100');
document.getElementById('container-btn-zoom').classList.add('d-none');
} else {
menuOffcanvas.show();
document.getElementById('page-organization').classList.add('decalage-pdf-div');
document.getElementById('sidebarTools').classList.add('show');
document.getElementById('container-pages').classList.add('vh-100');
document.getElementById('container-btn-zoom').classList.remove('d-none');
}
menu.classList.remove('d-md-block');
menu.classList.remove('d-none');
};
function isSelectionMode() {
return document.querySelectorAll('.canvas-container .input-select:checked').length > 0;
Expand Down
2 changes: 1 addition & 1 deletion templates/organization.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<button id="btn-zoom-decrease" class="btn btn-outline-dark bg-white text-dark"><i class="bi bi-zoom-out"></i></button>
</div>
<div id="div-margin-bottom" style="height: 55px;" class="d-md-none"></div>
<div class="offcanvas offcanvas-end show d-none d-md-block shadow-sm" data-bs-backdrop="false" data-bs-scroll="true" data-bs-keyboard="false" tabindex="-1" id="sidebarTools" aria-labelledby="sidebarToolsLabel">
<div class="offcanvas offcanvas-end show shadow-sm" data-bs-backdrop="false" data-bs-scroll="true" data-bs-keyboard="false" tabindex="-1" id="sidebarTools" aria-labelledby="sidebarToolsLabel">
<a class="btn btn-close btn-sm position-absolute opacity-25 d-none d-sm-none d-md-block" title="<?php echo _("Close this PDF and return to home"); ?>" style="position: absolute; top: 2px; right: 2px; font-size: 10px;" href="<?php echo $REVERSE_PROXY_URL; ?>/organization"></a>
<div class="offcanvas-header mb-0 pb-0">
<h5 class="mb-1 d-block w-100" id="sidebarToolsLabel"><?php echo _("PDF organization"); ?> <span class="float-end me-2" title="<?php echo _("This PDF is stored on your computer to be signed by you only"); ?>"><i class="bi-ui-checks-grid"></i></span></h5>
Expand Down

0 comments on commit e0da2b0

Please sign in to comment.