Refactor page visibility logic and update version code

This commit modifies the JavaScript to ensure that the 'hidden' class is removed when a page is displayed, improving the visibility handling of document pages. Additionally, the PHP code is updated to streamline the generation of page elements by adjusting the placement of the 'hidden' attribute. The version code is incremented to 4.72.666 to reflect these changes, enhancing the overall user experience in document navigation.
This commit is contained in:
2026-06-18 10:50:44 -04:00
parent 8258e7ad29
commit 1d86258926
3 changed files with 4 additions and 3 deletions

View File

@ -46,6 +46,7 @@
pages.forEach(function (page, i) {
if (i === index) {
page.removeAttribute('hidden');
page.classList.remove('hidden');
} else {
page.setAttribute('hidden', 'hidden');
}

View File

@ -391,8 +391,8 @@ function fxDocRenderModule($anchorClef, $mem_global = 0) {
$html .= '<div class="ms1-doc-body">';
foreach ($pages as $idx => $page) {
$hidden = $idx > 0 ? ' hidden' : '';
$html .= '<div class="ms1-doc-page' . $hidden . '"'
$html .= '<div class="ms1-doc-page"'
. ($idx > 0 ? ' hidden' : '')
. ' data-doc-page-index="' . (int)$idx . '"'
. ' data-doc-page-clef="' . fxDocEsc($page['doc_page_clef']) . '">';
$html .= '<div class="ms1-doc-content ms1-doc-format">' . ($page['doc_html'] ?? '') . '</div>';

View File

@ -7,7 +7,7 @@
* Constantes *
*
**************/
define('_VERSION_CODE', '4.72.665');
define('_VERSION_CODE', '4.72.666');
define('_DATE_CODE', '2026-06-18');
//MSIN-4290
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');