Loader at swith/start all

This commit is contained in:
Ruben van de Ven 2019-11-14 16:18:49 +01:00
parent efd17df089
commit d4e3ddfec6

View file

@ -101,6 +101,8 @@ class Panopticon {
panopticon.updateSelectedHugvey(); panopticon.updateSelectedHugvey();
}, },
unblockAll: function(){ unblockAll: function(){
let el = document.getElementById('unblock-all');
el.classList.add('loading');
let i = 0; let i = 0;
for(let hv of panopticon.hugveys.hugveys) { for(let hv of panopticon.hugveys.hugveys) {
setTimeout(function(){ setTimeout(function(){
@ -111,8 +113,11 @@ class Panopticon {
}, i * 1000); }, i * 1000);
i++; i++;
} }
setTimeout(() => el.classList.remove('loading'), i * 1000);
}, },
startAll: function(){ startAll: function(){
let el = document.getElementById('start-all');
el.classList.add('loading');
let i = 0; let i = 0;
for(let hv of panopticon.hugveys.hugveys) { for(let hv of panopticon.hugveys.hugveys) {
setTimeout(function(){ setTimeout(function(){
@ -123,6 +128,7 @@ class Panopticon {
}, i * 1000); }, i * 1000);
i++; i++;
} }
setTimeout(() => el.classList.remove('loading'), i * 1000);
}, },
} }
} ); } );