mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 01:20:41 +00:00
Add global prgress for inspect activation
This commit is contained in:
@ -73,11 +73,16 @@ function download(downloadElem, dataStr, filename, type, filenameSlug) {
|
||||
// ###### Functions to inspect one match, to show more details ######
|
||||
|
||||
// activate inspect buttons if queryFinished is true
|
||||
function activateInspect(progress) {
|
||||
let inspectBtnElements;
|
||||
inspectBtnElements = document.getElementsByClassName("inspect");
|
||||
for (let inspectBtn of inspectBtnElements) {
|
||||
inspectBtn.classList.remove("disabled");
|
||||
function activateInspect() {
|
||||
console.log("activation progress", progress);
|
||||
if (progress === 100) {
|
||||
let inspectBtnElements;
|
||||
inspectBtnElements = document.getElementsByClassName("inspect");
|
||||
for (let inspectBtn of inspectBtnElements) {
|
||||
inspectBtn.classList.remove("disabled");
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,8 @@ function queryRenderResults(payload) {
|
||||
textLookupCountElement.innerText = `${Object.keys(results.resultsJSON.text_lookup).length}`;
|
||||
console.log("Results recieved:", results.resultsJSON);
|
||||
// upate progress status
|
||||
if (payload.progress === 100) {
|
||||
progress = payload.progress; // global declaration
|
||||
if (progress === 100) {
|
||||
queryResultsProgressElement.classList.add("hide");
|
||||
queryResultsUserFeedbackElement.classList.add("hide");
|
||||
queryResultsExportElement.classList.remove("disabled");
|
||||
|
Reference in New Issue
Block a user