From d4e3ddfec62ce8d6c5773fbd973557054af97fe2 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Thu, 14 Nov 2019 16:18:49 +0100 Subject: [PATCH] Loader at swith/start all --- www/js/hugvey_console.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/js/hugvey_console.js b/www/js/hugvey_console.js index b0828ed..18a7b47 100644 --- a/www/js/hugvey_console.js +++ b/www/js/hugvey_console.js @@ -101,6 +101,8 @@ class Panopticon { panopticon.updateSelectedHugvey(); }, unblockAll: function(){ + let el = document.getElementById('unblock-all'); + el.classList.add('loading'); let i = 0; for(let hv of panopticon.hugveys.hugveys) { setTimeout(function(){ @@ -111,8 +113,11 @@ class Panopticon { }, i * 1000); i++; } + setTimeout(() => el.classList.remove('loading'), i * 1000); }, startAll: function(){ + let el = document.getElementById('start-all'); + el.classList.add('loading'); let i = 0; for(let hv of panopticon.hugveys.hugveys) { setTimeout(function(){ @@ -123,6 +128,7 @@ class Panopticon { }, i * 1000); i++; } + setTimeout(() => el.classList.remove('loading'), i * 1000); }, } } );