Fixes
This commit is contained in:
@@ -483,6 +483,7 @@ function sync() {
|
|||||||
if (!canUseLocalDB) return false;
|
if (!canUseLocalDB) return false;
|
||||||
if (syncInProgress > 0) return false;
|
if (syncInProgress > 0) return false;
|
||||||
|
|
||||||
|
return new Promise(function(resolve) {
|
||||||
var now = Math.floor(Date.now() / 1000);
|
var now = Math.floor(Date.now() / 1000);
|
||||||
|
|
||||||
db.transaction('update_times').objectStore('update_times').getAll().onsuccess = function (event) {
|
db.transaction('update_times').objectStore('update_times').getAll().onsuccess = function (event) {
|
||||||
@@ -513,6 +514,7 @@ function sync() {
|
|||||||
}
|
}
|
||||||
removeSyncInfoToPreloader();
|
removeSyncInfoToPreloader();
|
||||||
runPageScript();
|
runPageScript();
|
||||||
|
resolve();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
@@ -910,6 +912,7 @@ function sync() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkSync() {
|
function checkSync() {
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ async function planningSwitchChanged() {
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
console.log('authentification failed');
|
log('authentification failed');
|
||||||
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
||||||
} else if (xhr.status == 0) {
|
} else if (xhr.status == 0) {
|
||||||
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um den Status zu ändern');
|
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um den Status zu ändern');
|
||||||
} else {
|
} else {
|
||||||
console.log('Login: unbekannter Fehler', status, error);
|
log('Login: unbekannter Fehler', status, error);
|
||||||
console.log(xhr);
|
log(xhr);
|
||||||
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
||||||
}
|
}
|
||||||
$('#menu-status').hideMenu();
|
$('#menu-status').hideMenu();
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ async function planningSwitchChanged() {
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
console.log('authentification failed');
|
log('authentification failed');
|
||||||
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
||||||
} else if (xhr.status == 0) {
|
} else if (xhr.status == 0) {
|
||||||
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
||||||
} else {
|
} else {
|
||||||
console.log('planning_add: unbekannter Fehler', status, error);
|
log('planning_add: unbekannter Fehler', status, error);
|
||||||
console.log(xhr);
|
log(xhr);
|
||||||
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
||||||
}
|
}
|
||||||
$('#menu-edit').hideMenu();
|
$('#menu-edit').hideMenu();
|
||||||
@@ -46,13 +46,13 @@ async function planningSwitchChanged() {
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
console.log('authentification failed');
|
log('authentification failed');
|
||||||
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
||||||
} else if (xhr.status == 0) {
|
} else if (xhr.status == 0) {
|
||||||
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
||||||
} else {
|
} else {
|
||||||
console.log('planning_remove: unbekannter Fehler', status, error);
|
log('planning_remove: unbekannter Fehler', status, error);
|
||||||
console.log(xhr);
|
log(xhr);
|
||||||
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
||||||
}
|
}
|
||||||
$('#menu-edit').hideMenu();
|
$('#menu-edit').hideMenu();
|
||||||
@@ -90,13 +90,13 @@ async function sailorSelected(sid) {
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
console.log('authentification failed');
|
log('authentification failed');
|
||||||
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
||||||
} else if (xhr.status == 0) {
|
} else if (xhr.status == 0) {
|
||||||
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
||||||
} else {
|
} else {
|
||||||
console.log(action + ': unbekannter Fehler', status, error);
|
log(action + ': unbekannter Fehler', status, error);
|
||||||
console.log(xhr);
|
log(xhr);
|
||||||
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
||||||
}
|
}
|
||||||
hideLoader();
|
hideLoader();
|
||||||
@@ -167,13 +167,13 @@ async function planningChangeCrew(sid = null) {
|
|||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
console.log('authentification failed');
|
log('authentification failed');
|
||||||
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
toastError('Authentifizierung fehlgeschlagen. Versuche es erneut.');
|
||||||
} else if (xhr.status == 0) {
|
} else if (xhr.status == 0) {
|
||||||
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
toastError('Du bist momentan offline.<br>Stelle eine Internetverbindung her, um die Änderungen zu speichern');
|
||||||
} else {
|
} else {
|
||||||
console.log('planning_remove_crew: unbekannter Fehler', status, error);
|
log('planning_remove_crew: unbekannter Fehler', status, error);
|
||||||
console.log(xhr);
|
log(xhr);
|
||||||
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
toastError('Ein unbekannter Fehler ist aufgetreten. Bitte versuche es noch einmal', 5000);
|
||||||
}
|
}
|
||||||
$('#menu-edit').hideMenu();
|
$('#menu-edit').hideMenu();
|
||||||
|
|||||||
Reference in New Issue
Block a user