summaryrefslogtreecommitdiff
path: root/public/static/js/travelynx-actions.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-19 18:20:05 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-19 18:20:05 +0100
commit01df965d66fa7223e98036908ed4f60dda5942f8 (patch)
tree9a7efc5a2d1025305c8a3ccd54333ff8e39e87fb /public/static/js/travelynx-actions.js
parente24f89530376641f56d3b037c2a7dcd485b1ccd8 (diff)
support logging of cancelled journeys
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r--public/static/js/travelynx-actions.js20
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, '/');
});
});