From 8aac0c0327ec27a96a6abbe2c1d3999205b965f3 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:19:18 +0100 Subject: [PATCH] bs5 more --- .../resources/templates/fragments/navbar.html | 27 ++++++------------- .../templates/security/get-info-on-pdf.html | 8 ++++-- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index 060ebaf0..1f034384 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -305,9 +305,7 @@ + diff --git a/src/main/resources/templates/security/get-info-on-pdf.html b/src/main/resources/templates/security/get-info-on-pdf.html index cf15ec4e..d5cc3eca 100644 --- a/src/main/resources/templates/security/get-info-on-pdf.html +++ b/src/main/resources/templates/security/get-info-on-pdf.html @@ -142,13 +142,17 @@ const buttonElem = document.createElement('button'); buttonElem.className = 'btn btn-link'; buttonElem.type = 'button'; - buttonElem.dataset.toggle = "collapse"; - buttonElem.dataset.target = `#${safeKey}-content-${depth}`; + buttonElem.dataset.bsToggle = "collapse"; + buttonElem.dataset.bsTarget = `#${safeKey}-content-${depth}`; buttonElem.setAttribute('aria-expanded', 'true'); buttonElem.setAttribute('aria-controls', `${safeKey}-content-${depth}`); buttonElem.textContent = key; return buttonElem; } + const collapsibleElems = document.querySelectorAll('[data-bs-toggle="collapse"]'); + collapsibleElems.forEach(elem => { + new bootstrap.Collapse(elem); + });