summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-07-14 20:06:32 +0300
committerDevaev Maxim <[email protected]>2021-07-14 20:06:32 +0300
commit105928193b50f40facdc0bfc479dc51a06a97efa (patch)
treea1b6e248ac310fbffc2d13ac8a9d123c80dc52f3 /web/share
parentd8c373103135d743c91b0a9e9e142625b79a771d (diff)
two keyboard buttons
Diffstat (limited to 'web/share')
-rw-r--r--web/share/js/wm.js9
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;