summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/atx.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-11-08 01:34:30 +0300
committerDevaev Maxim <[email protected]>2019-11-08 01:34:30 +0300
commit3c1681fd2bc43dffcc75b82760d3f068af97574c (patch)
tree7ed65051de87946fb5b0ff398c1396d5f0b0a5c9 /web/share/js/kvm/atx.js
parentb261c2695cd95100994e5d571bec3534d5477dff (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/atx.js')
-rw-r--r--web/share/js/kvm/atx.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js
index d65d1ded..a7c6bbed 100644
--- a/web/share/js/kvm/atx.js
+++ b/web/share/js/kvm/atx.js
@@ -45,11 +45,7 @@ export function Atx() {
self.setState = function(state) {
if (state) {
- if (state.enabled) {
- $("atx-dropdown").classList.remove("feature-disabled");
- } else {
- $("atx-dropdown").classList.add("feature-disabled");
- }
+ $("atx-dropdown").classList.toggle("feature-disabled", !state.enabled);
}
$("atx-power-led").className = ((state && state.leds.power) ? "led-green" : "led-gray");