This commit is contained in:
KONE SOREL 2026-01-22 16:58:42 +00:00
parent 331a272a20
commit 429cb59f51
2 changed files with 21 additions and 2 deletions

View File

@ -192,12 +192,31 @@ function baseSwal(options) {
title: 'responsive-swal-title',
htmlContainer: 'responsive-swal-html'
},
didOpen: adjustSwalContent,
didOpen: (popup) => {
// Ajuste ton contenu responsive
adjustSwalContent(popup);
// Trouver le z-index le plus élevé parmi les modals ouverts
const highestModalZ = [...document.querySelectorAll('.modal.show')]
.map(m => parseInt(window.getComputedStyle(m).zIndex) || 1050)
.reduce((a, b) => Math.max(a, b), 1050);
// Forcer SweetAlert à passer au-dessus
const swalContainer = popup.closest('.swal2-container');
if (swalContainer) {
swalContainer.style.zIndex = highestModalZ + 50;
}
},
willOpen: () => { document.body.style.overflow = 'hidden'; },
willClose: () => { document.body.style.overflow = 'auto'; }
});
}
// 🔒 Fonction utilitaire pour fermer SweetAlert
function closeSwal() {
Swal.close();
}
/**
* ALERTE SIMPLE
* Affiche une information bilingue.

View File

@ -663,7 +663,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Application Scripts -->
<script src="/Js/fonctions.js?ver=2026.01.22.08"></script>
<script src="/Js/fonctions.js?ver=2026.01.22.09"></script>
<script type="text/javascript">
raffraichier_gabarit();