Merge branch 'main' of git.ebene.ovh:ebene/radiantrh
This commit is contained in:
commit
a26d428725
|
|
@ -255,10 +255,15 @@ body {
|
||||||
|
|
||||||
.toggle-sidebar-btn {
|
.toggle-sidebar-btn {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
padding-left: 15px;
|
padding-left: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-bar.collapsed {
|
||||||
|
left: var(--sidebar-collapsed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================
|
/* ============================================
|
||||||
NAVIGATION TABS
|
NAVIGATION TABS
|
||||||
============================================ */
|
============================================ */
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
||||||
<meta name="twitter:image" content="<?= $racineWeb ?>Bootstrap_new/images/new/favicon.png">
|
<meta name="twitter:image" content="<?= $racineWeb ?>Bootstrap_new/images/new/favicon.png">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="toggle-sidebar">
|
<body>
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<header class="app-header">
|
<header class="app-header">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
|
|
@ -295,7 +295,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<aside class="app-sidebar sidebar" id="sidebar">
|
<aside class="app-sidebar" id="sidebar">
|
||||||
<nav class="sidebar-nav" aria-label="Navigation principale">
|
<nav class="sidebar-nav" aria-label="Navigation principale">
|
||||||
<div class="nav-section">
|
<div class="nav-section">
|
||||||
<?php foreach ($menus as $key0 => $menuParent):
|
<?php foreach ($menus as $key0 => $menuParent):
|
||||||
|
|
@ -725,33 +725,53 @@ $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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
const toggleBtn = document.querySelector(".toggle-sidebar-btn");
|
||||||
|
const sidebar = document.querySelector(".app-sidebar");
|
||||||
|
const main = document.querySelector(".app-main");
|
||||||
|
const navBar = document.querySelector(".nav-bar");
|
||||||
|
|
||||||
|
toggleBtn.addEventListener("click", function () {
|
||||||
|
// Toggle sidebar
|
||||||
|
sidebar.classList.toggle("collapsed");
|
||||||
|
|
||||||
|
// Ajuster le main
|
||||||
|
main.classList.toggle("collapsed");
|
||||||
|
|
||||||
|
// Ajuster la nav-bar si elle existe
|
||||||
|
if (navBar) {
|
||||||
|
navBar.classList.toggle("collapsed");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user