mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Remove rl.showScreenPopup in favour of AbstractViewPopup.showModal
This commit is contained in:
parent
649f74fc51
commit
f6400b6da2
5 changed files with 17 additions and 12 deletions
|
|
@ -3,8 +3,7 @@ import ko from 'ko';
|
|||
import { inFocus, addObservablesTo, addComputablesTo, addSubscribablesTo } from 'Common/Utils';
|
||||
import { Scope } from 'Common/Enums';
|
||||
import { keyScope, Settings, leftPanelDisabled } from 'Common/Globals';
|
||||
import { ViewType } from 'Knoin/Knoin';
|
||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
||||
import { ViewType, showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
class AbstractView {
|
||||
constructor(templateID, type)
|
||||
|
|
@ -88,11 +87,11 @@ export class AbstractViewPopup extends AbstractView
|
|||
});
|
||||
}
|
||||
}
|
||||
/*
|
||||
AbstractViewPopup.show = function(params = []) {
|
||||
|
||||
AbstractViewPopup.showModal = function(params = []) {
|
||||
showScreenPopup(this, params);
|
||||
}
|
||||
*/
|
||||
|
||||
AbstractViewPopup.hidden = function() {
|
||||
return !this.__vm || !this.__vm.modalVisibility();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,10 +244,7 @@ const
|
|||
}, 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getScreenPopupViewModel = ViewModelClassToShow =>
|
||||
(buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom) && ViewModelClassToShow.__vm;
|
||||
};
|
||||
|
||||
|
||||
export const
|
||||
|
|
@ -281,7 +278,8 @@ export const
|
|||
* @returns {void}
|
||||
*/
|
||||
showScreenPopup = (ViewModelClassToShow, params = []) => {
|
||||
const vm = getScreenPopupViewModel(ViewModelClassToShow);
|
||||
const vm = buildViewModel(ViewModelClassToShow) && ViewModelClassToShow.__dom && ViewModelClassToShow.__vm;
|
||||
|
||||
if (vm) {
|
||||
params = params || [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue