mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
modalVisibility() to modalVisible()
This commit is contained in:
parent
86374433b9
commit
36feca6ce7
3 changed files with 30 additions and 36 deletions
|
|
@ -58,9 +58,9 @@ export class AbstractViewPopup extends AbstractView
|
|||
{
|
||||
super('Popups' + name, ViewType.Popup);
|
||||
this.keyScope.scope = name;
|
||||
this.modalVisibility = ko.observable(false).extend({ rateLimit: 0 });
|
||||
this.modalVisible = ko.observable(false).extend({ rateLimit: 0 });
|
||||
shortcuts.add('escape,close', '', name, () => {
|
||||
if (this.modalVisibility() && this.onClose()) {
|
||||
if (this.modalVisible() && this.onClose()) {
|
||||
this.closeCommand();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ AbstractViewPopup.showModal = function(params = []) {
|
|||
}
|
||||
|
||||
AbstractViewPopup.hidden = function() {
|
||||
return !this.__vm || !this.__vm.modalVisibility();
|
||||
return !this.__vm || !this.__vm.modalVisible();
|
||||
}
|
||||
|
||||
export class AbstractViewCenter extends AbstractView
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ const
|
|||
}
|
||||
};
|
||||
|
||||
vm.modalVisibility.subscribe(value => {
|
||||
vm.modalVisible.subscribe(value => {
|
||||
if (value) {
|
||||
visiblePopups.add(vm);
|
||||
vmDom.style.zIndex = 3000 + (visiblePopups.size * 2);
|
||||
|
|
@ -154,7 +154,7 @@ const
|
|||
*/
|
||||
hideScreenPopup = ViewModelClassToHide => {
|
||||
if (ViewModelClassToHide && ViewModelClassToHide.__vm && ViewModelClassToHide.__dom) {
|
||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||
ViewModelClassToHide.__vm.modalVisible(false);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ export const
|
|||
|
||||
vm.onBeforeShow && vm.onBeforeShow(...params);
|
||||
|
||||
vm.modalVisibility(true);
|
||||
vm.modalVisible(true);
|
||||
|
||||
vm.onShow && vm.onShow(...params);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue