mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add info tool tip
This commit is contained in:
parent
8147dc404a
commit
ebe598312f
@ -125,7 +125,7 @@ function recieveResults(response) {
|
|||||||
result["loaded_match_count"] += Object.keys(chunk["matches"]).length;
|
result["loaded_match_count"] += Object.keys(chunk["matches"]).length;
|
||||||
console.log("After current match count", result["loaded_match_count"]);
|
console.log("After current match count", result["loaded_match_count"]);
|
||||||
let queryResultsMetadataElement = document.getElementById("query-results-metadata");
|
let queryResultsMetadataElement = document.getElementById("query-results-metadata");
|
||||||
queryResultsMetadataElement.innerHTML = `<p>The query resulted in a total of ${chunk["match_count"]} matches. </p> <p> ${result["loaded_match_count"]} of ${result["match_count"]} matches in ${count_corpus_files} corpus files have been loaded.</p>`;
|
queryResultsMetadataElement.innerHTML = `<p>The query resulted in a total of ${chunk["match_count"]} matches. </p> <p> ${result["loaded_match_count"]} of ${result["match_count"]} matches in ${count_corpus_files} corpus files have been loaded.<i class="material-icons" id="tool-tip-info">help</i></p>`;
|
||||||
let queryResultsInteractionElement = document.getElementById("interaction-elements");
|
let queryResultsInteractionElement = document.getElementById("interaction-elements");
|
||||||
queryResultsInteractionElement.appendChild(exportQueryResultsElement);
|
queryResultsInteractionElement.appendChild(exportQueryResultsElement);
|
||||||
let queryResultsHeadElement = document.getElementById("query-results-head");
|
let queryResultsHeadElement = document.getElementById("query-results-head");
|
||||||
@ -134,12 +134,22 @@ function recieveResults(response) {
|
|||||||
console.log(queryStatus);
|
console.log(queryStatus);
|
||||||
queryResultsDeterminateElement.style["width"] = `${queryStatus}%`;
|
queryResultsDeterminateElement.style["width"] = `${queryStatus}%`;
|
||||||
console.log(queryResultsDeterminateElement.style["width"]);
|
console.log(queryResultsDeterminateElement.style["width"]);
|
||||||
|
let toolTipInfoElement = document.getElementById("tool-tip-info");
|
||||||
|
toolTipInfoElement.addEventListener("mouseover", function(event) {
|
||||||
|
M.Tooltip.init(toolTipInfoElement, {"html": `<p>The Server is still sending you your results. Functions like "Export Results" and "Match Inspect" will be available after all matches have been loaded.</p>`,
|
||||||
|
"inDuration": 1500,
|
||||||
|
"margin": 15,
|
||||||
|
"position": "top",
|
||||||
|
"transitionMovement": 0})
|
||||||
|
});
|
||||||
// enable download and inspect when query is finished
|
// enable download and inspect when query is finished
|
||||||
// also sets queryFinished to true
|
// also sets queryFinished to true
|
||||||
if (queryStatus === 100) {
|
if (queryStatus === 100) {
|
||||||
queryFinished = true; // global declaration to set downlaod button and inspects buttons back to disabled for new queries
|
queryFinished = true; // global declaration to set downlaod button and inspects buttons back to disabled for new queries
|
||||||
queryResultsDeterminateElement.parentNode.parentNode.classList.add("hide");
|
queryResultsDeterminateElement.parentNode.parentNode.classList.add("hide");
|
||||||
exportQueryResultsElement.classList.remove("disabled");
|
exportQueryResultsElement.classList.remove("disabled");
|
||||||
|
toolTipInfoElement.classList.add("hide");
|
||||||
|
queryResultsMetadataElement.innerHTML = `<p>The query resulted in a total of ${chunk["match_count"]} matches. </p> <p> ${result["loaded_match_count"]} of ${result["match_count"]} matches in ${count_corpus_files} corpus files have been loaded.<i class="material-icons">check_circle</i></p>`;
|
||||||
activateInspect();
|
activateInspect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,6 +246,7 @@ server side -->
|
|||||||
var queryResultsDeterminateElement;
|
var queryResultsDeterminateElement;
|
||||||
var queryResultsTableElement;
|
var queryResultsTableElement;
|
||||||
var queryLoadingElement;
|
var queryLoadingElement;
|
||||||
|
var toolTipInfoElement;
|
||||||
|
|
||||||
var contextResultsElement;
|
var contextResultsElement;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user