diff options
author | Devaev Maxim <[email protected]> | 2018-07-28 14:32:03 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-07-28 14:32:03 +0300 |
commit | 8bac7382bb16981c615c6af79dc00febd16949b4 (patch) | |
tree | 1c489d81ffa36fb14e13da75fcfbfc4f39f8dd14 /kvmd/web/js | |
parent | 55da818b8e8320e52fb02c9992e2649e280b7619 (diff) |
pretty menu selecting
Diffstat (limited to 'kvmd/web/js')
-rw-r--r-- | kvmd/web/js/ui.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js index 3d16ec29..95b61a8d 100644 --- a/kvmd/web/js/ui.js +++ b/kvmd/web/js/ui.js @@ -92,12 +92,12 @@ var ui = new function() { __ctl_items.forEach(function(el_item) { var el_menu = el_item.parentElement.querySelector(".ctl-dropdown-content"); if (el_item === el_a && el_menu.style.display === "none") { + el_item.classList.add("ctl-item-selected"); el_menu.style.display = "block"; - el_item.setAttribute("style", "background-color: var(--bg-color-selected)"); all_hidden &= false; } else { + el_item.classList.remove("ctl-item-selected"); el_menu.style.display = "none"; - el_item.setAttribute("style", "background-color: default"); } }); if (all_hidden) { |