mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 17:10:41 +00:00
Some small fixes and user feedback
This commit is contained in:
@ -40,6 +40,7 @@ function querySetup(payload) {
|
||||
let textarea = subResultsIdListElement.getElementsByTagName("textarea")[0];
|
||||
textarea.innerText = "";
|
||||
M.textareaAutoResize(textarea);
|
||||
nrMarkedMatches.innerText = 0;
|
||||
results.jsList.addToSubResultsStatus = {};
|
||||
results.jsList.addToSubResultsIdsToShow = new Set();
|
||||
queryResultsExportElement.classList.add("disabled");
|
||||
|
@ -227,12 +227,14 @@ class ResultsList extends List {
|
||||
this.addToSubResultsIdsToShow.add(dataIndex + 1); // + 1 because user does not see zero indexd data indexes
|
||||
textarea.innerText = [...this.addToSubResultsIdsToShow].sort(function(a, b){return a-b}).join(", "); // automaticalle sorts ids into the textarea in ascending order
|
||||
M.textareaAutoResize(textarea); // after an insert textarea has to be resized manually
|
||||
nrMarkedMatches.innerText = [...this.addToSubResultsIdsToShow].length;
|
||||
} else if (this.addToSubResultsStatus[dataIndex]) {
|
||||
// add button is deactivated because status is true
|
||||
this.helperDeactivateBtn(event.target);
|
||||
this.addToSubResultsStatus[dataIndex] = false; // sets status to false
|
||||
this.addToSubResultsIdsToShow.delete(dataIndex + 1); // + 1 because user does not see zero indexd data indexes
|
||||
textarea.innerText = [...this.addToSubResultsIdsToShow].sort(function(a, b){return a-b}).join(", "); // automaticalle sorts ids into the textarea in ascending order
|
||||
nrMarkedMatches.innerText = [...this.addToSubResultsIdsToShow].length;
|
||||
M.textareaAutoResize(textarea); // after an insert textarea has to be resized manually
|
||||
}
|
||||
// Toggles the create button accoring to the number of ids in addToSubResultsIdsToShow
|
||||
@ -293,8 +295,12 @@ class ResultsList extends List {
|
||||
// gets result cpos infos for one dataIndex (list of length 1) to send back to
|
||||
// the server
|
||||
inspect(dataIndex, type) {
|
||||
let contextMatchNrElement;
|
||||
// get result infos from server and show them in context modal
|
||||
this.contextId = dataIndex[0];
|
||||
// match nr for user to display derived from data_index
|
||||
contextMatchNrElement = document.getElementById("context-match-nr");
|
||||
contextMatchNrElement.innerText = this.contextId + 1;
|
||||
let contextResultsElement;
|
||||
contextResultsElement = document.getElementById("context-results");
|
||||
contextResultsElement.innerHTML = ""; // clear it from old inspects
|
||||
@ -353,6 +359,7 @@ class ResultsList extends List {
|
||||
let uniqueS;
|
||||
|
||||
this.contextData = response.payload;
|
||||
console.log(this.contextData);
|
||||
this.contextData["cpos_ranges"] = response.payload.cpos_ranges;
|
||||
this.contextData["query"] = results.data.query;
|
||||
this.contextData["context_id"] = this.contextId;
|
||||
|
Reference in New Issue
Block a user