RA-#25 Show loader after sync

This commit is contained in:
ostertun
2020-10-14 11:19:32 +02:00
parent 3c8289d11c
commit e57bf4a426
8 changed files with 12 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ var showLoader = function() {
if (loaderCount < 1) { if (loaderCount < 1) {
$('#preloader').removeClass('preloader-hide'); $('#preloader').removeClass('preloader-hide');
loaderCount = 0; loaderCount = 0;
log('Loader shown');
} }
loaderCount ++; loaderCount ++;
} }

View File

@@ -516,6 +516,7 @@ function sync() {
onAfterSync(); onAfterSync();
} }
removeSyncInfoToPreloader(); removeSyncInfoToPreloader();
showLoader();
runPageScript(); runPageScript();
resolve(); resolve();
} }

View File

@@ -68,6 +68,7 @@ function selectChange() {
if (typeof siteScript === 'function') { if (typeof siteScript === 'function') {
history.replaceState(null, '', '?year=' + val); history.replaceState(null, '', '?year=' + val);
showLoader();
siteScript(); siteScript();
} }
} }

View File

@@ -261,6 +261,7 @@ function selectChange() {
if (typeof siteScript === 'function') { if (typeof siteScript === 'function') {
history.replaceState(null, '', '?year=' + val); history.replaceState(null, '', '?year=' + val);
showLoader();
siteScript(); siteScript();
} }
} }

View File

@@ -10,6 +10,7 @@ function selectChange() {
if (typeof siteScript === 'function') { if (typeof siteScript === 'function') {
history.replaceState(null, '', '?year=' + val); history.replaceState(null, '', '?year=' + val);
showLoader();
siteScript(); siteScript();
} }
} }

View File

@@ -3,6 +3,7 @@ function selectChange() {
if (typeof siteScript === 'function') { if (typeof siteScript === 'function') {
history.replaceState(null, '', '?year=' + val); history.replaceState(null, '', '?year=' + val);
showLoader();
siteScript(); siteScript();
} }
} }

View File

@@ -175,7 +175,8 @@ async function selectChange(callSiteScript = true) {
$('#input-jugstrict').prop('checked', jugstrict); $('#input-jugstrict').prop('checked', jugstrict);
if (callSiteScript && (typeof siteScript === 'function')) { if (callSiteScript && (typeof siteScript === 'function')) {
history.replaceState(null, '', '?type=' + type + '&year=' + year) history.replaceState(null, '', '?type=' + type + '&year=' + year);
showLoader();
siteScript(); siteScript();
} }
} }
@@ -187,6 +188,7 @@ function buttonShowPressed() {
if ($('#input-jugend').prop('checked')) chboxes += '&jugend=on' if ($('#input-jugend').prop('checked')) chboxes += '&jugend=on'
if ($('#input-jugstrict').prop('checked')) chboxes += '&jugstrict=on' if ($('#input-jugstrict').prop('checked')) chboxes += '&jugstrict=on'
history.replaceState(null, '', '?type=user&from=' + $('#input-from').val() + "&to=" + $('#input-to').val() + chboxes) history.replaceState(null, '', '?type=user&from=' + $('#input-from').val() + "&to=" + $('#input-to').val() + chboxes)
showLoader();
siteScript(); siteScript();
} }
} }

View File

@@ -14,6 +14,7 @@ function selectChange(callSiteScript = true) {
if (callSiteScript && (typeof siteScript === 'function')) { if (callSiteScript && (typeof siteScript === 'function')) {
history.replaceState(null, '', '?year=' + val); history.replaceState(null, '', '?year=' + val);
showLoader();
siteScript(); siteScript();
} }
} }
@@ -21,7 +22,8 @@ function selectChange(callSiteScript = true) {
function buttonShowPressed() { function buttonShowPressed() {
if (typeof siteScript === 'function') { if (typeof siteScript === 'function') {
history.replaceState(null, '', '?year=user&from=' + $('#input-from').val() + "&to=" + $('#input-to').val()) history.replaceState(null, '', '?year=user&from=' + $('#input-from').val() + "&to=" + $('#input-to').val());
showLoader();
siteScript(); siteScript();
} }
} }