Merge branch 'main' of git.ebene.ovh:ebene/radiantrh
This commit is contained in:
commit
aba1d4fc3c
|
|
@ -98,16 +98,3 @@ foreach ($modals as $id => $cfg):
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
const observer = new MutationObserver(() => {
|
|
||||||
document.querySelectorAll('.modal').forEach(m => {
|
|
||||||
if (m.parentNode !== document.body) {
|
|
||||||
document.body.appendChild(m);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
observer.observe(document.body, { childList: true, subtree: true });
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -679,6 +679,35 @@ $activeChildId = $menuData['child'];
|
||||||
}, 1000); // Attendre 1s que tout soit initialisé
|
}, 1000); // Attendre 1s que tout soit initialisé
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
// 1) Pass initial: déplacer 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 (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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user