From 4426b2999d7a8f7149ddd78b35c0b666860a780c Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 27 May 2019 23:37:53 -0600 Subject: [PATCH] Do things when the player presses the place action button (#1) --- www/js/home.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/www/js/home.js b/www/js/home.js index ec2c12a..6860bc7 100644 --- a/www/js/home.js +++ b/www/js/home.js @@ -165,5 +165,23 @@ function updatePlaceStats(id, successCallback, errorCallback) { } $("#magic-action-button").click(function () { - + callAPI("placeact", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password"), + id: $("#place-popup").data("placeid") + }, function (resp) { + app.toast.show({ + text: ' ' + resp.msg, + position: "bottom", + destroyOnClose: true, + closeTimeout: 1000 * 2 + }); + }, function (error) { + app.toast.show({ + text: ' ' + error, + position: "bottom", + destroyOnClose: true, + closeTimeout: 1000 * 2 + }); + }); }); \ No newline at end of file