diff options
Diffstat (limited to 'web/share/js')
-rw-r--r-- | web/share/js/kvm/gpio.js | 11 | ||||
-rw-r--r-- | web/share/js/wm.js | 5 |
2 files changed, 13 insertions, 3 deletions
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js index 15eabd79..08ec42a8 100644 --- a/web/share/js/kvm/gpio.js +++ b/web/share/js/kvm/gpio.js @@ -72,7 +72,16 @@ export function Gpio(__recorder) { self.setModel = function(model) { tools.feature.setEnabled($("gpio-dropdown"), model.view.table.length); if (model.view.table.length) { - $("gpio-menu-button").innerHTML = `${model.view.header.title}`; + let title = []; + let last_is_label = false; + for (let item of model.view.header.title) { + if (last_is_label && item.type === "label") { + title.push("<span></span>"); + } + last_is_label = (item.type === "label"); + title.push(__createItem(item)); + } + $("gpio-menu-button").innerHTML = title.join(" "); } let content = "<table class=\"kv\">"; diff --git a/web/share/js/wm.js b/web/share/js/wm.js index 51f6c01a..20ea0805 100644 --- a/web/share/js/wm.js +++ b/web/share/js/wm.js @@ -344,8 +344,9 @@ function __WindowManager() { var __globalMouseButtonHandler = function(event) { if ( - event.target.matches && !event.target.matches(".menu-button") - && event.target.closest && !event.target.closest(".modal") + event.target.closest + && !event.target.closest(".menu-button") + && !event.target.closest(".modal") ) { for (let el_item = event.target; el_item && el_item !== document; el_item = el_item.parentNode) { if (el_item.hasAttribute("data-force-hide-menu")) { |