diff options
| author | sD <stoned@derpymail.org> | 2019-12-24 15:36:36 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2019-12-24 15:36:36 +0100 |
| commit | 7e36f3024ab3ffba130cb93c396408e4ff708c0d (patch) | |
| tree | c6d5b1fd3c43db9422901fb02cb934ae1b3a78bf | |
| parent | 062411adf06e3cf1383db541f4009e18347fccd2 (diff) | |
replace modcall dialog with a prompt
| -rw-r--r-- | webAO/client.html | 11 | ||||
| -rw-r--r-- | webAO/client.js | 40 |
2 files changed, 7 insertions, 44 deletions
diff --git a/webAO/client.html b/webAO/client.html index 9a54cb9..7982419 100644 --- a/webAO/client.html +++ b/webAO/client.html @@ -7,14 +7,10 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="client.css?v=1.0.0"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> - <script src="https://code.jquery.com/jquery-migrate-3.0.0.min.js"></script> - <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script> - <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link type="text/css" rel="stylesheet" href="golden/css/goldenlayout.css" /> <link type="text/css" rel="stylesheet" href="https://golden-layout.com/files/latest/css/goldenlayout-dark-theme.css" /> <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> - <script src="lib/jquery.ui.touch-punch.min.js"></script> <script src="lib/jdataview.min.js"></script> <script src="lib/gify.min.js"></script> <script src="ui.b.js"></script> @@ -338,13 +334,6 @@ </select> </template> -<div id="callmod_dialog" title="Call Mod"> - <p> - <span class="ui-icon ui-icon-alert" style="float:left; margin:12px 12px 20px 0;"></span> - Are you sure you want to call a moderator? - </p> -</div> - <body> <span id="sound"></span> <div id="here"></div> 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 |
