mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-01-18 05:50:34 +00:00
Fix rseults only showing after page navigation in import viewer
This commit is contained in:
parent
e9eaa49826
commit
13a6ef95c3
@ -85,15 +85,42 @@ function queryRenderResults(payload, imported=false) {
|
||||
for (let item of items) {
|
||||
item.elm = results.jsList.createResultRowElement(item, payload.chunk);
|
||||
}
|
||||
helperQueryRenderResults(payload);
|
||||
if (progress === 100) {
|
||||
queryResultsProgressElement.classList.add("hide");
|
||||
queryResultsUserFeedbackElement.classList.add("hide");
|
||||
queryResultsExportElement.classList.remove("disabled");
|
||||
addToSubResultsElement.removeAttribute("disabled");
|
||||
// inital expert mode check and sub results activation
|
||||
results.jsList.activateInspect();
|
||||
if (addToSubResultsElement.checked) {
|
||||
results.jsList.activateAddToSubResults();
|
||||
}
|
||||
if (expertModeSwitchElement.checked) {
|
||||
results.jsList.expertModeOn("query-display");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if (imported) {
|
||||
results.jsList.add(resultItems, (items) => {
|
||||
for (let item of items) {
|
||||
item.elm = results.jsList.createResultRowElement(item, payload.chunk,
|
||||
true);
|
||||
}
|
||||
helperQueryRenderResults(payload);
|
||||
progress = 100;
|
||||
console.log(progress);
|
||||
results.jsList.activateInspect();
|
||||
if (expertModeSwitchElement.checked) {
|
||||
results.jsList.expertModeOn("query-display");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function helperQueryRenderResults (payload) {
|
||||
// updating table on finished item creation callback via createResultRowElement
|
||||
results.jsList.update();
|
||||
results.jsList.changeContext(); // sets lr context on first result load
|
||||
// incorporating new chunk results into full results
|
||||
results.data.matches.push(...payload.chunk.matches);
|
||||
@ -110,24 +137,4 @@ function queryRenderResults(payload, imported=false) {
|
||||
console.log("Results recieved:", results.data);
|
||||
// upate progress status
|
||||
progress = payload.progress; // global declaration
|
||||
if (progress === 100 && !imported) {
|
||||
queryResultsProgressElement.classList.add("hide");
|
||||
queryResultsUserFeedbackElement.classList.add("hide");
|
||||
queryResultsExportElement.classList.remove("disabled");
|
||||
addToSubResultsElement.removeAttribute("disabled");
|
||||
// inital expert mode check and sub results activation
|
||||
results.jsList.activateInspect();
|
||||
if (addToSubResultsElement.checked) {
|
||||
results.jsList.activateAddToSubResults();
|
||||
}
|
||||
if (expertModeSwitchElement.checked) {
|
||||
results.jsList.expertModeOn("query-display");
|
||||
}
|
||||
} else if (imported) {
|
||||
progress = 100;
|
||||
results.jsList.activateInspect();
|
||||
if (expertModeSwitchElement.checked) {
|
||||
results.jsList.expertModeOn("query-display");
|
||||
}
|
||||
}
|
||||
}
|
@ -403,7 +403,6 @@ class ResultsList extends List {
|
||||
}
|
||||
|
||||
helperCreateCpos(cpos_ranges, cpos_values) {
|
||||
console.log(cpos_values);
|
||||
let lc;
|
||||
let c;
|
||||
let rc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user