refactoring

This commit is contained in:
Devaev Maxim
2019-11-08 02:08:56 +03:00
parent 3c1681fd2b
commit 7f1461371d
6 changed files with 43 additions and 43 deletions

View File

@@ -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) {