mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Revamp isPopupVisible to AbstractViewPopup.hidden
This commit is contained in:
parent
d7ed6ce423
commit
686138ae15
5 changed files with 19 additions and 18 deletions
|
|
@ -4,6 +4,7 @@ import { inFocus, addObservablesTo, addComputablesTo, addSubscribablesTo } from
|
|||
import { Scope } from 'Common/Enums';
|
||||
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
||||
import { ViewType } from 'Knoin/Knoin';
|
||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
class AbstractView {
|
||||
constructor(templateID, type)
|
||||
|
|
@ -87,6 +88,14 @@ export class AbstractViewPopup extends AbstractView
|
|||
});
|
||||
}
|
||||
}
|
||||
/*
|
||||
AbstractViewPopup.show = function(params = []) {
|
||||
showScreenPopup(this, params);
|
||||
}
|
||||
*/
|
||||
AbstractViewPopup.hidden = function() {
|
||||
return !this.__vm || !this.__vm.modalVisibility();
|
||||
}
|
||||
|
||||
export class AbstractViewCenter extends AbstractView
|
||||
{
|
||||
|
|
|
|||
|
|
@ -244,7 +244,11 @@ const
|
|||
}, 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
getScreenPopupViewModel = ViewModelClassToShow =>
|
||||
(buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom) && ViewModelClassToShow.__vm;
|
||||
|
||||
|
||||
export const
|
||||
ViewType = {
|
||||
|
|
@ -271,9 +275,6 @@ export const
|
|||
return fResult;
|
||||
},
|
||||
|
||||
getScreenPopupViewModel = ViewModelClassToShow =>
|
||||
(buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom) && ViewModelClassToShow.__vm,
|
||||
|
||||
/**
|
||||
* @param {Function} ViewModelClassToShow
|
||||
* @param {Array=} params
|
||||
|
|
@ -294,13 +295,6 @@ export const
|
|||
|
||||
arePopupsVisible = ko.observable(false),
|
||||
|
||||
/**
|
||||
* @param {Function} ViewModelClassToShow
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isPopupVisible = ViewModelClassToShow =>
|
||||
ViewModelClassToShow && ViewModelClassToShow.__vm && ViewModelClassToShow.__vm.modalVisibility(),
|
||||
|
||||
/**
|
||||
* @param {Array} screensClasses
|
||||
* @returns {void}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue