summaryrefslogtreecommitdiff
path: root/public/static/js/travelynx-actions.min.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-21 16:27:32 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-21 16:27:32 +0200
commit95cbc500ae6841ff552a7b299c127c0754fb3a23 (patch)
tree33079214873c668bff2633f05cc969f7e8107bb0 /public/static/js/travelynx-actions.min.js
parentf791a1ee6c52b94f6a8894362c683a33c9437bb9 (diff)
Minify JS
Diffstat (limited to 'public/static/js/travelynx-actions.min.js')
-rw-r--r--public/static/js/travelynx-actions.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/public/static/js/travelynx-actions.min.js b/public/static/js/travelynx-actions.min.js
new file mode 100644
index 0000000..2ecfe38
--- /dev/null
+++ b/public/static/js/travelynx-actions.min.js
@@ -0,0 +1 @@
+function tvly_run(t,a,n,i){var c='<i class="material-icons">error</i>',o=$('<div class="progress"><div class="indeterminate"></div></div>');t.hide(),t.after(o),$.post("/action",a,function(a){a.success?$(location).attr("href",n):(M.toast({html:c+" "+a.error}),o.remove(),i&&i(),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),a={action:"checkout",station:t.data("station"),force:t.data("force")};tvly_run(t,a,"/"+a.station,function(){t.append(" – Keine Echtzeitdaten vorhanden"),t.data("force",!0)})})});