This commit is contained in:
KONE SOREL 2025-12-22 12:12:32 +00:00
parent 345abc8dfa
commit 1befd492ce

View File

@ -147,10 +147,19 @@ console.groupEnd();
document.addEventListener('contextmenu', e => e.preventDefault()); document.addEventListener('contextmenu', e => e.preventDefault());
} }
<?php
// Assurez-vous que $activeParentId est correct pour Accueil
if ($activeLink == 'Accueil' && ($activeParentId ?? '') != '0') {
echo "console.warn('PHP: Correction activeParentId pour Accueil');\n";
$activeParentId = '0';
$activeChildId = null;
}
?>
// Variables globales // Variables globales
window.appConfig = { window.appConfig = {
activeParentId: '<?= $activeParentId ?? "0" ?>', activeParentId: '<?= $activeParentId ?? "0" ?>',
activeChildId: '<?= $activeChildId ?? "0" ?>', activeChildId: '<?= $activeChildId ?? "" ?>',
activeLink: '<?= $activeLink ?>', activeLink: '<?= $activeLink ?>',
racineWeb: '<?= $racineWeb ?>', racineWeb: '<?= $racineWeb ?>',
baseUrl: '<?= $racineWeb ?>', baseUrl: '<?= $racineWeb ?>',
@ -163,14 +172,10 @@ console.groupEnd();
}; };
// Vérification // Vérification
console.log('PHP: activeParentId =', '<?= $activeParentId ?>'); console.log('🔧 CONFIG CORRIGÉE:');
console.log('PHP: activeLink =', '<?= $activeLink ?>'); console.log(' activeParentId:', window.appConfig.activeParentId);
console.log(' activeLink:', window.appConfig.activeLink);
// CORRECTION FORCÉE IMMÉDIATE
if (window.appConfig.activeLink === 'Accueil') {
console.warn('🔧 Correction: Accueil forcé en menu 0 (était: ' + window.appConfig.activeParentId + ')');
window.appConfig.activeParentId = '0';
}
// Debug CSS loading // Debug CSS loading
console.log('[App] Configuration chargée:', window.appConfig); console.log('[App] Configuration chargée:', window.appConfig);