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,12 +73,17 @@ function download(downloadElem, dataStr, filename, type, filenameSlug) {
|
|||||||
// ###### Functions to inspect one match, to show more details ######
|
// ###### Functions to inspect one match, to show more details ######
|
||||||
|
|
||||||
// activate inspect buttons if queryFinished is true
|
// activate inspect buttons if queryFinished is true
|
||||||
function activateInspect(progress) {
|
function activateInspect() {
|
||||||
|
console.log("activation progress", progress);
|
||||||
|
if (progress === 100) {
|
||||||
let inspectBtnElements;
|
let inspectBtnElements;
|
||||||
inspectBtnElements = document.getElementsByClassName("inspect");
|
inspectBtnElements = document.getElementsByClassName("inspect");
|
||||||
for (let inspectBtn of inspectBtnElements) {
|
for (let inspectBtn of inspectBtnElements) {
|
||||||
inspectBtn.classList.remove("disabled");
|
inspectBtn.classList.remove("disabled");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//gets result cpos infos for one dataIndex to send back to the server
|
//gets result cpos infos for one dataIndex to send back to the server
|
||||||
|
@ -50,7 +50,8 @@ function queryRenderResults(payload) {
|
|||||||
textLookupCountElement.innerText = `${Object.keys(results.resultsJSON.text_lookup).length}`;
|
textLookupCountElement.innerText = `${Object.keys(results.resultsJSON.text_lookup).length}`;
|
||||||
console.log("Results recieved:", results.resultsJSON);
|
console.log("Results recieved:", results.resultsJSON);
|
||||||
// upate progress status
|
// upate progress status
|
||||||
if (payload.progress === 100) {
|
progress = payload.progress; // global declaration
|
||||||
|
if (progress === 100) {
|
||||||
queryResultsProgressElement.classList.add("hide");
|
queryResultsProgressElement.classList.add("hide");
|
||||||
queryResultsUserFeedbackElement.classList.add("hide");
|
queryResultsUserFeedbackElement.classList.add("hide");
|
||||||
queryResultsExportElement.classList.remove("disabled");
|
queryResultsExportElement.classList.remove("disabled");
|
||||||
|
@ -230,6 +230,7 @@
|
|||||||
var resultsList; // resultsList object
|
var resultsList; // resultsList object
|
||||||
var queryFormElement; // the query form
|
var queryFormElement; // the query form
|
||||||
var collapsibleElements; // all collapsibles on site
|
var collapsibleElements; // all collapsibles on site
|
||||||
|
var progress; // global progress value
|
||||||
var queryResultsProgressElement; // Div element holding the progress bar
|
var queryResultsProgressElement; // Div element holding the progress bar
|
||||||
var queryResultsDeterminateElement; // The progress bar for recieved results
|
var queryResultsDeterminateElement; // The progress bar for recieved results
|
||||||
var queryResultsUserFeedbackElement; // Element showing match count|total etc
|
var queryResultsUserFeedbackElement; // Element showing match count|total etc
|
||||||
@ -361,7 +362,7 @@
|
|||||||
expertModeOff(currentTokenElements);
|
expertModeOff(currentTokenElements);
|
||||||
console.log("unchecked! Destroy");
|
console.log("unchecked! Destroy");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add onclick to open download modal when Export Results button is pressed
|
// Add onclick to open download modal when Export Results button is pressed
|
||||||
|
Loading…
Reference in New Issue
Block a user