f
This commit is contained in:
parent
9fd327557e
commit
2664fbac5a
|
|
@ -259,6 +259,11 @@ body {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-bar.collapsed {
|
||||
left: var(--sidebar-collapsed);
|
||||
}
|
||||
|
||||
|
||||
/* ============================================
|
||||
NAVIGATION TABS
|
||||
============================================ */
|
||||
|
|
|
|||
|
|
@ -725,29 +725,29 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// 1) Déplacer immédiatement tous les modals existants sous <body>
|
||||
document.querySelectorAll('.modal').forEach(function (m) {
|
||||
if (m.parentNode !== document.body) document.body.appendChild(m);
|
||||
});
|
||||
// 1) Déplacer immédiatement tous les modals existants sous <body>
|
||||
document.querySelectorAll('.modal').forEach(function (m) {
|
||||
if (m.parentNode !== document.body) document.body.appendChild(m);
|
||||
});
|
||||
|
||||
// 2) Intercepter tous les clics sur triggers AVANT Bootstrap (phase capture)
|
||||
document.addEventListener('click', function (e) {
|
||||
const trigger = e.target.closest('[data-bs-toggle="modal"][data-bs-target]');
|
||||
if (!trigger) return;
|
||||
const targetSelector = trigger.getAttribute('data-bs-target');
|
||||
const modal = document.querySelector(targetSelector);
|
||||
if (modal && modal.parentNode !== document.body) {
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
}, true);
|
||||
// 2) Intercepter tous les clics sur triggers AVANT Bootstrap (phase capture)
|
||||
document.addEventListener('click', function (e) {
|
||||
const trigger = e.target.closest('[data-bs-toggle="modal"][data-bs-target]');
|
||||
if (!trigger) return;
|
||||
const targetSelector = trigger.getAttribute('data-bs-target');
|
||||
const modal = document.querySelector(targetSelector);
|
||||
if (modal && modal.parentNode !== document.body) {
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
}, true);
|
||||
|
||||
// 3) Fallback: si un modal s'ouvre autrement, garantir le déplacement
|
||||
document.addEventListener('show.bs.modal', function (event) {
|
||||
const modal = event.target;
|
||||
if (modal && modal.parentNode !== document.body) {
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
});
|
||||
// 3) Fallback: si un modal s'ouvre autrement, garantir le déplacement
|
||||
document.addEventListener('show.bs.modal', function (event) {
|
||||
const modal = event.target;
|
||||
if (modal && modal.parentNode !== document.body) {
|
||||
document.body.appendChild(modal);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user