mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-01-18 22:00:35 +00:00
Fix create sub results showing even if other result creation is running.
This commit is contained in:
parent
1e316d6852
commit
fd1d1c2fc3
@ -215,7 +215,7 @@ class ResultsList extends List {
|
|||||||
// function checks if its status in addToSubResultsStatus is either flase or
|
// function checks if its status in addToSubResultsStatus is either flase or
|
||||||
// true. Adds match to sub-results if status is false if status is true it
|
// true. Adds match to sub-results if status is false if status is true it
|
||||||
// removes it.
|
// removes it.
|
||||||
addToSubResults(dataIndex, tableCall=true) {
|
addToSubResults(dataIndex, client, tableCall=true) {
|
||||||
if (!this.addToSubResultsStatus[dataIndex]
|
if (!this.addToSubResultsStatus[dataIndex]
|
||||||
|| this.addToSubResultsStatus === undefined) {
|
|| this.addToSubResultsStatus === undefined) {
|
||||||
// add button is activated because status is either false or undefined
|
// add button is activated because status is either false or undefined
|
||||||
@ -235,7 +235,7 @@ class ResultsList extends List {
|
|||||||
M.textareaAutoResize(this.subResultsMatchIds); // after an insert textarea has to be resized manually
|
M.textareaAutoResize(this.subResultsMatchIds); // after an insert textarea has to be resized manually
|
||||||
}
|
}
|
||||||
// Toggles the create button according to the number of ids in addToSubResultsIdsToShow
|
// Toggles the create button according to the number of ids in addToSubResultsIdsToShow
|
||||||
if ([...this.addToSubResultsIdsToShow].length > 0) {
|
if ([...this.addToSubResultsIdsToShow].length > 0 && !client.isBusy) {
|
||||||
this.subResultsCreate.classList.toggle('disabled', false);
|
this.subResultsCreate.classList.toggle('disabled', false);
|
||||||
} else if ([...this.addToSubResultsIdsToShow].length === 0) {
|
} else if ([...this.addToSubResultsIdsToShow].length === 0) {
|
||||||
this.subResultsCreate.classList.toggle('disabled', true);
|
this.subResultsCreate.classList.toggle('disabled', true);
|
||||||
|
@ -283,7 +283,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
resultsList.inspect([dataIndex], 'inspect');
|
resultsList.inspect([dataIndex], 'inspect');
|
||||||
} else if (event.target.classList.contains('add-btn')) {
|
} else if (event.target.classList.contains('add-btn')) {
|
||||||
dataIndex = parseInt(event.target.closest('tr').dataset.index);
|
dataIndex = parseInt(event.target.closest('tr').dataset.index);
|
||||||
resultsList.addToSubResults(dataIndex);
|
resultsList.addToSubResults(dataIndex, client);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user