From 6a671d45390c883d994defdaa544405223b8dc29 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 29 Aug 2023 20:54:11 +0200 Subject: geostop: always show hafas and iris stops --- public/static/js/geostop.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'public/static/js') diff --git a/public/static/js/geostop.js b/public/static/js/geostop.js index f91057a..80e8311 100644 --- a/public/static/js/geostop.js +++ b/public/static/js/geostop.js @@ -43,20 +43,25 @@ $(function() { const stationlink = $(document.createElement('a')); stationlink.attr('href', eva + '?hafas=' + hafas); - stationlink.text(name); + stationlink.text(name + ' '); const distancenode = $(document.createElement('div')); distancenode.attr('class', 'distance'); distancenode.text(distance); + const icon = $(document.createElement('i')); + icon.attr('class', 'material-icons'); + icon.text(hafas ? 'directions' : 'train'); + + stationlink.append(icon); stationlink.append(distancenode); $('div.candidatelist').append(stationlink); }); } }; - var processLocation = function(loc) { - $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude, hafas: window.location.href.match('hafas=1') ? 1 : 0}, processResult).fail(function(jqXHR, textStatus, errorThrown) { + const processLocation = function(loc) { + $.post('/_geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult).fail(function(jqXHR, textStatus, errorThrown) { removeStatus(); showError("Netzwerkfehler: ", textStatus, errorThrown); }); -- cgit v1.2.3