From b44a100bad3151a33008bac774bce7e559f65c19 Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 17 Jun 2026 14:32:49 -0400 Subject: [PATCH] Add collapsible functionality for management blocks in event interface This commit introduces a collapsible feature for the management blocks in the event interface, allowing users to expand or collapse sections for better navigation. New CSS styles have been added to support this functionality, and a button for toggling the visibility of the content has been implemented. The version code has been incremented to 4.72.651 to reflect these changes. --- css/style.css | 38 ++++++++++++++++++++++++++++++++++++++ inc_footer_scripts.php | 26 ++++++++++++++++++++++++++ php/inc_fx_promoteur.php | 23 +++++++++++++++++++++-- php/inc_settings.php | 2 +- 4 files changed, 86 insertions(+), 3 deletions(-) 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) {
-
+
+ + +
@@ -3195,7 +3211,10 @@ if ($teamMode <= 0) {
-
+
+ + +
diff --git a/php/inc_settings.php b/php/inc_settings.php index 8d84643..afefecc 100644 --- a/php/inc_settings.php +++ b/php/inc_settings.php @@ -7,7 +7,7 @@ * Constantes * * **************/ -define('_VERSION_CODE', '4.72.650'); +define('_VERSION_CODE', '4.72.651'); define('_DATE_CODE', '2026-06-17'); //MSIN-4290 define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');