diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-07-24 20:50:12 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-07-24 20:50:12 +0200 |
commit | 2759d7258c37c7498905cfe19f6b4c4f6d16bd21 (patch) | |
tree | ed91dcab1818f66aefa664da0224d32bb61f7508 /public | |
parent | 7811520a30657e2bc98873f296ae1f8fcff51dc0 (diff) |
support non-DB HAFAS backends (WiP)
Diffstat (limited to 'public')
-rw-r--r-- | public/static/js/geolocation.js | 3 | ||||
-rw-r--r-- | public/static/js/travelynx-actions.js | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js index 26ca349..985c15c 100644 --- a/public/static/js/geolocation.js +++ b/public/static/js/geolocation.js @@ -62,7 +62,8 @@ $(document).ready(function() { }; const processLocation = function(loc) { - $.post('/geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude}, processResult); + const backend = $('div.geolocation > button').data('backend'); + $.post('/geolocation', {lon: loc.coords.longitude, lat: loc.coords.latitude, backend: backend}, processResult); }; const processError = function(error) { diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index 48e878f..5f58f29 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -191,6 +191,7 @@ function tvly_reg_handlers() { var link = $(this); var req = { action: 'checkin', + hafas: link.data('hafas'), station: link.data('station'), train: link.data('train'), dest: link.data('dest'), @@ -202,6 +203,7 @@ function tvly_reg_handlers() { var link = $(this); var req = { action: 'checkout', + hafas: link.data('hafas'), station: link.data('station'), force: link.data('force'), }; @@ -232,6 +234,7 @@ function tvly_reg_handlers() { var link = $(this); var req = { action: 'cancelled_from', + hafas: link.data('hafas'), station: link.data('station'), ts: link.data('ts'), train: link.data('train'), @@ -242,6 +245,7 @@ function tvly_reg_handlers() { var link = $(this); var req = { action: 'cancelled_to', + hafas: link.data('hafas'), station: link.data('station'), force: true, }; |