mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-08 21:06:24 +08:00
Fix duplicated tasks in the table after filtering or duplicating [SCI-7794] (#4865)
This commit is contained in:
parent
d3ce565c1d
commit
0973659f52
2 changed files with 10 additions and 6 deletions
|
@ -11,6 +11,7 @@ var ExperimnetTable = {
|
||||||
filters: [], // Filter {name: '', init(), closeFilter(), apply(), active(), clearFilter()}
|
filters: [], // Filter {name: '', init(), closeFilter(), apply(), active(), clearFilter()}
|
||||||
myModulesCurrentSort: '',
|
myModulesCurrentSort: '',
|
||||||
pageSize: GLOBAL_CONSTANTS.DEFAULT_ELEMENTS_PER_PAGE,
|
pageSize: GLOBAL_CONSTANTS.DEFAULT_ELEMENTS_PER_PAGE,
|
||||||
|
provisioningStatusTimeout: '',
|
||||||
getUrls: function(id) {
|
getUrls: function(id) {
|
||||||
return $(`.table-row[data-id="${id}"]`).data('urls');
|
return $(`.table-row[data-id="${id}"]`).data('urls');
|
||||||
},
|
},
|
||||||
|
@ -589,7 +590,8 @@ var ExperimnetTable = {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (remainingUrls.length > 0) {
|
if (remainingUrls.length > 0) {
|
||||||
setTimeout(() => {
|
clearTimeout(this.provisioningStatusTimeout);
|
||||||
|
this.provisioningStatusTimeout = setTimeout(() => {
|
||||||
this.pollProvisioningStatuses(remainingUrls);
|
this.pollProvisioningStatuses(remainingUrls);
|
||||||
}, 10000);
|
}, 10000);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -44,18 +44,20 @@ var filterDropdown = (function() {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}).on('hide.bs.dropdown', function() {
|
}).on('hide.bs.dropdown', function(e) {
|
||||||
$('#textSearchFilterHistory').hide();
|
if (e.target === e.currentTarget) {
|
||||||
$('.apply-filters', $filterContainer).click();
|
$('#textSearchFilterHistory').hide();
|
||||||
|
$('.apply-filters', $filterContainer).click();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$textFilter.click(function(e) {
|
$textFilter.click(function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
$('#textSearchFilterHistory').toggle();
|
$('#textSearchFilterHistory').toggle();
|
||||||
$(e.target).closest('.dropdown').toggleClass('open');
|
$(e.currentTarget).closest('.dropdown').toggleClass('open');
|
||||||
}).on('input', (e) => {
|
}).on('input', (e) => {
|
||||||
$('#textSearchFilterHistory').hide();
|
$('#textSearchFilterHistory').hide();
|
||||||
$(e.target).closest('.dropdown').removeClass('open');
|
$(e.currentTarget).closest('.dropdown').removeClass('open');
|
||||||
});
|
});
|
||||||
|
|
||||||
$filterContainer.on('click', '.projects-search-keyword', function(e) {
|
$filterContainer.on('click', '.projects-search-keyword', function(e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue