From 18f5e4dd94301f84f53c6b7f61712dc548488d1c Mon Sep 17 00:00:00 2001 From: ctucx Date: Sat, 13 Jun 2020 06:09:36 +0000 Subject: [PATCH] fixes --- client/js/app_functions.js | 2 +- client/js/journeysView.js | 4 --- client/js/searchView.js | 7 +++-- client/style.css | 55 +++++++++++++------------------------- 4 files changed, 22 insertions(+), 46 deletions(-) diff --git a/client/js/app_functions.js b/client/js/app_functions.js index 675ea36..9d2ae5c 100644 --- a/client/js/app_functions.js +++ b/client/js/app_functions.js @@ -172,7 +172,7 @@ export const restoreDataStorage = () => { if (data !== null) { let dataStorage = JSON.parse(data); - if (dataStorage.dbVer < 0.5) { + if (dataStorage.dbVer < 0.6) { showModal('Lokale Datenbank veraltet - Datenbank wird neu erstellt.'); if (devMode !== true) { localStorage.removeItem('dataStorage'); diff --git a/client/js/journeysView.js b/client/js/journeysView.js index 8849a45..ac74438 100644 --- a/client/js/journeysView.js +++ b/client/js/journeysView.js @@ -123,7 +123,3 @@ export const moreJourneys = async (reqId, mode) => { addCache('journeys', data); journeysView([reqId]); }; - -export const reloadJourneys = async (requestId) => { - showAlertModal("not implemented yet"); -}; diff --git a/client/js/searchView.js b/client/js/searchView.js index 4e6d7e9..19ea0c4 100644 --- a/client/js/searchView.js +++ b/client/js/searchView.js @@ -106,7 +106,7 @@ const searchTemplate = (journeysHistory) => html` -
+
@@ -120,7 +120,7 @@ const searchTemplate = (journeysHistory) => html` ${journeysHistory.length ? html` - + ${journeysHistoryTemplate(journeysHistory)} ` : ''} @@ -427,13 +427,12 @@ const onKeydown = (e) => { if (which == 13) { // enter if (!ElementById('selected')) { document.querySelector(`#${e.target.id}Suggestions>.suggestionsbox>:first-child`).click(); + if (e.target.id === 'to') ElementById('go').click(); } else { let elem = ElementById('selected') elem.id = ''; elem.click(); } - - if (e.target.id === 'to') ElementById('go').click(); return false; } diff --git a/client/style.css b/client/style.css index 872c029..a029bbe 100755 --- a/client/style.css +++ b/client/style.css @@ -6,7 +6,6 @@ font-face { font-style: normal; } - * { box-sizing: border-box; border-collapse: collapse; @@ -85,22 +84,6 @@ header { 100% { transform: rotate(360deg); } } -label[for=btn-history] { - cursor: pointer; - border-radius: 100%; - height: 48px; - width: 48px; - background-color: #eee; - margin: .5em auto; - transition: box-shadow 150ms; - border: 1px solid rgba(0, 0, 0, .1); - user-select: none; -} - -:checked ~ label[for=btn-history] { - transform: rotate(180deg); -} - .loadMore { cursor: pointer; border-radius: 100%; @@ -122,6 +105,10 @@ label[for=btn-history] { margin-top: 15px; } +:checked ~ label[for=btn-history] { + transform: rotate(180deg); +} + table { border-bottom: 1px solid rgba(0, 0, 0, 0.3); width: 100%; @@ -427,16 +414,14 @@ tbody tr:hover td { margin: .7em .3em .5em .3em; } -@supports (display: flex) { - .search>.title>.logo { - box-shadow: 0 .1em .2em rgba(0, 0, 0, .5); - background-color: #7171e5; - border-radius: 15%; - width: 50px; - height: 50px; - margin: 0; - padding: 5px 5px 2px 6px; - } +.search>.title>.logo { + box-shadow: 0 .1em .2em rgba(0, 0, 0, .5); + background-color: #7171e5; + border-radius: 15%; + width: 50px; + height: 50px; + margin: 0; + padding: 5px 5px 2px 6px; } .search .btn.go { @@ -631,14 +616,12 @@ tbody tr:hover td { } } -@supports (display: flex) { - .hidden { - display: none !important; - } +.hidden { + display: none !important; +} - label[for=from], label[for=to], label[for=isarr], label[for="date"], label[for=time] { - display: none; - } +label[for=from], label[for=to], label[for=isarr], label[for="date"], label[for=time] { + display: none; } #overlay { @@ -671,7 +654,6 @@ tbody tr:hover td { border-radius: 4px; background-color: white; width: fit-content; - width: -moz-fit-content; padding: 15px; box-shadow: 0 1px 4px rgba(0, 0, 0, .6); } @@ -682,7 +664,6 @@ tbody tr:hover td { background-color: rgba(20, 30, 255, .7); color: white; width: fit-content; - width: -moz-fit-content; padding: 8px 20px; margin-left: auto; margin-top: 10px; @@ -802,7 +783,7 @@ form>div.history { } .station-column { - style="width: 60%;" + width: 60%; } .modal {