Enhance anomaly block styles and functionality, increment version code to 4.72.779
This commit introduces new styles for the anomaly blocks, including collapsible sections and improved padding. The JavaScript is updated to handle click and keyboard events for toggling these sections, enhancing user interaction. The version code is incremented to 4.72.779 to reflect these changes.
This commit is contained in:
@ -4509,7 +4509,7 @@ function renderBibToolNav($int_eve_id, $tabEpreuves, $strLangue = 'fr') {
|
||||
<?php echo renderBibToolNavBtn('anomalies', 'bib_v4_anomalies_title', $strAnomBadges); ?>
|
||||
<?php echo renderBibToolNavBtn('dist_print', 'bib_v4_dist_print_title'); ?>
|
||||
<?php if ($intSolo >= 2) {
|
||||
echo renderBibToolNavBtn('global_batch', 'bib_v4_global_batch_title', '', false, 'bib_v4_global_batch_doc');
|
||||
echo renderBibToolNavBtn('global_batch', 'bib_v4_global_batch_title');
|
||||
} ?>
|
||||
</nav>
|
||||
<div id="bib-tool-detail" class="bib-tool-detail bib-ui-hidden" aria-live="polite">
|
||||
@ -6040,6 +6040,32 @@ function renderBibAnomaliesPanelShell($int_eve_id, $strLangue = 'fr') {
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/** MSIN-4379 — Ouverture section anomalies repliable (fermée par défaut). */
|
||||
function fxBibAnomalySectionOpen($strVariant, $strTitleClef, $intCount, $strLangue = 'fr') {
|
||||
$strVariant = preg_replace('/[^a-z0-9-]/', '', (string)$strVariant);
|
||||
?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--<?php echo fxBibEsc($strVariant); ?> is-collapsed">
|
||||
<div class="bib-anomaly-block-header epr-header epr-header--collapsible" role="button" tabindex="0"
|
||||
aria-expanded="false">
|
||||
<span class="epr-header-label bib-anomaly-block-header-label">
|
||||
<?php fxBibTexte($strTitleClef, 1); ?>
|
||||
<?php echo fxBibAideButton($strTitleClef); ?>
|
||||
<span class="epr-header-summary bib-anomaly-block-count"><?php echo (int)$intCount; ?></span>
|
||||
</span>
|
||||
<?php echo fxBibBlockCollapseToggle($strLangue, true); ?>
|
||||
</div>
|
||||
<div class="bib-anomaly-block-content">
|
||||
<?php
|
||||
}
|
||||
|
||||
/** MSIN-4379 — Fermeture section anomalies repliable. */
|
||||
function fxBibAnomalySectionClose() {
|
||||
?>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
|
||||
/** MSIN-4379 — Panneau dashboard anomalies (HTML). */
|
||||
function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies = null) {
|
||||
$int_eve_id = (int)$int_eve_id;
|
||||
@ -6072,13 +6098,9 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
<?php fxBibTexteTrad('bib_v4_anomalies_none', 1); ?>
|
||||
</p>
|
||||
<?php } else { ?>
|
||||
<?php if (!empty($tabAnomalies['dupes'])) { ?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--dupes">
|
||||
<h3 class="bib-anomaly-block-title">
|
||||
<?php fxBibTexte('bib_v4_anomalies_dupes_title', 1); ?>
|
||||
<?php echo fxBibAideButton('bib_v4_anomalies_dupes_title'); ?>
|
||||
<span class="badge badge-secondary"><?php echo count($tabAnomalies['dupes']); ?></span>
|
||||
</h3>
|
||||
<?php if (!empty($tabAnomalies['dupes'])) {
|
||||
fxBibAnomalySectionOpen('dupes', 'bib_v4_anomalies_dupes_title', count($tabAnomalies['dupes']), $strLangue);
|
||||
?>
|
||||
<ul class="bib-anomaly-list list-unstyled mb-0">
|
||||
<?php foreach ($tabAnomalies['dupes'] as $item) { ?>
|
||||
<li class="bib-anomaly-item">
|
||||
@ -6107,16 +6129,13 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php
|
||||
fxBibAnomalySectionClose();
|
||||
} ?>
|
||||
|
||||
<?php if (!empty($tabAnomalies['inter_epr_dupes'])) { ?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--inter-epr-dupes">
|
||||
<h3 class="bib-anomaly-block-title">
|
||||
<?php fxBibTexte('bib_v4_anomalies_inter_epr_dupes_title', 1); ?>
|
||||
<?php echo fxBibAideButton('bib_v4_anomalies_inter_epr_dupes_title'); ?>
|
||||
<span class="badge badge-secondary"><?php echo count($tabAnomalies['inter_epr_dupes']); ?></span>
|
||||
</h3>
|
||||
<?php if (!empty($tabAnomalies['inter_epr_dupes'])) {
|
||||
fxBibAnomalySectionOpen('inter-epr-dupes', 'bib_v4_anomalies_inter_epr_dupes_title', count($tabAnomalies['inter_epr_dupes']), $strLangue);
|
||||
?>
|
||||
<ul class="bib-anomaly-list list-unstyled mb-0">
|
||||
<?php foreach ($tabAnomalies['inter_epr_dupes'] as $item) { ?>
|
||||
<li class="bib-anomaly-item">
|
||||
@ -6136,16 +6155,13 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php
|
||||
fxBibAnomalySectionClose();
|
||||
} ?>
|
||||
|
||||
<?php if (!empty($tabAnomalies['out_of_range'])) { ?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--out-of-range">
|
||||
<h3 class="bib-anomaly-block-title">
|
||||
<?php fxBibTexte('bib_v4_anomalies_out_of_range_title', 1); ?>
|
||||
<?php echo fxBibAideButton('bib_v4_anomalies_out_of_range_title'); ?>
|
||||
<span class="badge badge-secondary"><?php echo count($tabAnomalies['out_of_range']); ?></span>
|
||||
</h3>
|
||||
<?php if (!empty($tabAnomalies['out_of_range'])) {
|
||||
fxBibAnomalySectionOpen('out-of-range', 'bib_v4_anomalies_out_of_range_title', count($tabAnomalies['out_of_range']), $strLangue);
|
||||
?>
|
||||
<ul class="bib-anomaly-list list-unstyled mb-0">
|
||||
<?php foreach ($tabAnomalies['out_of_range'] as $item) { ?>
|
||||
<li class="bib-anomaly-item">
|
||||
@ -6163,16 +6179,13 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php
|
||||
fxBibAnomalySectionClose();
|
||||
} ?>
|
||||
|
||||
<?php if (!empty($tabAnomalies['orphans'])) { ?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--orphans">
|
||||
<h3 class="bib-anomaly-block-title">
|
||||
<?php fxBibTexte('bib_v4_anomalies_orphans_title', 1); ?>
|
||||
<?php echo fxBibAideButton('bib_v4_anomalies_orphans_title'); ?>
|
||||
<span class="badge badge-secondary"><?php echo count($tabAnomalies['orphans']); ?></span>
|
||||
</h3>
|
||||
<?php if (!empty($tabAnomalies['orphans'])) {
|
||||
fxBibAnomalySectionOpen('orphans', 'bib_v4_anomalies_orphans_title', count($tabAnomalies['orphans']), $strLangue);
|
||||
?>
|
||||
<ul class="bib-anomaly-list list-unstyled mb-0">
|
||||
<?php foreach ($tabAnomalies['orphans'] as $item) {
|
||||
$strTypeKey = fxBibAnomalyOrphanCauseKey($item['orphan_cause'] ?? 'annule');
|
||||
@ -6198,16 +6211,13 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php
|
||||
fxBibAnomalySectionClose();
|
||||
} ?>
|
||||
|
||||
<?php if (!empty($tabAnomalies['auto_miss'])) { ?>
|
||||
<section class="bib-anomaly-block bib-anomaly-block--auto-miss">
|
||||
<h3 class="bib-anomaly-block-title">
|
||||
<?php fxBibTexte('bib_v4_anomalies_auto_miss_title', 1); ?>
|
||||
<?php echo fxBibAideButton('bib_v4_anomalies_auto_miss_title'); ?>
|
||||
<span class="badge badge-secondary"><?php echo count($tabAnomalies['auto_miss']); ?></span>
|
||||
</h3>
|
||||
<?php if (!empty($tabAnomalies['auto_miss'])) {
|
||||
fxBibAnomalySectionOpen('auto-miss', 'bib_v4_anomalies_auto_miss_title', count($tabAnomalies['auto_miss']), $strLangue);
|
||||
?>
|
||||
<ul class="bib-anomaly-list list-unstyled mb-0">
|
||||
<?php foreach ($tabAnomalies['auto_miss'] as $item) { ?>
|
||||
<li class="bib-anomaly-item">
|
||||
@ -6227,8 +6237,9 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php } ?>
|
||||
<?php
|
||||
fxBibAnomalySectionClose();
|
||||
} ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user