diff options
author | Devaev Maxim <[email protected]> | 2019-11-08 02:08:56 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-11-08 02:08:56 +0300 |
commit | 7f1461371d561592a1445e6b0245d51ca2516761 (patch) | |
tree | 057ad775af452346068306f58258a9d2609e7b7b /web/share/js/kvm/hid.js | |
parent | 3c1681fd2bc43dffcc75b82760d3f068af97574c (diff) |
refactoring
Diffstat (limited to 'web/share/js/kvm/hid.js')
-rw-r--r-- | web/share/js/kvm/hid.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/web/share/js/kvm/hid.js b/web/share/js/kvm/hid.js index 772b4a45..4868b0a5 100644 --- a/web/share/js/kvm/hid.js +++ b/web/share/js/kvm/hid.js @@ -86,9 +86,9 @@ export function Hid() { /************************************************************************/ self.setSocket = function(ws) { - wm.switchDisabled($("hid-pak-text"), !ws); - wm.switchDisabled($("hid-pak-button"), !ws); - wm.switchDisabled($("hid-reset-button"), !ws); + wm.switchEnabled($("hid-pak-text"), ws); + wm.switchEnabled($("hid-pak-button"), ws); + wm.switchEnabled($("hid-reset-button"), ws); __ws = ws; __keyboard.setSocket(ws); __mouse.setSocket(ws); @@ -192,8 +192,8 @@ export function Hid() { wm.confirm(confirm_msg).then(function(ok) { if (ok) { - wm.switchDisabled($("hid-pak-text"), true); - wm.switchDisabled($("hid-pak-button"), true); + wm.switchEnabled($("hid-pak-text"), false); + wm.switchEnabled($("hid-pak-button"), false); $("hid-pak-led").className = "led-yellow-rotating-fast"; $("hid-pak-led").title = "Autotyping..."; @@ -207,8 +207,8 @@ export function Hid() { iterate(); } else { $("hid-pak-text").value = ""; - wm.switchDisabled($("hid-pak-text"), false); - wm.switchDisabled($("hid-pak-button"), false); + wm.switchEnabled($("hid-pak-text"), true); + wm.switchEnabled($("hid-pak-button"), true); $("hid-pak-led").className = "led-gray"; $("hid-pak-led").title = ""; } |