From 3a01933a12bb0d4079698a78924f8f5e4371f87b Mon Sep 17 00:00:00 2001 From: "Code Hugger (Matthew Jones)" Date: Mon, 6 May 2024 10:47:24 -0400 Subject: [PATCH] SAK-49773 Lessons on bulk edit subpage button is missing (#12570) Co-authored-by: Sam Ottenhoff --- lessonbuilder/tool/src/webapp/js/show-page.js | 12 ++++++++++++ .../tool/src/webapp/templates/ShowPage.html | 11 +++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lessonbuilder/tool/src/webapp/js/show-page.js b/lessonbuilder/tool/src/webapp/js/show-page.js index e9345037ec5d..2bb9bac2008f 100644 --- a/lessonbuilder/tool/src/webapp/js/show-page.js +++ b/lessonbuilder/tool/src/webapp/js/show-page.js @@ -259,6 +259,18 @@ $(document).ready(function () { bootstrap.Modal.getOrCreateInstance(deleteEl).hide(); }); + //Trigger the anchor when these buttons are clicked + document.querySelectorAll('#bulk-edit-pages-button, #reorder-button').forEach(function(button) { + button.addEventListener('click', function(event) { + event.preventDefault(); + // Simulate a click on the anchor + let anchor = this.querySelector('a'); + if (anchor) { + window.location.href = anchor.getAttribute('href'); + } + }); + }); + /* RU Rubrics ********************************************* */ blankRubricRow = $("#peer-eval-input-cloneable").html(); diff --git a/lessonbuilder/tool/src/webapp/templates/ShowPage.html b/lessonbuilder/tool/src/webapp/templates/ShowPage.html index 272ea6c9b7f8..1f9863bf9324 100644 --- a/lessonbuilder/tool/src/webapp/templates/ShowPage.html +++ b/lessonbuilder/tool/src/webapp/templates/ShowPage.html @@ -130,8 +130,15 @@

  • - +
  • +
  • +