mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Add global prgress for inspect activation
This commit is contained in:
parent
b78558fc03
commit
961027a8f7
@ -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");
|
||||
|
@ -230,6 +230,7 @@
|
||||
var resultsList; // resultsList object
|
||||
var queryFormElement; // the query form
|
||||
var collapsibleElements; // all collapsibles on site
|
||||
var progress; // global progress value
|
||||
var queryResultsProgressElement; // Div element holding the progress bar
|
||||
var queryResultsDeterminateElement; // The progress bar for recieved results
|
||||
var queryResultsUserFeedbackElement; // Element showing match count|total etc
|
||||
@ -361,7 +362,7 @@
|
||||
expertModeOff(currentTokenElements);
|
||||
console.log("unchecked! Destroy");
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
// Add onclick to open download modal when Export Results button is pressed
|
||||
|
Loading…
Reference in New Issue
Block a user