summaryrefslogtreecommitdiff
path: root/public/static/js
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-06-21 21:12:35 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-06-21 21:12:35 +0200
commit11139fb5f5bbbc0e5dcfec985f9ef2671dacb693 (patch)
tree67fd1c6923d40be993ee90775e09b341eda15aaa /public/static/js
parentbd24f1f2f43874fefed449faba83463695788db9 (diff)
geolocation: fix IRIS/HAFAS icons
Diffstat (limited to 'public/static/js')
-rw-r--r--public/static/js/geolocation.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index 03857a1..1c30145 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -24,7 +24,7 @@ $(document).ready(function() {
const res = $(document.createElement('p'));
$.each(stops, function(i, stop) {
const parts = stop.split(';');
- const node = $('<a class="tablerow" href="/s/' + parts[0] + '?hafas=' + parts[2] + '"><span><i class="material-icons" aria-hidden="true">' + (parseInt(parts[2]) ? 'directions' : 'train') + '</i>' + parts[1] + '</span></a>');
+ const node = $('<a class="tablerow" href="/s/' + parts[0] + '?hafas=' + parts[2] + '"><span><i class="material-icons" aria-hidden="true">' + (parts[2] == '0' ? 'train' : 'directions') + '</i>' + parts[1] + '</span></a>');
node.click(function() {
$('nav .preloader-wrapper').addClass('active');
});
@@ -51,7 +51,7 @@ $(document).ready(function() {
hafas = candidate.hafas,
distance = candidate.distance.toFixed(1);
- const node = $('<a class="tablerow" href="/s/' + eva + '?hafas=' + hafas + '"><span><i class="material-icons" aria-hidden="true">' + (parseInt(hafas) ? 'directions' : 'train') + '</i>' + name + '</span></a>');
+ const node = $('<a class="tablerow" href="/s/' + eva + '?hafas=' + hafas + '"><span><i class="material-icons" aria-hidden="true">' + (parts[2] == 0 ? 'train' : 'directions') + '</i>' + name + '</span></a>');
node.click(function() {
$('nav .preloader-wrapper').addClass('active');
});