Skip to content
Snippets Groups Projects
Commit 8997d3ad authored by Inga Kirschnick's avatar Inga Kirschnick
Browse files

New condition section token builder

parent d3cfd2cf
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,6 @@ class ConcordanceQueryBuilder { ...@@ -34,7 +34,6 @@ class ConcordanceQueryBuilder {
{ {
onOpenStart: () => { onOpenStart: () => {
this.tokenAttributeBuilderFunctions.preparePositionalAttrModal(); this.tokenAttributeBuilderFunctions.preparePositionalAttrModal();
this.tokenAttributeBuilderFunctions.optionToggleHandler();
}, },
onCloseStart: () => { onCloseStart: () => {
this.tokenAttributeBuilderFunctions.resetPositionalAttrModal(); this.tokenAttributeBuilderFunctions.resetPositionalAttrModal();
......
...@@ -19,17 +19,13 @@ class ElementReferencesQueryBuilder { ...@@ -19,17 +19,13 @@ class ElementReferencesQueryBuilder {
// Token Attribute Builder Elements // Token Attribute Builder Elements
this.positionalAttrModal = M.Modal.getInstance(document.querySelector('#corpus-analysis-concordance-positional-attr-modal')); this.positionalAttrModal = M.Modal.getInstance(document.querySelector('#corpus-analysis-concordance-positional-attr-modal'));
this.positionalAttrSelection = document.querySelector('#corpus-analysis-concordance-positional-attr-selection'); this.positionalAttrSelection = document.querySelector('#corpus-analysis-concordance-positional-attr-selection');
this.tokenBuilderContent = document.querySelector('#corpus-analysis-concordance-token-builder-content');
this.tokenQuery = document.querySelector('#corpus-analysis-concordance-token-query'); this.tokenQuery = document.querySelector('#corpus-analysis-concordance-token-query');
this.tokenQueryTemplate = document.querySelector('#corpus-analysis-concordance-token-query-template');
this.tokenSubmitButton = document.querySelector('#corpus-analysis-concordance-token-submit'); this.tokenSubmitButton = document.querySelector('#corpus-analysis-concordance-token-submit');
this.noValueMessage = document.querySelector('#corpus-analysis-concordance-no-value-message'); this.noValueMessage = document.querySelector('#corpus-analysis-concordance-no-value-message');
this.isTokenQueryInvalid = false; this.isTokenQueryInvalid = false;
this.wordInput = document.querySelector('#corpus-analysis-concordance-word-input');
this.lemmaInput = document.querySelector('#corpus-analysis-concordance-lemma-input');
this.englishPosSelection = document.querySelector('#corpus-analysis-concordance-english-pos-selection');
this.germanPosSelection = document.querySelector('#corpus-analysis-concordance-german-pos-selection');
this.simplePosSelection = document.querySelector('#corpus-analysis-concordance-simple-pos-selection');
this.ignoreCaseCheckbox = document.querySelector('#corpus-analysis-concordance-ignore-case-checkbox'); this.ignoreCaseCheckbox = document.querySelector('#corpus-analysis-concordance-ignore-case-checkbox');
} }
} }
...@@ -34,7 +34,9 @@ class GeneralFunctionsQueryBuilder { ...@@ -34,7 +34,9 @@ class GeneralFunctionsQueryBuilder {
resetMaterializeSelection(selectionElements, value = "default") { resetMaterializeSelection(selectionElements, value = "default") {
selectionElements.forEach(selectionElement => { selectionElements.forEach(selectionElement => {
selectionElement.querySelector(`option[value=${value}]`).selected = true; if (selectionElement.querySelector(`option[value=${value}]`) !== null) {
selectionElement.querySelector(`option[value=${value}]`).selected = true;
}
let instance = M.FormSelect.getInstance(selectionElement); let instance = M.FormSelect.getInstance(selectionElement);
instance.destroy(); instance.destroy();
M.FormSelect.init(selectionElement); M.FormSelect.init(selectionElement);
......
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<div class="row"> <div class="row">
<div class="col s1"> <div class="col s2">
<span class="card-title">Query <i class="material-icons left" style="font-size: inherit;">search</i></span> <span class="card-title">Query <i class="material-icons left" style="font-size: inherit;">search</i></span>
</div> </div>
<div class="col s2"> <div class="col s1">
<div class="switch" style="margin-top:8px; margin-left:0px;"> <div class="switch" style="margin-top:8px; margin-left:0px;">
<label> <label>
<input type="checkbox" id="corpus-analysis-concordance-expert-mode-switch"> <input type="checkbox" id="corpus-analysis-concordance-expert-mode-switch">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment