aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-24 15:36:36 +0100
committersD <stoned@derpymail.org>2019-12-24 15:36:36 +0100
commit7e36f3024ab3ffba130cb93c396408e4ff708c0d (patch)
treec6d5b1fd3c43db9422901fb02cb934ae1b3a78bf /webAO/client.js
parent062411adf06e3cf1383db541f4009e18347fccd2 (diff)
replace modcall dialog with a prompt
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js40
1 files changed, 7 insertions, 33 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 3d9d926..6e481f5 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -2211,7 +2211,12 @@ window.randomCharacterOOC = randomCharacterOOC;
* Call mod.
*/
export function callMod() {
- $("#callmod_dialog").dialog("open");
+ let modcall = prompt("Please enter the reason for the modcall","");
+ if (modcall == null || modcall === "") {
+ // cancel
+ } else {
+ client.sendZZ(modcall);
+ }
}
window.callMod = callMod;
@@ -2449,35 +2454,4 @@ function decodeChat(estring) {
//
let client = new Client(serverIP);
-let viewport = new Viewport();
-
-// Create dialog and link to button
-$(function () {
- $("#callmod_dialog").dialog({
- autoOpen: false,
- resizable: false,
- show: {
- effect: "drop",
- direction: "down",
- duration: 500
- },
- hide: {
- effect: "drop",
- direction: "down",
- duration: 500
- },
- height: "auto",
- width: 400,
- modal: true,
- buttons: {
- Sure: function () {
- const reason = prompt("Please enter the reason", "");
- client.sendZZ(reason);
- $(this).dialog("close");
- },
- Cancel: function () {
- $(this).dialog("close");
- }
- }
- });
-});
+let viewport = new Viewport(); \ No newline at end of file