From 7e36f3024ab3ffba130cb93c396408e4ff708c0d Mon Sep 17 00:00:00 2001 From: sD Date: Tue, 24 Dec 2019 15:36:36 +0100 Subject: replace modcall dialog with a prompt --- webAO/client.js | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) (limited to 'webAO/client.js') 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 -- cgit