diff options
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, '/'); }); }); |