Fix query results viewer etc. to work with results having eitehr full or no context.

This commit is contained in:
Stephan Porada
2020-09-16 10:41:02 +02:00
parent 25670b6231
commit 021375f68d
4 changed files with 19 additions and 7 deletions

View File

@ -10,7 +10,8 @@ class Client {
constructor({corpusId = null,
socket = null,
logging = true,
dynamicMode = true} = {}) {
dynamicMode = true,
fullContext = null} = {}) {
this.corpusId = corpusId;
this.dynamicMode = dynamicMode;
this.logging = logging;
@ -18,6 +19,7 @@ class Client {
this.socket = socket;
this.eventListeners = {};
this.isBusy = false;
this.fullContext = fullContext;
/**
* Disables all console logging.
* This is global. So every other log message in every other Class or

View File

@ -735,7 +735,9 @@ class ResultsList extends List {
addToSubResultsBtn.setAttribute("class", classes + ` add`
);
addToSubResultsBtn.innerHTML = '<i class="material-icons add-btn">add</i>';
aCellElement.appendChild(inspectBtn);
if (client.dynamicMode || client.fullContext) {
aCellElement.appendChild(inspectBtn);
}
if (client.dynamicMode) {
aCellElement.appendChild(addToSubResultsBtn);
}

View File

@ -73,6 +73,9 @@
"corpus_cqpserver_version": {
"type": "string"
},
"fullContext": {
"type": "boolean"
},
"cpos_ranges": {
"type": "boolean"
}
@ -95,7 +98,8 @@
"match_count",
"matches",
"query",
"text_lookup"
"text_lookup",
"fullContext"
],
"title": "NopaqueCQIPYResults"
},