summaryrefslogtreecommitdiff
path: root/public/static/js/travelynx-actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/static/js/travelynx-actions.js')
-rw-r--r--public/static/js/travelynx-actions.js13
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');
+ }
+ });
});