From: Robert Kaiser
Welcome to Lantea Maps!
This web app lets you record GPS tracks of your journeys, which you can diff --git a/js/ui.js b/js/ui.js index 92dd488..0c8af9a 100644 --- a/js/ui.js +++ b/js/ui.js @@ -239,11 +239,15 @@ function initDB(aEvent) { request.onerror = function(event) { // Errors can be handled here. Error codes explain in: // https://developer.mozilla.org/en/IndexedDB/IDBDatabaseException#Constants - if (gDebug) - console.log("error opening mainDB: " + event.target.errorCode); + console.log("error opening mainDB: " + event.target.error); + showDBErrorDialog(); + if (gDebug) { + console.log("error code: " + event.target.error.code + + " - name: " + event.target.error.name); + } }; request.onsuccess = function(event) { - mainDB = request.result; + mainDB = event.target.result; var throwEv = new CustomEvent("dbinit-done"); gAction.dispatchEvent(throwEv); }; @@ -382,6 +386,16 @@ function showGLWarningDialog() { dia.classList.remove("hidden"); } +function showDBErrorDialog() { + var dia = document.getElementById("dialogArea"); + var areas = dia.children; + for (var i = 0; i <= areas.length - 1; i++) { + areas[i].style.display = "none"; + } + document.getElementById("DBError").style.display = "block"; + dia.classList.remove("hidden"); +} + function showFirstRunDialog() { var dia = document.getElementById("dialogArea"); var areas = dia.children; diff --git a/manifest.appcache b/manifest.appcache index 8cbeac3..e4fd815 100644 --- a/manifest.appcache +++ b/manifest.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST -# 2018-01-21 +# 2018-01-22 index.html login.html manifest.webapp diff --git a/style/lantea.css b/style/lantea.css index dbc28b0..16bacfc 100644 --- a/style/lantea.css +++ b/style/lantea.css @@ -183,7 +183,7 @@ h1 { @media screen and (max-width: 330px) { .menuDrawer { - left: calc(-300px - 1ch); /* account for padding */ + transform: translateX(calc(-300px - 1ch)); /* account for padding */ width: 300px; } }