summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-04-13 10:14:27 +0300
committerDevaev Maxim <[email protected]>2021-04-13 10:14:27 +0300
commit5dc123e1860be5e582de1ed4341296c3c3f649da (patch)
treed096949bec0a122726c96350150f5df6b8618961 /web/share
parent6de0ee0017df50d155a00d748ed2b676f8293655 (diff)
refactoring
Diffstat (limited to 'web/share')
-rw-r--r--web/share/js/kvm/main.js3
-rw-r--r--web/share/js/wm.js5
2 files changed, 5 insertions, 3 deletions
diff --git a/web/share/js/kvm/main.js b/web/share/js/kvm/main.js
index dde873c7..8150a852 100644
--- a/web/share/js/kvm/main.js
+++ b/web/share/js/kvm/main.js
@@ -40,9 +40,6 @@ export function main() {
initWindowManager();
- tools.setOnClick($("show-about-button"), () => wm.showWindow($("about-window")));
- tools.setOnClick($("show-keyboard-button"), () => wm.showWindow($("keyboard-window")));
- tools.setOnClick($("show-stream-button"), () => wm.showWindow($("stream-window")));
tools.setOnClick($("open-log-button"), () => window.open("/api/log?seek=3600&follow=1", "_blank"));
wm.showWindow($("stream-window"));
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 11d86155..b74e2626 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -63,6 +63,11 @@ 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() {
// При переполнении рабочей области сократить размер окна по высоте.