Refactor global batch section handling in JavaScript, enhance CSS for collapsible sections, and increment version code to 4.72.782
This commit refines the JavaScript functions for managing global batch sections, improving the retrieval of section bodies and ensuring proper toggling functionality. The CSS is updated to support collapsible sections, allowing for better organization of content. Additionally, the version code is incremented to 4.72.782 to reflect these changes.
This commit is contained in:
@ -1320,7 +1320,6 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
|||||||
background:#f4f8fc;
|
background:#f4f8fc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#module-bib .bib-tool-detail__body .epr-content,
|
|
||||||
#module-bib .bib-tool-detail__body .bib-global-batch__body{
|
#module-bib .bib-tool-detail__body .bib-global-batch__body{
|
||||||
display:block !important;
|
display:block !important;
|
||||||
background:transparent;
|
background:transparent;
|
||||||
@ -1335,6 +1334,12 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
|||||||
background:transparent;
|
background:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* MSIN-4443 — Contenu des sections assignation globale : repliable malgré display:block sur .epr-content */
|
||||||
|
#module-bib .bib-tool-detail__body .bib-global-batch__section.is-collapsed .bib-global-batch__section-content,
|
||||||
|
#module-bib .bib-tool-detail__body .bib-global-batch__section.is-collapsed .epr-content{
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* (?) dans le panneau de détail : rond blanc bien visible sur fond teinté. */
|
/* (?) dans le panneau de détail : rond blanc bien visible sur fond teinté. */
|
||||||
#module-bib .bib-tool-detail .btn-aide-bib,
|
#module-bib .bib-tool-detail .btn-aide-bib,
|
||||||
#module-bib .bib-tool-detail .bib-aide-trigger{
|
#module-bib .bib-tool-detail .bib-aide-trigger{
|
||||||
|
|||||||
@ -342,14 +342,28 @@
|
|||||||
return document.getElementById('bib-global-batch');
|
return document.getElementById('bib-global-batch');
|
||||||
}
|
}
|
||||||
|
|
||||||
function bibGetGlobalBatchExistingSection() {
|
/** Corps du panneau (dans #bib-tool-detail-body une fois l'outil ouvert). */
|
||||||
|
function bibGetGlobalBatchBody() {
|
||||||
|
var detailBody = document.getElementById('bib-tool-detail-body');
|
||||||
|
if (detailBody) {
|
||||||
|
var inDetail = detailBody.querySelector('.bib-global-batch__body');
|
||||||
|
if (inDetail) {
|
||||||
|
return inDetail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var panel = bibGetGlobalBatchPanel();
|
var panel = bibGetGlobalBatchPanel();
|
||||||
return panel ? panel.querySelector('.bib-global-batch--existing') : null;
|
return panel ? panel.querySelector('.bib-global-batch__body') : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function bibGetGlobalBatchExistingSection() {
|
||||||
|
var body = bibGetGlobalBatchBody();
|
||||||
|
return body ? body.querySelector('.bib-global-batch--existing') : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bibGetGlobalBatchGeneratedSection() {
|
function bibGetGlobalBatchGeneratedSection() {
|
||||||
var panel = bibGetGlobalBatchPanel();
|
var body = bibGetGlobalBatchBody();
|
||||||
return panel ? panel.querySelector('.bib-global-batch--generated') : null;
|
return body ? body.querySelector('.bib-global-batch--generated') : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function bibInvalidateGlobalBatchPanel() {
|
function bibInvalidateGlobalBatchPanel() {
|
||||||
@ -1300,7 +1314,7 @@
|
|||||||
existing.remove();
|
existing.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var anchor = bibGetGlobalBatchPanel();
|
var anchor = bibGetGlobalBatchBody() || bibGetGlobalBatchPanel();
|
||||||
if (anchor) {
|
if (anchor) {
|
||||||
anchor.insertAdjacentHTML('afterend', data.html);
|
anchor.insertAdjacentHTML('afterend', data.html);
|
||||||
}
|
}
|
||||||
@ -1346,7 +1360,7 @@
|
|||||||
existing.remove();
|
existing.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var anchor = bibGetGlobalBatchPanel();
|
var anchor = bibGetGlobalBatchBody() || bibGetGlobalBatchPanel();
|
||||||
if (anchor) {
|
if (anchor) {
|
||||||
anchor.insertAdjacentHTML('afterend', data.html);
|
anchor.insertAdjacentHTML('afterend', data.html);
|
||||||
}
|
}
|
||||||
@ -1375,7 +1389,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bibGlobalBatchPanel = bibGetGlobalBatchPanel();
|
var bibGlobalBatchPanel = bibGetGlobalBatchBody();
|
||||||
if (!bibGlobalBatchPanel || !bibGlobalBatchPanel.contains(e.target)) {
|
if (!bibGlobalBatchPanel || !bibGlobalBatchPanel.contains(e.target)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1596,10 +1610,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var willExpand = section.classList.contains('is-collapsed');
|
var willExpand = section.classList.contains('is-collapsed');
|
||||||
var panel = bibGetGlobalBatchPanel();
|
var root = bibGetGlobalBatchBody();
|
||||||
|
|
||||||
if (willExpand && panel) {
|
if (willExpand && root) {
|
||||||
panel.querySelectorAll('.bib-global-batch__section').forEach(function (other) {
|
root.querySelectorAll('.bib-global-batch__section').forEach(function (other) {
|
||||||
if (other !== section) {
|
if (other !== section) {
|
||||||
bibCollapseGlobalBatchSection(other);
|
bibCollapseGlobalBatchSection(other);
|
||||||
}
|
}
|
||||||
@ -1651,8 +1665,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let globalBatchSection = btnToggle.closest('.bib-global-batch__section');
|
let globalBatchSection = btnToggle.closest('.bib-global-batch__section');
|
||||||
if (globalBatchSection && bibGetGlobalBatchPanel()
|
if (globalBatchSection && moduleBib.contains(globalBatchSection)) {
|
||||||
&& bibGetGlobalBatchPanel().contains(globalBatchSection)) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
bibToggleGlobalBatchSection(globalBatchSection, btnToggle);
|
bibToggleGlobalBatchSection(globalBatchSection, btnToggle);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Constantes *
|
* Constantes *
|
||||||
*
|
*
|
||||||
**************/
|
**************/
|
||||||
define('_VERSION_CODE', '4.72.781');
|
define('_VERSION_CODE', '4.72.782');
|
||||||
define('_DATE_CODE', '2026-07-09');
|
define('_DATE_CODE', '2026-07-09');
|
||||||
//MSIN-4290
|
//MSIN-4290
|
||||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||||
|
|||||||
Reference in New Issue
Block a user