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