From 6c744fc3ba1e48223f35bd9a57469512927c36b2 Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Tue, 18 Jul 2023 14:05:11 +0200 Subject: [PATCH] Query Builder fix --- app/static/js/CorpusAnalysis/QueryBuilder.js | 3 +- .../corpora/_analysis/concordance.html.j2 | 400 ++++++++++++++++++ 2 files changed, 402 insertions(+), 1 deletion(-) diff --git a/app/static/js/CorpusAnalysis/QueryBuilder.js b/app/static/js/CorpusAnalysis/QueryBuilder.js index 6b6aa4c5..ee52fb45 100644 --- a/app/static/js/CorpusAnalysis/QueryBuilder.js +++ b/app/static/js/CorpusAnalysis/QueryBuilder.js @@ -195,6 +195,7 @@ class ConcordanceQueryBuilder { } queryChipFactory(dataType, prettyQueryText, queryText) { + this.elements.counter++; window.location.href = '#query-container'; queryText = Utils.escape(queryText); prettyQueryText = Utils.escape(prettyQueryText); @@ -295,7 +296,7 @@ class ConcordanceQueryBuilder { this.elements.entity.innerHTML = 'Entity'; } this.elements.counter -= 1; - if (this.elements.counter === 0) { + if (this.elements.counter <= 0) { this.elements.queryContainer.classList.add('hide'); } this.queryPreviewBuilder(); diff --git a/app/templates/corpora/_analysis/concordance.html.j2 b/app/templates/corpora/_analysis/concordance.html.j2 index 5886a4b1..eb3de1b7 100644 --- a/app/templates/corpora/_analysis/concordance.html.j2 +++ b/app/templates/corpora/_analysis/concordance.html.j2 @@ -154,6 +154,406 @@ Query your corpus with the CQP query language utilizing a KWIC view. + + {% endset %} {% set scripts %}