From e5f55a66fafc89725d0276439f25f2c151644434 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 3 Dec 2023 12:39:00 +0100 Subject: rebuild assets --- public/static/js/collapse.js | 2 +- public/static/js/dbf.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'public/static/js') diff --git a/public/static/js/collapse.js b/public/static/js/collapse.js index 30e111e..9726df6 100644 --- a/public/static/js/collapse.js +++ b/public/static/js/collapse.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Birte Kristina Friesel + * Copyright (C) 2020-2023 Birte Kristina Friesel * * SPDX-License-Identifier: AGPL-3.0-or-later */ diff --git a/public/static/js/dbf.min.js b/public/static/js/dbf.min.js index c0048b5..648275d 100644 --- a/public/static/js/dbf.min.js +++ b/public/static/js/dbf.min.js @@ -1 +1 @@ -function reload_app(){0==$(".expanded-moreinfo").length?$.get(window.location.href,{ajax:1},function(e){$("div.app > ul").html(e),dbf_reg_handlers(),setTimeout(reload_app,6e4)}).fail(function(){setTimeout(reload_app,1e4)}):setTimeout(reload_app,3e4)}function dbf_show_moreinfo(d,n){const s=d.data("routeprev").split("|"),r=d.data("routenext").split("|"),l=d.data("moreinfo").split("|");$(".moreinfo").each(function(){var e=$(this);if(!n){$(".moreinfo .train-line").removeClass("sbahn fern ext ubahn bus tram").addClass(d.data("linetype")),$(".moreinfo .train-line").text(d.data("line")),$(".moreinfo .train-no").text(d.data("no")),$(".moreinfo .train-origin").text(d.data("from")),$(".moreinfo .train-dest").text(d.data("to")),$(".moreinfo .minfo").text(""),$(".moreinfo .mfooter").html(""),$(".moreinfo .verbose").html(""),$(".moreinfo .mroute").html(""),$(".moreinfo ul").html("");var a="";if(""!=d.data("arrival")?a+='
An: '+d.data("arrival")+"
":a+='
',""!=d.data("platform")?a+='
Gleis '+d.data("platform")+"
":a+='
',""!=d.data("departure")?a+='
Ab: '+d.data("departure")+"
":a+='
',$(".moreinfo .mfooter").append('
'+a+"
"),0==$(".moreinfo .loading").length&&$(".moreinfo .mfooter").append('
Lade Daten, bitte warten...
'),""!=d.data("moreinfo")){var t="";for(o in l)t+="
  • "+l[o]+"
  • ";$(".moreinfo .mfooter").append("Meldungen: ")}var i="";if(""!=d.data("routeprev"))for(var o in s)i+="
  • "+s[o]+"
  • ";if(i+="
  • "+document.title+"
  • ",""!=d.data("routenext"))for(var o in r)i+="
  • "+r[o]+"
  • ";$(".moreinfo .mfooter").append('Fahrtverlauf: ")}$.get(window.location.href,{train:d.data("train"),jid:d.data("jid"),ajax:1},function(e){$(".moreinfo").html(e)}).fail(function(){$(".moreinfo .mfooter").append("Der Zug ist abgefahren (Zug nicht gefunden)")}),e.removeClass("collapsed-moreinfo"),e.addClass("expanded-moreinfo")})}function dbf_reg_handlers(){$("div.app > ul > li").click(function(e){var a=$(this),t=$("div.app").data("station"),e=(e.preventDefault(),"?");window.location.href.includes("detailed=1")&&(e+="&detailed=1"),window.location.href.includes("hafas=1")&&(e+="&hafas=1&highlight="+a.data("station")),window.location.href.includes("past=1")&&(e+="&past=1"),(window.location.href.includes("rt=1")||window.location.href.includes("show_realtime=1"))&&(e+="&rt=1"),window.location.href.includes("hafas=1")?history.pushState({page:"traindetail",jid:a.data("jid")},"test","/z/"+a.data("jid")+e):history.pushState({page:"traindetail",station:t,train:a.data("no")},"test","/z/"+a.data("train")+"/"+a.data("station")+e),dbf_show_moreinfo(a,!1)});const a=$(location).attr("hash").substr(1);var t;a&&(t=!1,$("div.app > ul > li").each(function(e){t||$(this).find(".anchor").each(function(){$(this).attr("id")==a&&(t=!0)})}),t)&&(t=!1,$("div.app > ul > li").each(function(e){t||($(this).find(".anchor").each(function(){$(this).attr("id")==a&&(t=!0)}),t?$(this).addClass("selected"):$(this).addClass("past"))}))}$(function(){$(".moresettings-header").each(function(){$(this).click(function(){var e=$(".moresettings");$(this).hasClass("moresettings-header-collapsed")?($(this).removeClass("moresettings-header-collapsed"),$(this).addClass("moresettings-header-expanded"),e.removeClass("moresettings-collapsed"),e.addClass("moresettings-expanded")):($(this).removeClass("moresettings-header-expanded"),$(this).addClass("moresettings-header-collapsed"),e.removeClass("moresettings-expanded"),e.addClass("moresettings-collapsed"))})}),$(".developers-header").each(function(){$(this).click(function(){var e=$(".developers");$(this).hasClass("developers-header-collapsed")?($(this).removeClass("developers-header-collapsed"),$(this).addClass("developers-header-expanded"),e.removeClass("developers-collapsed"),e.addClass("developers-expanded")):($(this).removeClass("developers-header-expanded"),$(this).addClass("developers-header-collapsed"),e.removeClass("developers-expanded"),e.addClass("developers-collapsed"))})}),dbf_reg_handlers(),$(".content .app").length&&(setTimeout(reload_app,3e4),history.replaceState({page:"station"},document.title,"")),window.onpopstate=function(a){var t;null!=a.state?"station"==a.state.page?($(".moreinfo").each(function(){$(this).removeClass("expanded-moreinfo"),$(this).addClass("collapsed-moreinfo")}),$("div.app > ul").length||($("div.app").append(""),reload_app())):"traindetail"==a.state.page&&(t=!1,$("div.app > ul > li").each(function(){var e=$(this);e.data("no")==a.state.train&&(dbf_show_moreinfo(e,!0),t=!0)}),t||($(".moreinfo").each(function(){$(this).removeClass("collapsed-moreinfo"),$(this).addClass("expanded-moreinfo")}),$(".moreinfo .mfooter").append("Der Zug ist abgefahren (Zug nicht gefunden)"))):console.log("unhandled popstate! "+document.location)}}); +function setLang(e){document.cookie="lang="+e,location.reload()}function setTheme(e){localStorage.setItem("theme",e),otherTheme.hasOwnProperty(e)||(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),addStyleSheet(e,"theme")}function reload_app(){0==$(".expanded-moreinfo").length?$.get(window.location.href,{ajax:1},function(e){$("div.app > ul").html(e),dbf_reg_handlers(),setTimeout(reload_app,6e4)}).fail(function(){setTimeout(reload_app,1e4)}):setTimeout(reload_app,3e4)}function dbf_show_moreinfo(d,n){const s=d.data("routeprev").split("|"),r=d.data("routenext").split("|"),l=d.data("moreinfo").split("|");$(".moreinfo").each(function(){var e=$(this);if(!n){$(".moreinfo .train-line").removeClass("sbahn fern ext ubahn bus tram").addClass(d.data("linetype")),$(".moreinfo .train-line").text(d.data("line")),$(".moreinfo .train-no").text(d.data("no")),$(".moreinfo .train-origin").text(d.data("from")),$(".moreinfo .train-dest").text(d.data("to")),$(".moreinfo .minfo").text(""),$(".moreinfo .mfooter").html(""),$(".moreinfo .verbose").html(""),$(".moreinfo .mroute").html(""),$(".moreinfo ul").html("");var a="";if(""!=d.data("arrival")?a+='
    An: '+d.data("arrival")+"
    ":a+='
    ',""!=d.data("platform")?a+='
    Gleis '+d.data("platform")+"
    ":a+='
    ',""!=d.data("departure")?a+='
    Ab: '+d.data("departure")+"
    ":a+='
    ',$(".moreinfo .mfooter").append('
    '+a+"
    "),0==$(".moreinfo .loading").length&&$(".moreinfo .mfooter").append('
    Lade Daten, bitte warten...
    '),""!=d.data("moreinfo")){var t="";for(i in l)t+="
  • "+l[i]+"
  • ";$(".moreinfo .mfooter").append("Meldungen: ")}var o="";if(""!=d.data("routeprev"))for(var i in s)o+="
  • "+s[i]+"
  • ";if(o+="
  • "+document.title+"
  • ",""!=d.data("routenext"))for(var i in r)o+="
  • "+r[i]+"
  • ";$(".moreinfo .mfooter").append('Fahrtverlauf: ")}$.get(window.location.href,{train:d.data("train"),jid:d.data("jid"),ajax:1},function(e){$(".moreinfo").html(e)}).fail(function(){$(".moreinfo .mfooter").append("Der Zug ist abgefahren (Zug nicht gefunden)")}),e.removeClass("collapsed-moreinfo"),e.addClass("expanded-moreinfo")})}function dbf_reg_handlers(){$("div.app > ul > li").click(function(e){var a=$(this),t=$("div.app").data("station"),e=(e.preventDefault(),"?");window.location.href.includes("detailed=1")&&(e+="&detailed=1"),window.location.href.includes("hafas=1")&&(e+="&hafas=1&highlight="+a.data("station")),window.location.href.includes("past=1")&&(e+="&past=1"),(window.location.href.includes("rt=1")||window.location.href.includes("show_realtime=1"))&&(e+="&rt=1"),window.location.href.includes("hafas=1")?history.pushState({page:"traindetail",jid:a.data("jid")},"test","/z/"+a.data("jid")+e):history.pushState({page:"traindetail",station:t,train:a.data("no")},"test","/z/"+a.data("train")+"/"+a.data("station")+e),dbf_show_moreinfo(a,!1)});const a=$(location).attr("hash").substr(1);var t;a&&(t=!1,$("div.app > ul > li").each(function(e){t||$(this).find(".anchor").each(function(){$(this).attr("id")==a&&(t=!0)})}),t)&&(t=!1,$("div.app > ul > li").each(function(e){t||($(this).find(".anchor").each(function(){$(this).attr("id")==a&&(t=!0)}),t?$(this).addClass("selected"):$(this).addClass("past"))}))}$(function(){$(".moresettings-header").each(function(){$(this).click(function(){var e=$(".moresettings");$(this).hasClass("moresettings-header-collapsed")?($(this).removeClass("moresettings-header-collapsed"),$(this).addClass("moresettings-header-expanded"),e.removeClass("moresettings-collapsed"),e.addClass("moresettings-expanded")):($(this).removeClass("moresettings-header-expanded"),$(this).addClass("moresettings-header-collapsed"),e.removeClass("moresettings-expanded"),e.addClass("moresettings-collapsed"))})}),$(".developers-header").each(function(){$(this).click(function(){var e=$(".developers");$(this).hasClass("developers-header-collapsed")?($(this).removeClass("developers-header-collapsed"),$(this).addClass("developers-header-expanded"),e.removeClass("developers-collapsed"),e.addClass("developers-expanded")):($(this).removeClass("developers-header-expanded"),$(this).addClass("developers-header-collapsed"),e.removeClass("developers-expanded"),e.addClass("developers-collapsed"))})}),dbf_reg_handlers(),$(".content .app").length&&(setTimeout(reload_app,3e4),history.replaceState({page:"station"},document.title,"")),window.onpopstate=function(a){var t;null!=a.state?"station"==a.state.page?($(".moreinfo").each(function(){$(this).removeClass("expanded-moreinfo"),$(this).addClass("collapsed-moreinfo")}),$("div.app > ul").length||($("div.app").append(""),reload_app())):"traindetail"==a.state.page&&(t=!1,$("div.app > ul > li").each(function(){var e=$(this);e.data("no")==a.state.train&&(dbf_show_moreinfo(e,!0),t=!0)}),t||($(".moreinfo").each(function(){$(this).removeClass("collapsed-moreinfo"),$(this).addClass("expanded-moreinfo")}),$(".moreinfo .mfooter").append("Der Zug ist abgefahren (Zug nicht gefunden)"))):console.log("unhandled popstate! "+document.location)}}); -- cgit v1.2.3