From 4bfe310760bf42b2dec4bdd7e7d3900a0244ed88 Mon Sep 17 00:00:00 2001 From: Timon Ostertun Date: Wed, 23 Sep 2020 18:01:25 +0200 Subject: [PATCH] Added sync button --- client/scripts/database.js | 4 ++++ server/page/headerfooter.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/scripts/database.js b/client/scripts/database.js index 71edcb8..aec34ee 100644 --- a/client/scripts/database.js +++ b/client/scripts/database.js @@ -318,6 +318,7 @@ function sync() { syncInProgress = 10; var syncOkay = true; console.log("Sync Start"); + $('#i-sync').addClass('fa-spin'); var interval = window.setInterval(function () { if (syncInProgress <= 0) { @@ -327,6 +328,9 @@ function sync() { osUpdateTimes.put({ table: 'last_sync', time: now }); } console.log("Sync Stop"); + setTimeout(function(){ + $('#i-sync').removeClass('fa-spin'); + }, 500); runPageScript(); } diff --git a/server/page/headerfooter.php b/server/page/headerfooter.php index 79c39d6..6dbf4df 100644 --- a/server/page/headerfooter.php +++ b/server/page/headerfooter.php @@ -7,7 +7,8 @@ else echo ''; } ?> - + +