summaryrefslogtreecommitdiff
path: root/public/static/js/geolocation.js
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-05-07 09:55:38 +0200
committerDerf Null <derf@finalrewind.org>2023-05-07 09:55:38 +0200
commite154a8aeb4fe69dcfa26ab091c874ca5c1d90809 (patch)
treeddf0f818c13bb75de04705d5471d0afb76fc27e8 /public/static/js/geolocation.js
parenteb5f4b06cdb7d2ac229758ade16f69acf70194dc (diff)
show loading icon when clicking on a stop in stop list
Diffstat (limited to 'public/static/js/geolocation.js')
-rw-r--r--public/static/js/geolocation.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index 5ef0a5c..6789730 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -24,7 +24,11 @@ $(document).ready(function() {
const res = $(document.createElement('p'));
$.each(stops, function(i, stop) {
const parts = stop.split(';');
- res.append($('<a class="tablerow" href="/s/' + parts[0] + '"><span>' + parts[1] + '</span></a>'));
+ const node = $('<a class="tablerow" href="/s/' + parts[0] + '"><span>' + parts[1] + '</span></a>');
+ node.click(function() {
+ $('nav .preloader-wrapper').addClass('active');
+ });
+ res.append(node);
});
$('p.geolocationhint').text('Letzte Ziele:');
getPlaceholder().replaceWith(res);
@@ -46,7 +50,11 @@ $(document).ready(function() {
name = candidate.name,
distance = candidate.distance.toFixed(1);
- res.append($('<a class="tablerow" href="/s/' + ds100 + '"><span>' + name + '</span></a>'));
+ const node = $('<a class="tablerow" href="/s/' + ds100 + '"><span>' + name + '</span></a>');
+ node.click(function() {
+ $('nav .preloader-wrapper').addClass('active');
+ });
+ res.append(node);
});
getPlaceholder().replaceWith(res);
}