diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-04 18:26:53 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-04 18:26:53 +0200 |
commit | e2598df25ba089bbdef12777048ba68b7b119926 (patch) | |
tree | 6e0d8293729f527c26acce193e50b435fe18feca /public/static/js/travelynx-actions.js | |
parent | b0ad209a234ffb447ac56b89be6e43a3ecec4ae7 (diff) |
Allow journey deletion
See issue #3
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r-- | public/static/js/travelynx-actions.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index 8235889..3f1eb89 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -65,4 +65,17 @@ $(document).ready(function() { }; tvly_run(link, req, '/'); }); + $('.action-delete').click(function() { + var link = $(this); + var req = { + action: 'delete', + ids: link.data('id'), + checkin: link.data('checkin'), + checkout: link.data('checkout'), + }; + really_delete = confirm("Diese Zugfahrt wirklich löschen? Der Eintrag wird sofort aus der Datenbank entfernt und kann nicht wiederhergestellt werden."); + if (really_delete) { + tvly_run(link, req, '/history'); + } + }); }); |