diff --git a/css/style.css b/css/style.css index 7903e63..e429488 100644 --- a/css/style.css +++ b/css/style.css @@ -1388,6 +1388,44 @@ a.ms1-trad-link.btn-aide-trad{ padding:10px; font-weight:bold; } + +.epr-header--collapsible{ + display:flex; + align-items:center; + justify-content:space-between; + gap:10px; +} + +.epr-header--collapsible .epr-header-label{ + flex:1; + min-width:0; +} + +.epr-block-toggle{ + flex-shrink:0; + width:28px; + height:28px; + padding:0; + border:1px solid rgba(255,255,255,.55); + border-radius:4px; + background:rgba(255,255,255,.12); + color:#fff; + font-size:13px; + line-height:1; + cursor:pointer; +} + +.epr-block-toggle:hover, +.epr-block-toggle:focus{ + background:rgba(255,255,255,.22); + color:#fff; + outline:none; +} + +.epr-block.is-collapsed .epr-content{ + display:none; +} + .bib-container .batch-checkbox{ display:none; } diff --git a/inc_footer_scripts.php b/inc_footer_scripts.php index 24e0568..b97bd06 100644 --- a/inc_footer_scripts.php +++ b/inc_footer_scripts.php @@ -1959,6 +1959,32 @@ if ($strLangue == 'fr') { if (moduleBib) { + // MSIN-4379 — Réduire / développer les blocs gestion et assignation (en-tête seul visible). + moduleBib.addEventListener('click', function (e) { + let btnToggle = e.target.closest('.epr-block-toggle'); + if (!btnToggle || !moduleBib.contains(btnToggle)) { + return; + } + let block = btnToggle.closest('.epr-block'); + if (!block) { + return; + } + let collapsed = block.classList.toggle('is-collapsed'); + btnToggle.setAttribute('aria-expanded', collapsed ? 'false' : 'true'); + let label = collapsed + ? (btnToggle.getAttribute('data-label-expand') || '') + : (btnToggle.getAttribute('data-label-collapse') || ''); + if (label) { + btnToggle.setAttribute('aria-label', label); + btnToggle.setAttribute('title', label); + } + let icon = btnToggle.querySelector('.fa'); + if (icon) { + icon.classList.toggle('fa-chevron-up', !collapsed); + icon.classList.toggle('fa-chevron-down', collapsed); + } + }); + // ============================================================ // MSIN-4379 — Tippy.js (module #module-bib uniquement) // info_texte → data-tippy-content (tip court) diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 3946e7b..c32399a 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -2830,6 +2830,19 @@ function fxBibBlockHeader($clef, $strFallback = '', $docAnchorClef = '') { return $html . ''; } +/** Bouton réduire / développer le corps du bloc (en-tête reste visible). */ +function fxBibBlockCollapseToggle($strLangue = 'fr') { + $strCollapse = ($strLangue === 'en') ? 'Collapse section' : 'Réduire la section'; + $strExpand = ($strLangue === 'en') ? 'Expand section' : 'Développer la section'; + + return ''; +} + /** Cellule d'en-tête de colonne séquence + aide optionnelle (info_texte peut être vide). */ function fxBibColHeader($clef, $strFallback = '') { $strLabel = fxBibTexte($clef, 0, $strFallback, true); @@ -3187,7 +3200,10 @@ if ($teamMode <= 0) {