diff --git a/app/static/js/CorpusAnalysis/CorpusAnalysisConcordance.js b/app/static/js/CorpusAnalysis/CorpusAnalysisConcordance.js index 55d9beb4..891e12f7 100644 --- a/app/static/js/CorpusAnalysis/CorpusAnalysisConcordance.js +++ b/app/static/js/CorpusAnalysis/CorpusAnalysisConcordance.js @@ -32,7 +32,9 @@ class CorpusAnalysisConcordance { async submitForm() { this.app.disableActionElements(); - let query = this.elements.form.query.value.trim(); + // let query = this.elements.form.query.value.trim(); + let query = this.checkQueryInput(); + console.log(query); let subcorpusName = this.elements.form['subcorpus-name'].value; this.elements.error.innerText = ''; this.elements.error.classList.add('hide'); @@ -96,6 +98,14 @@ class CorpusAnalysisConcordance { }); } + checkQueryInput() { + if (document.querySelector('#corpus-analysis-concordance-expert-mode-display').classList.contains('hide')) { + return document.querySelector('#corpus-analysis-concordance-query-preview').innerHTML.trim(); + } else { + return this.elements.form.query.value.trim(); + } + } + clearSubcorpusList() { this.elements.subcorpusList.innerHTML = ''; this.elements.subcorpusList.classList.add('hide'); diff --git a/app/templates/corpora/_analysis/concordance.html.j2 b/app/templates/corpora/_analysis/concordance.html.j2 index 5d14cce7..96c7ef8d 100644 --- a/app/templates/corpora/_analysis/concordance.html.j2 +++ b/app/templates/corpora/_analysis/concordance.html.j2 @@ -17,7 +17,7 @@
-
+
Query search
@@ -30,23 +30,12 @@
-
-
- {{ expert_mode.card_content() }} -
-
- {{ query_builder.card_content() }} -
-
-
-

 

- -
-
-
+
+ {{ expert_mode.card_content() }} +
+
+ {{ query_builder.card_content() }} +
diff --git a/app/templates/corpora/_analysis/query_builder/_expert_mode.html.j2 b/app/templates/corpora/_analysis/query_builder/_expert_mode.html.j2 index 34c84c6d..d6b112eb 100644 --- a/app/templates/corpora/_analysis/query_builder/_expert_mode.html.j2 +++ b/app/templates/corpora/_analysis/query_builder/_expert_mode.html.j2 @@ -1,17 +1,26 @@ {% macro card_content(id_prefix) %}
-
- search - - - help Corpus Query Language tutorial - | - info Tagsets -
-
- arrow_forward - - -
+
+ +
+ arrow_forward + + +
+
+

 

+ +
+
{% endmacro %} 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 b3e60733..21a13f0d 100644 --- a/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 +++ b/app/templates/corpora/_analysis/query_builder/_query_builder.html.j2 @@ -1,36 +1,47 @@ {% macro card_content(id_prefix) %} -
-
-
+
+
+
+
+
+
+ arrow_forward + + +
-
- arrow_forward - - + -
-
-
- - help Corpus Query Language tutorial - | - info Tagsets +
+
+

Preview:

+

+
+
-
-
- -
- + {% endmacro %} {% macro structural_attribute_modal(id_prefix) %}