diff options
author | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-11-27 12:05:38 +0300 |
commit | 1897d72b5191ba88130f99feec302ea95b4ce6cd (patch) | |
tree | 39b235ae1182aca7fd667577868a65ba9dc9f6b8 /web/js/kvm/hid.js | |
parent | b5ca09f310ade56ead145db4aee892d50cfd6386 (diff) |
refactoring
Diffstat (limited to 'web/js/kvm/hid.js')
-rw-r--r-- | web/js/kvm/hid.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/js/kvm/hid.js b/web/js/kvm/hid.js index 69b34144..341527b1 100644 --- a/web/js/kvm/hid.js +++ b/web/js/kvm/hid.js @@ -42,8 +42,8 @@ function Hid() { window.onblur = __releaseAll; __chars_to_codes = __buildCharsToCodes(); - tools.setOnClick($("hid-pak-button"), __clickPasteAsKeysButton); + tools.setOnClick($("hid-pak-button"), __clickPasteAsKeysButton); tools.setOnClick($("hid-reset-button"), __clickResetButton); Array.prototype.forEach.call(document.querySelectorAll("[data-shortcut]"), function(el_shortcut) { @@ -54,10 +54,12 @@ function Hid() { /********************************************************************************/ self.setSocket = function(ws) { + $("hid-pak-text").disabled = !ws; + $("hid-pak-button").disabled = !ws; + $("hid-reset-button").disabled = !ws; __ws = ws; __keyboard.setSocket(ws); __mouse.setSocket(ws); - $("hid-pak-text").disabled = $("hid-pak-button").disabled = $("hid-reset-button").disabled = !ws; }; var __releaseAll = function() { |