Update autocompletion for T-S-DE-IRIS 1.59

This commit is contained in:
Daniel Friesel 2021-08-14 17:03:19 +02:00
parent f9b25a56b3
commit 64e20b50cf
3 changed files with 41 additions and 7 deletions

View file

@ -133,6 +133,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Alt Hüttendorf": null,
"Alt Rosenthal": null,
"Alt Schwerin": null,
"Altach": null,
"Altbach": null,
"Altdorf West": null,
"Altdorf(CH)": null,
@ -186,6 +187,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Alttann": null,
"Altötting": null,
"Alveslohe": null,
"Alvesta station": null,
"Alzenau Burg": null,
"Alzenau Nord": null,
"Alzenau(Unterfr)": null,
@ -1035,6 +1037,8 @@ document.addEventListener('DOMContentLoaded', function() {
"Blindheim": null,
"Bloemendaal": null,
"Bludenz": null,
"Bludenz Brunnenfeld": null,
"Bludenz-Moos": null,
"Blumberg(b Berlin)": null,
"Blumberg-Rehhahn": null,
"Blumberg-Riedöschingen": null,
@ -1967,6 +1971,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Dörpen": null,
"Dörrberg": null,
"Dörverden": null,
"Döttingen": null,
"Dülken": null,
"Dülmen": null,
"Düren": null,
@ -2383,13 +2388,16 @@ document.addEventListener('DOMContentLoaded', function() {
"Fegersheim Lipsheim": null,
"Fehmarn-Burg": null,
"Fehraltorf": null,
"Fehring": null,
"Feilitzsch": null,
"Feldafing": null,
"Feldbach/Raab": null,
"Feldberg(Meckl)": null,
"Feldberg-Bärental": null,
"Felde": null,
"Feldhausen": null,
"Feldkirch": null,
"Feldkirch Amberg": null,
"Feldkirchen in Kärnten": null,
"Feldkirchen(b München)": null,
"Feldolling": null,
@ -2845,6 +2853,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Glauburg-Stockheim": null,
"Glauchau(Sachs)": null,
"Glauchau-Schönbörnchen": null,
"Gleisdorf": null,
"Glesch": null,
"Gloggnitz": null,
"Glossen(b Oschatz)": null,
@ -3323,6 +3332,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Harzgerode": null,
"Hasbergen": null,
"Haselbrunn": null,
"Haselstauden (Dornbirn)": null,
"Haslach": null,
"Hasloch(Main)": null,
"Hasloh": null,
@ -3333,6 +3343,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Hasselfelde": null,
"Hasselt": null,
"Haste": null,
"Hatlerdorf(Dornbirn)": null,
"Hattenheim": null,
"Hattersheim(Main)": null,
"Hattert": null,
@ -3622,6 +3633,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Hockenheim": null,
"Hockeroda": null,
"Hodenhagen": null,
"Hodonin": null,
"Hoeilaart": null,
"Hoeje Taastrup st": null,
"Hoensbroek": null,
@ -3907,6 +3919,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Jena-Zwätzen": null,
"Jenbach": null,
"Jenbach Zillertalbahn": null,
"Jennersdorf": null,
"Jerichow": null,
"Jerxheim": null,
"Jesenice(Gr)": null,
@ -3970,6 +3983,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Kaiserslautern Pfaffwerk": null,
"Kaiserslautern West": null,
"Kaiserslautern-Hohenecken": null,
"Kaiserstuhl AG": null,
"Kalchreuth": null,
"Kaldenkirchen": null,
"Kalenborn(Westerw)": null,
@ -3978,6 +3992,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Kalsdorf b.Graz": null,
"Kalsow": null,
"Kaltenberg": null,
"Kaltenbrunnen im Montafon": null,
"Kalteneck": null,
"Kaltenkirchen Süd": null,
"Kaltenkirchen(Holst)": null,
@ -4150,6 +4165,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Klarenbeek": null,
"Klasdorf Glashütte": null,
"Klatovy": null,
"Klaus in Vorarlberg": null,
"Klecken": null,
"Kledering b.Wien": null,
"Kleeth": null,
@ -4180,6 +4196,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Klingenberg-Colmnitz": null,
"Klingenbrunn": null,
"Klingenthal": null,
"Klingnau": null,
"Klinikum Bremen-Nord/Beckedorf": null,
"Klitschmar": null,
"Klitten": null,
@ -4205,6 +4222,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Knittlingen-Kleinvillars": null,
"Knöringen-Essingen": null,
"Kobern-Gondorf": null,
"Koblenz Dorf": null,
"Koblenz Hbf": null,
"Koblenz Stadtmitte": null,
"Koblenz(CH)": null,
@ -4808,6 +4826,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Lorraine": null,
"Lorsbach": null,
"Lorsch": null,
"Lorüns": null,
"Lottschesee": null,
"Lottstetten": null,
"Lourches": null,
@ -4849,6 +4868,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Luino": null,
"Luisenthal(Saar)": null,
"Lumes Halte": null,
"Lund Central": null,
"Lunde J st": null,
"Lunden": null,
"Lunderskov st": null,
@ -5145,6 +5165,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Melle": null,
"Mellenbach-Glasbach": null,
"Mellendorf": null,
"Mellikon": null,
"Mellingen(Thür)": null,
"Mellrichstadt Bf": null,
"Mels": null,
@ -5163,6 +5184,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Mengeringhausen": null,
"Mengersgereuth-Hämmern": null,
"Mengersgereuth-Hämmern Ost": null,
"Menningen-Leitishofen": null,
"Menton": null,
"Menzingen(Baden)": null,
"Menznau": null,
@ -5204,6 +5226,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Meuselbach-Schwarzmühle": null,
"Meyenburg": null,
"Meßdorf": null,
"Meßkirch": null,
"Michelau(LUX)": null,
"Michelau(Oberfr)": null,
"Michelau(Württ)": null,
@ -5880,6 +5903,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Nürtingen-Roßdorf": null,
"Nürtingen-Vorstadt": null,
"Nützen": null,
"Nüziders": null,
"Ober Ramstadt": null,
"Ober Widdersheim": null,
"Oberachern": null,
@ -6104,6 +6128,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Ostseebad Kühlungsborn Ost": null,
"Ostseebad Kühlungsborn West": null,
"Othmarsingen": null,
"Otrokovice": null,
"Ottenau": null,
"Ottendorf(Mittweida)": null,
"Ottendorf-Okrilla Hp": null,
@ -6618,6 +6643,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Rieseby": null,
"Rieste": null,
"Riestedt": null,
"Rietheim(CH)": null,
"Rietheim(Württ)": null,
"Rietschen": null,
"Rietz in Tirol": null,
@ -6822,6 +6848,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Rüdnitz": null,
"Rülzheim Bf": null,
"Rülzheim Freizeitzentrum": null,
"Rümikon AG": null,
"Rümlang": null,
"Rümmingen": null,
"Ründeroth": null,
@ -6919,6 +6946,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Satteldorf": null,
"Satzvey": null,
"Sauerlach": null,
"Sauldorf": null,
"Saulgrub": null,
"Saulheim": null,
"Saumur Rive Droit": null,
@ -6991,6 +7019,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Schliengen": null,
"Schlierbach(Schwalm-Eder-Kr.)": null,
"Schliersee": null,
"Schlins-Beschling": null,
"Schloss Gottesaue, Karlsruhe": null,
"Schloss Rüppurr, Karlsruhe": null,
"Schloß Holte": null,
@ -7058,6 +7087,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Schwanheide": null,
"Schwante": null,
"Schwarmstedt": null,
"Schwarzach i Vorarl.": null,
"Schwarzach-St.Veit": null,
"Schwarzburg": null,
"Schwarzenbach(Saale)": null,
@ -7239,6 +7269,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Siersburg": null,
"Siershahn": null,
"Sieversdorf(Neust/D)": null,
"Siggenthal-Würenlingen": null,
"Sighisoara": null,
"Siglingen": null,
"Sigmaringen": null,
@ -7504,6 +7535,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Stockhausen(Lahn)": null,
"Stockheim(Oberfr)": null,
"Stockheim(Unterfr)": null,
"Stockholm Central": null,
"Stockstadt(Main)": null,
"Stockstadt(Rhein)": null,
"Stolberg(Harz)": null,
@ -7586,6 +7618,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Sukow(b Schwerin)": null,
"Sulmingen": null,
"Sulz(Neckar)": null,
"Sulz-Röthis": null,
"Sulzbach(Inn)": null,
"Sulzbach(Main)": null,
"Sulzbach(Murr)": null,
@ -8743,6 +8776,7 @@ document.addEventListener('DOMContentLoaded', function() {
"Zutphen": null,
"Zuzenhausen": null,
"Zweibrücken Hbf": null,
"Zweidlen": null,
"Zwenkau-Großdalzig": null,
"Zwickau Stadthalle": null,
"Zwickau Zentrum": null,

File diff suppressed because one or more lines are too long

View file

@ -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")})});