From 130d598a9e0ddb2283a14d54a99d2327c458f975 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 14 Feb 2019 18:04:15 +0100 Subject: more helpful message for checkout without real-time data --- public/static/js/travelynx-actions.js | 2 +- public/static/js/travelynx-actions.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'public/static/js') diff --git a/public/static/js/travelynx-actions.js b/public/static/js/travelynx-actions.js index 86ad87d..d758a1a 100644 --- a/public/static/js/travelynx-actions.js +++ b/public/static/js/travelynx-actions.js @@ -35,7 +35,7 @@ $(document).ready(function() { force: link.data('force'), }; tvly_run(link, req, '/' + req.station, function() { - link.append(' – Keine Echtzeitdaten vorhanden') + link.append(' – Ohne Echtzeitdaten auschecken?') link.data('force', true); }); }); diff --git a/public/static/js/travelynx-actions.min.js b/public/static/js/travelynx-actions.min.js index 0393b42..156c458 100644 --- a/public/static/js/travelynx-actions.min.js +++ b/public/static/js/travelynx-actions.min.js @@ -1 +1 @@ -function tvly_run(t,n,i,a){var c='error',o=$('
');t.hide(),t.after(o),$.post("/action",n,function(n){n.success?$(location).attr("href",i):(M.toast({html:c+" "+n.error}),o.remove(),a&&a(),t.append(" "+c),t.show())})}$(document).ready(function(){$(".action-checkin").click(function(){var t=$(this);tvly_run(t,{action:"checkin",station:t.data("station"),train:t.data("train")},"/")}),$(".action-checkout").click(function(){var t=$(this),n={action:"checkout",station:t.data("station"),force:t.data("force")};tvly_run(t,n,"/"+n.station,function(){t.append(" – Keine Echtzeitdaten vorhanden"),t.data("force",!0)})}),$(".action-undo").click(function(){tvly_run($(this),{action:"undo"},window.location.href)})}); +function tvly_run(n,t,i,a){var c='error',o=$('
');n.hide(),n.after(o),$.post("/action",t,function(t){t.success?$(location).attr("href",i):(M.toast({html:c+" "+t.error}),o.remove(),a&&a(),n.append(" "+c),n.show())})}$(document).ready(function(){$(".action-checkin").click(function(){var t=$(this);tvly_run(t,{action:"checkin",station:t.data("station"),train:t.data("train")},"/")}),$(".action-checkout").click(function(){var t=$(this),n={action:"checkout",station:t.data("station"),force:t.data("force")};tvly_run(t,n,"/"+n.station,function(){t.append(" – Ohne Echtzeitdaten auschecken?"),t.data("force",!0)})}),$(".action-undo").click(function(){tvly_run($(this),{action:"undo"},window.location.href)})}); -- cgit v1.2.3