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