From a4f4d281b247349f100f3cd131c79e311c53b3f8 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 17 Jul 2018 07:53:07 +0300 Subject: [PATCH] refactoring --- kvmd/web/js/atx.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kvmd/web/js/atx.js b/kvmd/web/js/atx.js index 8f6a0cc0..8cc9e90c 100644 --- a/kvmd/web/js/atx.js +++ b/kvmd/web/js/atx.js @@ -26,12 +26,12 @@ var atx = new function() { }); }; - this.clickButton = function(el) { + this.clickButton = function(el_button) { var button = null; var confirm_msg = null; var timeout = null; - switch (el.id) { + switch (el_button.id) { case "atx-power-button": var button = "power"; var confirm_msg = "Are you sure to click the power button?"; @@ -48,7 +48,6 @@ var atx = new function() { } if (button && confirm(confirm_msg)) { - // atx.setButtonsBusy(true); var http = tools.makeRequest("POST", "/kvmd/atx/click?button=" + button, function() { if (http.readyState === 4) { if (http.status === 409) { @@ -56,7 +55,6 @@ var atx = new function() { } else if (http.status !== 200) { alert("Click error:", http.responseText); } - // atx.setButtonsBusy(false); } }, timeout); }