From f02d1619e2894fce559b92f51ad959b65de4ba0e Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Thu, 7 Dec 2023 12:46:37 +0100 Subject: [PATCH 1/3] Try to implement anchor tags --- app/static/js/app.js | 8 ++++++++ .../_analysis/query_builder/_query_builder.html.j2 | 13 ++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index 27b675f4..57dd7ca1 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -168,6 +168,14 @@ nopaque.App = class App { let manualModalTocElement = document.querySelector('#manual-modal-toc'); let manualModalToc = M.Tabs.getInstance(manualModalTocElement); manualModalToc.select(modalTriggerElement.dataset.manualModalChapter); + // TODO: Make this work. + // if ('manualModalChapterAnchor' in modalTriggerElement.dataset) { + // let manualModalChapterAnchor = document.querySelector(`#${modalTriggerElement.dataset.manualModalChapterAnchor}`); + // let xCoord = manualModalChapterAnchor.getBoundingClientRect().left; + // let yCoord = manualModalChapterAnchor.getBoundingClientRect().top; + // let modalContentElement = modalElement.querySelector('.modal-content'); + // modalContentElement.scroll(xCoord, yCoord); + // } } } } diff --git a/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 b/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 index 6baecdda..3e8a8318 100644 --- a/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 +++ b/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 @@ -40,6 +40,7 @@ Add new token to your query Add structural attributes to your query incidence modifiers + help_outline
@@ -66,7 +67,7 @@