diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-19 18:20:05 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-19 18:20:05 +0100 |
commit | 01df965d66fa7223e98036908ed4f60dda5942f8 (patch) | |
tree | 9a7efc5a2d1025305c8a3ccd54333ff8e39e87fb /public/static/js/travelynx-actions.js | |
parent | e24f89530376641f56d3b037c2a7dcd485b1ccd8 (diff) |
support logging of cancelled journeys
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r-- | public/static/js/travelynx-actions.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index 0a3d092..d47df77 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -44,6 +44,24 @@ $(document).ready(function() { var req = { action: 'undo', }; - tvly_run(link, req, window.location.href); + tvly_run(link, req, '/'); + }); + $('.action-cancelled-from').click(function() { + var link = $(this); + var req = { + action: 'cancelled_from', + station: link.data('station'), + train: link.data('train'), + }; + tvly_run(link, req, '/'); + }); + $('.action-cancelled-to').click(function() { + var link = $(this); + var req = { + action: 'cancelled_to', + station: link.data('station'), + force: true, + }; + tvly_run(link, req, '/'); }); }); |