summaryrefslogtreecommitdiff
path: root/web/share/js/wm.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-11-08 02:08:56 +0300
committerDevaev Maxim <[email protected]>2019-11-08 02:08:56 +0300
commit7f1461371d561592a1445e6b0245d51ca2516761 (patch)
tree057ad775af452346068306f58258a9d2609e7b7b /web/share/js/wm.js
parent3c1681fd2bc43dffcc75b82760d3f068af97574c (diff)
refactoring
Diffstat (limited to 'web/share/js/wm.js')
-rw-r--r--web/share/js/wm.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 697f4755..9369d0c0 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -156,8 +156,8 @@ function __WindowManager() {
return promise;
};
- self.switchDisabled = function(el, disabled) {
- if (disabled && document.activeElement === el) {
+ self.switchEnabled = function(el, enabled) {
+ if (!enabled && document.activeElement === el) {
let el_to_focus = (
el.closest(".modal-window")
|| el.closest(".window")
@@ -167,7 +167,7 @@ function __WindowManager() {
el_to_focus.focus();
}
}
- el.disabled = disabled;
+ el.disabled = !enabled;
};
self.showWindow = function(el_window, activate=true, center=false) {