Query Builder fix and placeholder change

This commit is contained in:
Inga Kirschnick 2023-02-06 12:12:19 +01:00
parent 1f27749661
commit c8cfbc8e21
2 changed files with 5 additions and 4 deletions

View File

@ -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');

View File

@ -6,7 +6,7 @@
<div class="row">
<div class="input-field col s12 m9">
<i class="material-icons prefix">search</i>
<input class="validate corpus-analysis-action" id="concordance-extension-form-query" name="query" type="text" required pattern=".*\S+.*" placeholder="&lt;ent_type=&quot;PERSON&quot;&gt; []* &lt;/ent_type&gt; []* [simple_pos=&quot;VERB&quot;] :: match.text_publishing_year=&quot;1991&quot;;"></input>
<input class="validate corpus-analysis-action" id="concordance-extension-form-query" name="query" type="text" required pattern=".*\S+.*" placeholder="Type in your query or use the Query Builder on the right"</input>
<label for="concordance-extension-form-query">Query</label>
<span class="error-color-text helper-text hide" id="concordance-extension-error"></span>
<a class="modal-trigger" href="#cql-tutorial-modal" style="margin-left: 40px;"><i class="material-icons" style="font-size: inherit;">help</i> Corpus Query Language tutorial</a>