Commit c2ff9cf0 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

use recommended method of calling jquery ready handlers

parent 4ec58309
Loading
Loading
Loading
Loading
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ function dbf_reg_handlers() {
	});
}

$(document).ready(function() {
$(function() {
	if (document.location.hash.length > 1) {
		var wanted = document.location.hash.replace('#', '');
		$('div.app > ul > li > .moreinfo, div.infoscreen > ul > li > .moreinfo').each(function() {
+2 −2

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
$(document).ready(function() {
$(function() {
	var removeStatus = function() {
		$('div.candidatestatus').remove();
	};
+1 −1
Original line number Diff line number Diff line
$(document).ready(function(){var e=function(){$("div.candidatestatus").remove()},t=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);var o=$(document.createElement("strong"));if(o.text(e),r.prepend(o),n){var a=$(document.createElement("div"));a.attr("class","errcode"),a.text(n),r.append(a)}$("div.candidatelist").append(r)},n=function(n){e(),n.error?t("Backend-Fehler:",n.error,null):0==n.candidates.length?t("Keine Bahnhöfe in 70km Umkreis gefunden","",null):$.each(n.candidates,function(e,t){var n=t.ds100,r=t.name,o=t.distance;o=o.toFixed(1);var a=$(document.createElement("a"));a.attr("href",n),a.text(r);var i=$(document.createElement("div"));i.attr("class","distance"),i.text(o),a.append(i),$("div.candidatelist").append(a)})},r=function(e){$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude},n),$("div.candidatestatus").text("Suche Bahnhöfe…")},o=function(n){e(),n.code==n.PERMISSION_DENIED?t("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):n.code==n.POSITION_UNAVAILABLE?t("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):n.code==n.TIMEOUT?t("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):t("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")};navigator.geolocation?(navigator.geolocation.getCurrentPosition(r,o),$("div.candidatestatus").text("Position wird bestimmt…")):(e(),t("Standortanfragen werden von diesem Browser nicht unterstützt","",null))});
$(function(){var e=function(){$("div.candidatestatus").remove()},t=function(e,t,n){var r=$(document.createElement("div"));r.attr("class","error"),r.text(t);var o=$(document.createElement("strong"));if(o.text(e),r.prepend(o),n){var a=$(document.createElement("div"));a.attr("class","errcode"),a.text(n),r.append(a)}$("div.candidatelist").append(r)},n=function(n){e(),n.error?t("Backend-Fehler:",n.error,null):0==n.candidates.length?t("Keine Bahnhöfe in 70km Umkreis gefunden","",null):$.each(n.candidates,function(e,t){var n=t.ds100,r=t.name,o=t.distance;o=o.toFixed(1);var a=$(document.createElement("a"));a.attr("href",n),a.text(r);var i=$(document.createElement("div"));i.attr("class","distance"),i.text(o),a.append(i),$("div.candidatelist").append(a)})},r=function(e){$.post("/_geolocation",{lon:e.coords.longitude,lat:e.coords.latitude},n),$("div.candidatestatus").text("Suche Bahnhöfe…")},o=function(n){e(),n.code==n.PERMISSION_DENIED?t("Standortanfrage nicht möglich.","Vermutlich fehlen die Rechte im Browser oder der Android Location Service ist deaktiviert.","geolocation.error.PERMISSION_DENIED"):n.code==n.POSITION_UNAVAILABLE?t("Standort konnte nicht ermittelt werden","(Service nicht verfügbar)","geolocation.error.POSITION_UNAVAILABLE"):n.code==n.TIMEOUT?t("Standort konnte nicht ermittelt werden","(Timeout)","geolocation.error.TIMEOUT"):t("Standort konnte nicht ermittelt werden","(unbekannter Fehler)","unknown geolocation.error code")};navigator.geolocation?(navigator.geolocation.getCurrentPosition(r,o),$("div.candidatestatus").text("Position wird bestimmt…")):(e(),t("Standortanfragen werden von diesem Browser nicht unterstützt","",null))});
Loading