Skip to content

Commit

Permalink
fixup modal zindex
Browse files Browse the repository at this point in the history
  • Loading branch information
skylenet committed Oct 15, 2024
1 parent 3d10361 commit c10eb29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions static/js/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
function modalFixes() {
// Fix bootstrap backdrop stacking when having multiple modals
$(document).on('show.bs.modal', '.modal', function() {
const zIndex = 2000;
const offset = (10 * $('.modal:visible').length);
const zIndex = 2000 + offset;
$(this).css('z-index', zIndex);
setTimeout(() => $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'));
setTimeout(() => $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - offset - 1).addClass('modal-stack'));
});
// Fix bootstrap scrolling stacking when having multiple modals
$(document).on('hidden.bs.modal', '.modal', function(){
Expand Down
2 changes: 1 addition & 1 deletion templates/clients/clients_cl.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2 class="accordion-header">

<!--- Peer DAS Warnings modal -->
<div class="modal fade" id="peerDasWarningsModal" tabindex="-1" role="dialog" aria-labelledby="peerDasWarningsModal" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="peerDasWarningsModal">👀 PeerDAS: Some problems were detected</h5>
Expand Down

0 comments on commit c10eb29

Please sign in to comment.