Update autocompletion for T-S-DE-IRIS 1.59
This commit is contained in:
parent
f9b25a56b3
commit
64e20b50cf
3 changed files with 41 additions and 7 deletions
|
@ -133,6 +133,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Alt Hüttendorf": null,
|
"Alt Hüttendorf": null,
|
||||||
"Alt Rosenthal": null,
|
"Alt Rosenthal": null,
|
||||||
"Alt Schwerin": null,
|
"Alt Schwerin": null,
|
||||||
|
"Altach": null,
|
||||||
"Altbach": null,
|
"Altbach": null,
|
||||||
"Altdorf West": null,
|
"Altdorf West": null,
|
||||||
"Altdorf(CH)": null,
|
"Altdorf(CH)": null,
|
||||||
|
@ -186,6 +187,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Alttann": null,
|
"Alttann": null,
|
||||||
"Altötting": null,
|
"Altötting": null,
|
||||||
"Alveslohe": null,
|
"Alveslohe": null,
|
||||||
|
"Alvesta station": null,
|
||||||
"Alzenau Burg": null,
|
"Alzenau Burg": null,
|
||||||
"Alzenau Nord": null,
|
"Alzenau Nord": null,
|
||||||
"Alzenau(Unterfr)": null,
|
"Alzenau(Unterfr)": null,
|
||||||
|
@ -1035,6 +1037,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Blindheim": null,
|
"Blindheim": null,
|
||||||
"Bloemendaal": null,
|
"Bloemendaal": null,
|
||||||
"Bludenz": null,
|
"Bludenz": null,
|
||||||
|
"Bludenz Brunnenfeld": null,
|
||||||
|
"Bludenz-Moos": null,
|
||||||
"Blumberg(b Berlin)": null,
|
"Blumberg(b Berlin)": null,
|
||||||
"Blumberg-Rehhahn": null,
|
"Blumberg-Rehhahn": null,
|
||||||
"Blumberg-Riedöschingen": null,
|
"Blumberg-Riedöschingen": null,
|
||||||
|
@ -1967,6 +1971,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Dörpen": null,
|
"Dörpen": null,
|
||||||
"Dörrberg": null,
|
"Dörrberg": null,
|
||||||
"Dörverden": null,
|
"Dörverden": null,
|
||||||
|
"Döttingen": null,
|
||||||
"Dülken": null,
|
"Dülken": null,
|
||||||
"Dülmen": null,
|
"Dülmen": null,
|
||||||
"Düren": null,
|
"Düren": null,
|
||||||
|
@ -2383,13 +2388,16 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Fegersheim Lipsheim": null,
|
"Fegersheim Lipsheim": null,
|
||||||
"Fehmarn-Burg": null,
|
"Fehmarn-Burg": null,
|
||||||
"Fehraltorf": null,
|
"Fehraltorf": null,
|
||||||
|
"Fehring": null,
|
||||||
"Feilitzsch": null,
|
"Feilitzsch": null,
|
||||||
"Feldafing": null,
|
"Feldafing": null,
|
||||||
|
"Feldbach/Raab": null,
|
||||||
"Feldberg(Meckl)": null,
|
"Feldberg(Meckl)": null,
|
||||||
"Feldberg-Bärental": null,
|
"Feldberg-Bärental": null,
|
||||||
"Felde": null,
|
"Felde": null,
|
||||||
"Feldhausen": null,
|
"Feldhausen": null,
|
||||||
"Feldkirch": null,
|
"Feldkirch": null,
|
||||||
|
"Feldkirch Amberg": null,
|
||||||
"Feldkirchen in Kärnten": null,
|
"Feldkirchen in Kärnten": null,
|
||||||
"Feldkirchen(b München)": null,
|
"Feldkirchen(b München)": null,
|
||||||
"Feldolling": null,
|
"Feldolling": null,
|
||||||
|
@ -2845,6 +2853,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Glauburg-Stockheim": null,
|
"Glauburg-Stockheim": null,
|
||||||
"Glauchau(Sachs)": null,
|
"Glauchau(Sachs)": null,
|
||||||
"Glauchau-Schönbörnchen": null,
|
"Glauchau-Schönbörnchen": null,
|
||||||
|
"Gleisdorf": null,
|
||||||
"Glesch": null,
|
"Glesch": null,
|
||||||
"Gloggnitz": null,
|
"Gloggnitz": null,
|
||||||
"Glossen(b Oschatz)": null,
|
"Glossen(b Oschatz)": null,
|
||||||
|
@ -3323,6 +3332,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Harzgerode": null,
|
"Harzgerode": null,
|
||||||
"Hasbergen": null,
|
"Hasbergen": null,
|
||||||
"Haselbrunn": null,
|
"Haselbrunn": null,
|
||||||
|
"Haselstauden (Dornbirn)": null,
|
||||||
"Haslach": null,
|
"Haslach": null,
|
||||||
"Hasloch(Main)": null,
|
"Hasloch(Main)": null,
|
||||||
"Hasloh": null,
|
"Hasloh": null,
|
||||||
|
@ -3333,6 +3343,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Hasselfelde": null,
|
"Hasselfelde": null,
|
||||||
"Hasselt": null,
|
"Hasselt": null,
|
||||||
"Haste": null,
|
"Haste": null,
|
||||||
|
"Hatlerdorf(Dornbirn)": null,
|
||||||
"Hattenheim": null,
|
"Hattenheim": null,
|
||||||
"Hattersheim(Main)": null,
|
"Hattersheim(Main)": null,
|
||||||
"Hattert": null,
|
"Hattert": null,
|
||||||
|
@ -3622,6 +3633,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Hockenheim": null,
|
"Hockenheim": null,
|
||||||
"Hockeroda": null,
|
"Hockeroda": null,
|
||||||
"Hodenhagen": null,
|
"Hodenhagen": null,
|
||||||
|
"Hodonin": null,
|
||||||
"Hoeilaart": null,
|
"Hoeilaart": null,
|
||||||
"Hoeje Taastrup st": null,
|
"Hoeje Taastrup st": null,
|
||||||
"Hoensbroek": null,
|
"Hoensbroek": null,
|
||||||
|
@ -3907,6 +3919,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Jena-Zwätzen": null,
|
"Jena-Zwätzen": null,
|
||||||
"Jenbach": null,
|
"Jenbach": null,
|
||||||
"Jenbach Zillertalbahn": null,
|
"Jenbach Zillertalbahn": null,
|
||||||
|
"Jennersdorf": null,
|
||||||
"Jerichow": null,
|
"Jerichow": null,
|
||||||
"Jerxheim": null,
|
"Jerxheim": null,
|
||||||
"Jesenice(Gr)": null,
|
"Jesenice(Gr)": null,
|
||||||
|
@ -3970,6 +3983,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Kaiserslautern Pfaffwerk": null,
|
"Kaiserslautern Pfaffwerk": null,
|
||||||
"Kaiserslautern West": null,
|
"Kaiserslautern West": null,
|
||||||
"Kaiserslautern-Hohenecken": null,
|
"Kaiserslautern-Hohenecken": null,
|
||||||
|
"Kaiserstuhl AG": null,
|
||||||
"Kalchreuth": null,
|
"Kalchreuth": null,
|
||||||
"Kaldenkirchen": null,
|
"Kaldenkirchen": null,
|
||||||
"Kalenborn(Westerw)": null,
|
"Kalenborn(Westerw)": null,
|
||||||
|
@ -3978,6 +3992,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Kalsdorf b.Graz": null,
|
"Kalsdorf b.Graz": null,
|
||||||
"Kalsow": null,
|
"Kalsow": null,
|
||||||
"Kaltenberg": null,
|
"Kaltenberg": null,
|
||||||
|
"Kaltenbrunnen im Montafon": null,
|
||||||
"Kalteneck": null,
|
"Kalteneck": null,
|
||||||
"Kaltenkirchen Süd": null,
|
"Kaltenkirchen Süd": null,
|
||||||
"Kaltenkirchen(Holst)": null,
|
"Kaltenkirchen(Holst)": null,
|
||||||
|
@ -4150,6 +4165,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Klarenbeek": null,
|
"Klarenbeek": null,
|
||||||
"Klasdorf Glashütte": null,
|
"Klasdorf Glashütte": null,
|
||||||
"Klatovy": null,
|
"Klatovy": null,
|
||||||
|
"Klaus in Vorarlberg": null,
|
||||||
"Klecken": null,
|
"Klecken": null,
|
||||||
"Kledering b.Wien": null,
|
"Kledering b.Wien": null,
|
||||||
"Kleeth": null,
|
"Kleeth": null,
|
||||||
|
@ -4180,6 +4196,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Klingenberg-Colmnitz": null,
|
"Klingenberg-Colmnitz": null,
|
||||||
"Klingenbrunn": null,
|
"Klingenbrunn": null,
|
||||||
"Klingenthal": null,
|
"Klingenthal": null,
|
||||||
|
"Klingnau": null,
|
||||||
"Klinikum Bremen-Nord/Beckedorf": null,
|
"Klinikum Bremen-Nord/Beckedorf": null,
|
||||||
"Klitschmar": null,
|
"Klitschmar": null,
|
||||||
"Klitten": null,
|
"Klitten": null,
|
||||||
|
@ -4205,6 +4222,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Knittlingen-Kleinvillars": null,
|
"Knittlingen-Kleinvillars": null,
|
||||||
"Knöringen-Essingen": null,
|
"Knöringen-Essingen": null,
|
||||||
"Kobern-Gondorf": null,
|
"Kobern-Gondorf": null,
|
||||||
|
"Koblenz Dorf": null,
|
||||||
"Koblenz Hbf": null,
|
"Koblenz Hbf": null,
|
||||||
"Koblenz Stadtmitte": null,
|
"Koblenz Stadtmitte": null,
|
||||||
"Koblenz(CH)": null,
|
"Koblenz(CH)": null,
|
||||||
|
@ -4808,6 +4826,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Lorraine": null,
|
"Lorraine": null,
|
||||||
"Lorsbach": null,
|
"Lorsbach": null,
|
||||||
"Lorsch": null,
|
"Lorsch": null,
|
||||||
|
"Lorüns": null,
|
||||||
"Lottschesee": null,
|
"Lottschesee": null,
|
||||||
"Lottstetten": null,
|
"Lottstetten": null,
|
||||||
"Lourches": null,
|
"Lourches": null,
|
||||||
|
@ -4849,6 +4868,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Luino": null,
|
"Luino": null,
|
||||||
"Luisenthal(Saar)": null,
|
"Luisenthal(Saar)": null,
|
||||||
"Lumes Halte": null,
|
"Lumes Halte": null,
|
||||||
|
"Lund Central": null,
|
||||||
"Lunde J st": null,
|
"Lunde J st": null,
|
||||||
"Lunden": null,
|
"Lunden": null,
|
||||||
"Lunderskov st": null,
|
"Lunderskov st": null,
|
||||||
|
@ -5145,6 +5165,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Melle": null,
|
"Melle": null,
|
||||||
"Mellenbach-Glasbach": null,
|
"Mellenbach-Glasbach": null,
|
||||||
"Mellendorf": null,
|
"Mellendorf": null,
|
||||||
|
"Mellikon": null,
|
||||||
"Mellingen(Thür)": null,
|
"Mellingen(Thür)": null,
|
||||||
"Mellrichstadt Bf": null,
|
"Mellrichstadt Bf": null,
|
||||||
"Mels": null,
|
"Mels": null,
|
||||||
|
@ -5163,6 +5184,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Mengeringhausen": null,
|
"Mengeringhausen": null,
|
||||||
"Mengersgereuth-Hämmern": null,
|
"Mengersgereuth-Hämmern": null,
|
||||||
"Mengersgereuth-Hämmern Ost": null,
|
"Mengersgereuth-Hämmern Ost": null,
|
||||||
|
"Menningen-Leitishofen": null,
|
||||||
"Menton": null,
|
"Menton": null,
|
||||||
"Menzingen(Baden)": null,
|
"Menzingen(Baden)": null,
|
||||||
"Menznau": null,
|
"Menznau": null,
|
||||||
|
@ -5204,6 +5226,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Meuselbach-Schwarzmühle": null,
|
"Meuselbach-Schwarzmühle": null,
|
||||||
"Meyenburg": null,
|
"Meyenburg": null,
|
||||||
"Meßdorf": null,
|
"Meßdorf": null,
|
||||||
|
"Meßkirch": null,
|
||||||
"Michelau(LUX)": null,
|
"Michelau(LUX)": null,
|
||||||
"Michelau(Oberfr)": null,
|
"Michelau(Oberfr)": null,
|
||||||
"Michelau(Württ)": null,
|
"Michelau(Württ)": null,
|
||||||
|
@ -5880,6 +5903,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Nürtingen-Roßdorf": null,
|
"Nürtingen-Roßdorf": null,
|
||||||
"Nürtingen-Vorstadt": null,
|
"Nürtingen-Vorstadt": null,
|
||||||
"Nützen": null,
|
"Nützen": null,
|
||||||
|
"Nüziders": null,
|
||||||
"Ober Ramstadt": null,
|
"Ober Ramstadt": null,
|
||||||
"Ober Widdersheim": null,
|
"Ober Widdersheim": null,
|
||||||
"Oberachern": null,
|
"Oberachern": null,
|
||||||
|
@ -6104,6 +6128,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Ostseebad Kühlungsborn Ost": null,
|
"Ostseebad Kühlungsborn Ost": null,
|
||||||
"Ostseebad Kühlungsborn West": null,
|
"Ostseebad Kühlungsborn West": null,
|
||||||
"Othmarsingen": null,
|
"Othmarsingen": null,
|
||||||
|
"Otrokovice": null,
|
||||||
"Ottenau": null,
|
"Ottenau": null,
|
||||||
"Ottendorf(Mittweida)": null,
|
"Ottendorf(Mittweida)": null,
|
||||||
"Ottendorf-Okrilla Hp": null,
|
"Ottendorf-Okrilla Hp": null,
|
||||||
|
@ -6618,6 +6643,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Rieseby": null,
|
"Rieseby": null,
|
||||||
"Rieste": null,
|
"Rieste": null,
|
||||||
"Riestedt": null,
|
"Riestedt": null,
|
||||||
|
"Rietheim(CH)": null,
|
||||||
"Rietheim(Württ)": null,
|
"Rietheim(Württ)": null,
|
||||||
"Rietschen": null,
|
"Rietschen": null,
|
||||||
"Rietz in Tirol": null,
|
"Rietz in Tirol": null,
|
||||||
|
@ -6822,6 +6848,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Rüdnitz": null,
|
"Rüdnitz": null,
|
||||||
"Rülzheim Bf": null,
|
"Rülzheim Bf": null,
|
||||||
"Rülzheim Freizeitzentrum": null,
|
"Rülzheim Freizeitzentrum": null,
|
||||||
|
"Rümikon AG": null,
|
||||||
"Rümlang": null,
|
"Rümlang": null,
|
||||||
"Rümmingen": null,
|
"Rümmingen": null,
|
||||||
"Ründeroth": null,
|
"Ründeroth": null,
|
||||||
|
@ -6919,6 +6946,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Satteldorf": null,
|
"Satteldorf": null,
|
||||||
"Satzvey": null,
|
"Satzvey": null,
|
||||||
"Sauerlach": null,
|
"Sauerlach": null,
|
||||||
|
"Sauldorf": null,
|
||||||
"Saulgrub": null,
|
"Saulgrub": null,
|
||||||
"Saulheim": null,
|
"Saulheim": null,
|
||||||
"Saumur Rive Droit": null,
|
"Saumur Rive Droit": null,
|
||||||
|
@ -6991,6 +7019,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Schliengen": null,
|
"Schliengen": null,
|
||||||
"Schlierbach(Schwalm-Eder-Kr.)": null,
|
"Schlierbach(Schwalm-Eder-Kr.)": null,
|
||||||
"Schliersee": null,
|
"Schliersee": null,
|
||||||
|
"Schlins-Beschling": null,
|
||||||
"Schloss Gottesaue, Karlsruhe": null,
|
"Schloss Gottesaue, Karlsruhe": null,
|
||||||
"Schloss Rüppurr, Karlsruhe": null,
|
"Schloss Rüppurr, Karlsruhe": null,
|
||||||
"Schloß Holte": null,
|
"Schloß Holte": null,
|
||||||
|
@ -7058,6 +7087,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Schwanheide": null,
|
"Schwanheide": null,
|
||||||
"Schwante": null,
|
"Schwante": null,
|
||||||
"Schwarmstedt": null,
|
"Schwarmstedt": null,
|
||||||
|
"Schwarzach i Vorarl.": null,
|
||||||
"Schwarzach-St.Veit": null,
|
"Schwarzach-St.Veit": null,
|
||||||
"Schwarzburg": null,
|
"Schwarzburg": null,
|
||||||
"Schwarzenbach(Saale)": null,
|
"Schwarzenbach(Saale)": null,
|
||||||
|
@ -7239,6 +7269,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Siersburg": null,
|
"Siersburg": null,
|
||||||
"Siershahn": null,
|
"Siershahn": null,
|
||||||
"Sieversdorf(Neust/D)": null,
|
"Sieversdorf(Neust/D)": null,
|
||||||
|
"Siggenthal-Würenlingen": null,
|
||||||
"Sighisoara": null,
|
"Sighisoara": null,
|
||||||
"Siglingen": null,
|
"Siglingen": null,
|
||||||
"Sigmaringen": null,
|
"Sigmaringen": null,
|
||||||
|
@ -7504,6 +7535,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Stockhausen(Lahn)": null,
|
"Stockhausen(Lahn)": null,
|
||||||
"Stockheim(Oberfr)": null,
|
"Stockheim(Oberfr)": null,
|
||||||
"Stockheim(Unterfr)": null,
|
"Stockheim(Unterfr)": null,
|
||||||
|
"Stockholm Central": null,
|
||||||
"Stockstadt(Main)": null,
|
"Stockstadt(Main)": null,
|
||||||
"Stockstadt(Rhein)": null,
|
"Stockstadt(Rhein)": null,
|
||||||
"Stolberg(Harz)": null,
|
"Stolberg(Harz)": null,
|
||||||
|
@ -7586,6 +7618,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Sukow(b Schwerin)": null,
|
"Sukow(b Schwerin)": null,
|
||||||
"Sulmingen": null,
|
"Sulmingen": null,
|
||||||
"Sulz(Neckar)": null,
|
"Sulz(Neckar)": null,
|
||||||
|
"Sulz-Röthis": null,
|
||||||
"Sulzbach(Inn)": null,
|
"Sulzbach(Inn)": null,
|
||||||
"Sulzbach(Main)": null,
|
"Sulzbach(Main)": null,
|
||||||
"Sulzbach(Murr)": null,
|
"Sulzbach(Murr)": null,
|
||||||
|
@ -8743,6 +8776,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
"Zutphen": null,
|
"Zutphen": null,
|
||||||
"Zuzenhausen": null,
|
"Zuzenhausen": null,
|
||||||
"Zweibrücken Hbf": null,
|
"Zweibrücken Hbf": null,
|
||||||
|
"Zweidlen": null,
|
||||||
"Zwenkau-Großdalzig": null,
|
"Zwenkau-Großdalzig": null,
|
||||||
"Zwickau Stadthalle": null,
|
"Zwickau Stadthalle": null,
|
||||||
"Zwickau Zentrum": null,
|
"Zwickau Zentrum": null,
|
||||||
|
|
12
public/static/js/autocomplete.min.js
vendored
12
public/static/js/autocomplete.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/static/js/travelynx-actions.min.js
vendored
2
public/static/js/travelynx-actions.min.js
vendored
|
@ -1 +1 @@
|
||||||
function upd_journey_data(){$(".countdown").each(function(){var t=$(this).data("journey");t&&(t=t.split(";"),j_departure=parseInt(t[0]),j_arrival=parseInt(t[1]),j_duration=j_arrival-j_departure);var e=$(this).data("dest");e&&(j_dest=e);var a=$(this).data("route");if(a){a=a.split("|"),j_stops=[];for(var n in a){for(var o=a[n].split(";"),r=1;r<5;r++)o[r]=parseInt(o[r]);j_stops.push(o)}}})}function upd_countdown(){var t=Date.now()/1e3;j_departure>t?$(".countdown").text("Abfahrt in "+Math.round((j_departure-t)/60)+" Minuten"):j_arrival>0&&(j_arrival>t?$(".countdown").text("Ankunft in "+Math.round((j_arrival-t)/60)+" Minuten"):$(".countdown").text("Ziel erreicht"))}function hhmm(t){var e=new Date(1e3*t),a=e.getHours(),n=e.getMinutes();return(a<10?"0"+a:a)+":"+(n<10?"0"+n:n)}function odelay(t,e){return t<e?" (+"+(e-t)/60+")":t==e?"":" ("+(e-t)/60+")"}function tvly_run(t,e,a){var n='<i class="material-icons">error</i>',o=$('<div class="progress"><div class="indeterminate"></div></div>');t.hide(),t.after(o),$.post("/action",e,function(e){e.success?$(location).attr("href",e.redirect_to):(M.toast({html:n+" "+e.error}),o.remove(),a&&a(),t.append(" "+n),t.show())})}function tvly_update(){$.get("/ajax/status_card.html",function(t){$(".statuscol").html(t),tvly_reg_handlers(),upd_journey_data(),setTimeout(tvly_update,4e4)}).fail(function(){$(".sync-failed-marker").css("display","block"),upd_countdown(),setTimeout(tvly_update,5e3)})}function tvly_update_public(){var t;$(".publicstatuscol").each(function(){t=$(this).data("user")}),$.get("/ajax/status/"+t+".html",function(t){$(".publicstatuscol").html(t),upd_journey_data(),setTimeout(tvly_update_public,4e4)}).fail(function(){$(".sync-failed-marker").css("display","block"),upd_countdown(),setTimeout(tvly_update_public,5e3)})}function tvly_journey_progress(){var t=Date.now()/1e3,e=0;if(j_duration>0){e=1-(j_arrival-t)/j_duration,e<0&&(e=0),e>1&&(e=1),$(".progress .determinate").css("width",100*e+"%");for(stop in j_stops){var a=j_stops[stop][0],n=j_stops[stop][1],o=j_stops[stop][2],r=j_stops[stop][3],i=j_stops[stop][4];if(a==j_dest){$(".next-stop").html("");break}if(0!=o&&o-t>0){$(".next-stop").html(a+"<br/>"+hhmm(o)+odelay(n,o));break}if(0!=i&&i-t>0){$(".next-stop").html(a+"<br/>"+hhmm(o)+" → "+hhmm(i)+odelay(r,i));break}}setTimeout(tvly_journey_progress,5e3)}}function tvly_reg_handlers(){$(".action-checkin").click(function(){var t=$(this);tvly_run(t,{action:"checkin",station:t.data("station"),train:t.data("train"),dest:t.data("dest")})}),$(".action-checkout").click(function(){var t=$(this),e={action:"checkout",station:t.data("station"),force:t.data("force")};tvly_run(t,e,function(){t.append(" – Ohne Echtzeitdaten auschecken?"),t.data("force",!0)})}),$(".action-undo").click(function(){var t=$(this),e=Date.now()/1e3,a=parseInt(t.data("checkints")),n={action:"undo",undo_id:t.data("id")},o=!0;e-a>900&&(o=confirm("Checkin wirklich rückgängig machen? Er kann ggf. nicht wiederholt werden.")),o&&tvly_run(t,n)}),$(".action-cancelled-from").click(function(){var t=$(this);tvly_run(t,{action:"cancelled_from",station:t.data("station"),train:t.data("train")})}),$(".action-cancelled-to").click(function(){var t=$(this);tvly_run(t,{action:"cancelled_to",station:t.data("station"),force:!0})}),$(".action-delete").click(function(){var t=$(this),e={action:"delete",id:t.data("id"),checkin:t.data("checkin"),checkout:t.data("checkout")};confirm("Diese Zugfahrt wirklich löschen? Der Eintrag wird sofort aus der Datenbank entfernt und kann nicht wiederhergestellt werden.")&&tvly_run(t,e)}),$(".action-share").click(function(){var t=$(this).data("text"),e=$(this).data("url");if(navigator.share)shareObj={text:t},e&&(shareObj.url=e),navigator.share(shareObj);else{var a=document.createElement("textarea");e&&(t+=" "+e),a.value=t,a.setAttribute("readonly",""),a.style.position="absolute",a.style.left="-9999px",document.body.appendChild(a),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(a),M.toast({html:"Text kopiert: „"+t+"“"})}})}var j_departure=0,j_duration=0,j_arrival=0,j_dest="",j_stops=[];$(document).ready(function(){tvly_reg_handlers(),$(".statuscol .autorefresh").length&&(upd_journey_data(),setTimeout(tvly_update,4e4),setTimeout(tvly_journey_progress,5e3)),$(".publicstatuscol .autorefresh").length&&(upd_journey_data(),setTimeout(tvly_update_public,4e4),setTimeout(tvly_journey_progress,5e3)),$("a[href]").click(function(){$("nav .preloader-wrapper").addClass("active")}),$("input#account").addEventListener("blur",function(t){})});
|
function upd_journey_data(){$(".countdown").each(function(){var t=$(this).data("journey");t&&(t=t.split(";"),j_departure=parseInt(t[0]),j_arrival=parseInt(t[1]),j_duration=j_arrival-j_departure);var e=$(this).data("dest");e&&(j_dest=e);var a=$(this).data("route");if(a){a=a.split("|"),j_stops=[];for(var n in a){for(var o=a[n].split(";"),r=1;r<5;r++)o[r]=parseInt(o[r]);j_stops.push(o)}}})}function upd_countdown(){var t=Date.now()/1e3;j_departure>t?$(".countdown").text("Abfahrt in "+Math.round((j_departure-t)/60)+" Minuten"):j_arrival>0&&(j_arrival>t?$(".countdown").text("Ankunft in "+Math.round((j_arrival-t)/60)+" Minuten"):$(".countdown").text("Ziel erreicht"))}function hhmm(t){var e=new Date(1e3*t),a=e.getHours(),n=e.getMinutes();return(a<10?"0"+a:a)+":"+(n<10?"0"+n:n)}function odelay(t,e){return t<e?" (+"+(e-t)/60+")":t==e?"":" ("+(e-t)/60+")"}function tvly_run(t,e,a){var n='<i class="material-icons">error</i>',o=$('<div class="progress"><div class="indeterminate"></div></div>');t.hide(),t.after(o),$.post("/action",e,function(e){e.success?$(location).attr("href",e.redirect_to):(M.toast({html:n+" "+e.error}),o.remove(),a&&a(),t.append(" "+n),t.show())})}function tvly_update(){$.get("/ajax/status_card.html",function(t){$(".statuscol").html(t),tvly_reg_handlers(),upd_journey_data(),setTimeout(tvly_update,4e4)}).fail(function(){$(".sync-failed-marker").css("display","block"),upd_countdown(),setTimeout(tvly_update,5e3)})}function tvly_update_public(){var t;$(".publicstatuscol").each(function(){t=$(this).data("user")}),$.get("/ajax/status/"+t+".html",function(t){$(".publicstatuscol").html(t),upd_journey_data(),setTimeout(tvly_update_public,4e4)}).fail(function(){$(".sync-failed-marker").css("display","block"),upd_countdown(),setTimeout(tvly_update_public,5e3)})}function tvly_journey_progress(){var t=Date.now()/1e3,e=0;if(j_duration>0){e=1-(j_arrival-t)/j_duration,e<0&&(e=0),e>1&&(e=1),$(".progress .determinate").css("width",100*e+"%");for(stop in j_stops){var a=j_stops[stop][0],n=j_stops[stop][1],o=j_stops[stop][2],r=j_stops[stop][3],i=j_stops[stop][4];if(a==j_dest){$(".next-stop").html("");break}if(0!=o&&o-t>0){$(".next-stop").html(a+"<br/>"+hhmm(o)+odelay(n,o));break}if(0!=i&&i-t>0){$(".next-stop").html(a+"<br/>"+hhmm(o)+" → "+hhmm(i)+odelay(r,i));break}}setTimeout(tvly_journey_progress,5e3)}}function tvly_reg_handlers(){$(".action-checkin").click(function(){var t=$(this);tvly_run(t,{action:"checkin",station:t.data("station"),train:t.data("train"),dest:t.data("dest")})}),$(".action-checkout").click(function(){var t=$(this),e={action:"checkout",station:t.data("station"),force:t.data("force")};tvly_run(t,e,function(){t.append(" – Ohne Echtzeitdaten auschecken?"),t.data("force",!0)})}),$(".action-undo").click(function(){var t=$(this),e=Date.now()/1e3,a=parseInt(t.data("checkints")),n={action:"undo",undo_id:t.data("id")},o=!0;e-a>900&&(o=confirm("Checkin wirklich rückgängig machen? Er kann ggf. nicht wiederholt werden.")),o&&tvly_run(t,n)}),$(".action-cancelled-from").click(function(){var t=$(this);tvly_run(t,{action:"cancelled_from",station:t.data("station"),train:t.data("train")})}),$(".action-cancelled-to").click(function(){var t=$(this);tvly_run(t,{action:"cancelled_to",station:t.data("station"),force:!0})}),$(".action-delete").click(function(){var t=$(this),e={action:"delete",id:t.data("id"),checkin:t.data("checkin"),checkout:t.data("checkout")};confirm("Diese Zugfahrt wirklich löschen? Der Eintrag wird sofort aus der Datenbank entfernt und kann nicht wiederhergestellt werden.")&&tvly_run(t,e)}),$(".action-share").click(function(){var t=$(this).data("text"),e=$(this).data("url");if(navigator.share)shareObj={text:t},e&&(shareObj.url=e),navigator.share(shareObj);else{var a=document.createElement("textarea");e&&(t+=" "+e),a.value=t,a.setAttribute("readonly",""),a.style.position="absolute",a.style.left="-9999px",document.body.appendChild(a),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(a),M.toast({html:"Text kopiert: „"+t+"“"})}})}var j_departure=0,j_duration=0,j_arrival=0,j_dest="",j_stops=[];$(document).ready(function(){tvly_reg_handlers(),$(".statuscol .autorefresh").length&&(upd_journey_data(),setTimeout(tvly_update,4e4),setTimeout(tvly_journey_progress,5e3)),$(".publicstatuscol .autorefresh").length&&(upd_journey_data(),setTimeout(tvly_update_public,4e4),setTimeout(tvly_journey_progress,5e3)),$("a[href]").click(function(){$("nav .preloader-wrapper").addClass("active")})});
|
||||||
|
|
Loading…
Reference in a new issue