geolocation: fix IRIS/HAFAS icons

This commit is contained in:
Birte Kristina Friesel 2024-06-21 21:12:35 +02:00
parent bd24f1f2f4
commit 11139fb5f5
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -24,7 +24,7 @@ $(document).ready(function() {
const res = $(document.createElement('p')); const res = $(document.createElement('p'));
$.each(stops, function(i, stop) { $.each(stops, function(i, stop) {
const parts = stop.split(';'); 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() { node.click(function() {
$('nav .preloader-wrapper').addClass('active'); $('nav .preloader-wrapper').addClass('active');
}); });
@ -51,7 +51,7 @@ $(document).ready(function() {
hafas = candidate.hafas, hafas = candidate.hafas,
distance = candidate.distance.toFixed(1); 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() { node.click(function() {
$('nav .preloader-wrapper').addClass('active'); $('nav .preloader-wrapper').addClass('active');
}); });