From c8cfbc8e2143df6a1bc6867b09f327a70836a235 Mon Sep 17 00:00:00 2001 From: Inga Kirschnick Date: Mon, 6 Feb 2023 12:12:19 +0100 Subject: [PATCH] Query Builder fix and placeholder change --- app/static/js/CorpusAnalysis/QueryBuilder.js | 7 ++++--- app/templates/corpora/analyse_corpus.concordance.html.j2 | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/static/js/CorpusAnalysis/QueryBuilder.js b/app/static/js/CorpusAnalysis/QueryBuilder.js index ef7d96f1..c35e9e90 100644 --- a/app/static/js/CorpusAnalysis/QueryBuilder.js +++ b/app/static/js/CorpusAnalysis/QueryBuilder.js @@ -485,7 +485,7 @@ class ConcordanceQueryBuilder { let tokenQueryContent = ''; //for ButtonFactory(prettyQueryText) let tokenQueryText = ''; //for ButtonFactory(queryText) this.elements.cancelBool = false; - let tokenIsEmpty = true; + let tokenIsEmpty = false; if (this.elements.ignoreCase.checked) { c = ' %c'; @@ -497,8 +497,8 @@ class ConcordanceQueryBuilder { for (let element of this.elements.tokenQuery.childNodes) { tokenQueryContent += ' ' + element.firstChild.data + ' '; tokenQueryText += decodeURI(element.dataset.tokentext); - if (element.innerTe8888xt.indexOf('empty token') !== -1) { - emptyTokenCheck = false; + if (element.innerText.indexOf('empty token') !== -1) { + tokenIsEmpty = true; } } @@ -561,6 +561,7 @@ class ConcordanceQueryBuilder { if (tokenIsEmpty === false) { tokenQueryText = '[' + tokenQueryText + ']'; } + console.log(tokenQueryText); this.queryChipFactory('token', tokenQueryContent, tokenQueryText); this.hideEverything(); this.elements.positionalAttrArea.classList.add('hide'); diff --git a/app/templates/corpora/analyse_corpus.concordance.html.j2 b/app/templates/corpora/analyse_corpus.concordance.html.j2 index e19a3728..56baf07d 100644 --- a/app/templates/corpora/analyse_corpus.concordance.html.j2 +++ b/app/templates/corpora/analyse_corpus.concordance.html.j2 @@ -6,7 +6,7 @@