summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
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;