Do things when the player presses the place action button (#1)
This commit is contained in:
parent
7864cf2ccb
commit
4426b2999d
@ -165,5 +165,23 @@ function updatePlaceStats(id, successCallback, errorCallback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$("#magic-action-button").click(function () {
|
$("#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: '<i class="fas fa-check"></i> ' + resp.msg,
|
||||||
|
position: "bottom",
|
||||||
|
destroyOnClose: true,
|
||||||
|
closeTimeout: 1000 * 2
|
||||||
|
});
|
||||||
|
}, function (error) {
|
||||||
|
app.toast.show({
|
||||||
|
text: '<i class="fas fa-question"></i> ' + error,
|
||||||
|
position: "bottom",
|
||||||
|
destroyOnClose: true,
|
||||||
|
closeTimeout: 1000 * 2
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user