diff options
author | Devaev Maxim <[email protected]> | 2018-07-17 04:14:05 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-07-17 04:14:05 +0300 |
commit | 1c4a6b0debd627cc141b3c6ca3269506f1cfe967 (patch) | |
tree | bb438e97b7f56391e0c433447208aba316baff6e /kvmd/web/js | |
parent | 45bdfd111d1c1e9107ec904490e5e233d14b8c9b (diff) |
refactoring
Diffstat (limited to 'kvmd/web/js')
-rw-r--r-- | kvmd/web/js/atx.js | 2 | ||||
-rw-r--r-- | kvmd/web/js/stream.js | 4 | ||||
-rw-r--r-- | kvmd/web/js/tools.js | 5 |
3 files changed, 3 insertions, 8 deletions
diff --git a/kvmd/web/js/atx.js b/kvmd/web/js/atx.js index d17735c5..8f6a0cc0 100644 --- a/kvmd/web/js/atx.js +++ b/kvmd/web/js/atx.js @@ -68,7 +68,7 @@ var atx = new function() { "atx-power-button-long", "atx-reset-button", ].forEach(function(name) { - tools.setButtonBusy(document.getElementById(name), busy); + document.getElementById(name).disabled = busy; }); }; }; diff --git a/kvmd/web/js/stream.js b/kvmd/web/js/stream.js index afaed1ae..6dad610a 100644 --- a/kvmd/web/js/stream.js +++ b/kvmd/web/js/stream.js @@ -28,13 +28,13 @@ var stream = new function() { // }; this.clickResetButton = function(el_button) { - tools.setButtonBusy(el_button, true); + el_button.disabled = true; var http = tools.makeRequest("POST", "/kvmd/streamer/reset", function() { if (http.readyState === 4) { if (http.status !== 200) { alert("Can't reset stream:", http.responseText); } - tools.setButtonBusy(el_button, false); + el_button.disabled = false; } }); }; diff --git a/kvmd/web/js/tools.js b/kvmd/web/js/tools.js index d9fe8357..37bbf451 100644 --- a/kvmd/web/js/tools.js +++ b/kvmd/web/js/tools.js @@ -8,11 +8,6 @@ var tools = new function() { return http; }; - this.setButtonBusy = function(el_button, busy) { - el_button.disabled = busy; - el_button.style.cursor = (busy ? "wait" : "default"); - }; - var __debug = (new URL(window.location.href)).searchParams.get("debug"); this.debug = function(...args) { |