diff options
author | Devaev Maxim <[email protected]> | 2021-07-14 20:06:32 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2021-07-14 20:06:32 +0300 |
commit | 105928193b50f40facdc0bfc479dc51a06a97efa (patch) | |
tree | a1b6e248ac310fbffc2d13ac8a9d123c80dc52f3 /web/share | |
parent | d8c373103135d743c91b0a9e9e142625b79a771d (diff) |
two keyboard buttons
Diffstat (limited to 'web/share')
-rw-r--r-- | web/share/js/wm.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/share/js/wm.js b/web/share/js/wm.js index 016e39b0..11c95181 100644 --- a/web/share/js/wm.js +++ b/web/share/js/wm.js @@ -63,11 +63,6 @@ function __WindowManager() { __makeWindowMovable(el_window); __windows.push(el_window); - if (el_window.hasAttribute("data-show-by-button")) { - let el_show_button = $(el_window.getAttribute("data-show-by-button")); - tools.setOnClick(el_show_button, () => self.showWindow(el_window)); - } - if (el_window.classList.contains("window-resizable") && window.ResizeObserver) { new ResizeObserver(function() { // При переполнении рабочей области сократить размер окна по высоте. @@ -125,6 +120,10 @@ function __WindowManager() { } } + for (let el_button of $$$("button[data-show-window]")) { + tools.setOnClick(el_button, () => self.showWindow($(el_button.getAttribute("data-show-window")))); + } + window.onmouseup = __globalMouseButtonHandler; window.ontouchend = __globalMouseButtonHandler; |