Delay refresh on UI interaction

This commit is contained in:
prpr 2022-10-16 15:27:33 +01:00
parent 00e8a342c0
commit a587278586
1 changed files with 12 additions and 1 deletions

View File

@ -103,6 +103,8 @@ function load()
$(function() {
var loader=0;
$('table')
.tablesorter({
sortList: [[0,1]],
@ -198,7 +200,16 @@ $('#queuetab').on('click', 'a.file', function(e) {
encodeURIComponent('{root}/' + dirname(file));
});
setInterval(load, 60000);
function set_loader() {
if (loader != 0)
clearInterval(loader);
loader=setInterval(load, 60000);
}
$('#queuetab').on('change', 'input[type=checkbox]', set_loader);
set_loader();
});