mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
Small refactoring (popup key scope optimization)
This commit is contained in:
parent
77cdc4690b
commit
a96e1d80c3
22 changed files with 226 additions and 254 deletions
|
|
@ -143,6 +143,7 @@ Knoin.prototype.hideScreenPopup = function (ViewModelClassToHide)
|
|||
{
|
||||
ViewModelClassToHide.__vm.modalVisibility(false);
|
||||
Utils.delegateRun(ViewModelClassToHide.__vm, 'onHide');
|
||||
ViewModelClassToHide.__vm.restoreKeyScope();
|
||||
|
||||
RL.popupVisibilityNames.remove(ViewModelClassToHide.__name);
|
||||
|
||||
|
|
@ -168,8 +169,10 @@ Knoin.prototype.showScreenPopup = function (ViewModelClassToShow, aParameters)
|
|||
{
|
||||
ViewModelClassToShow.__dom.show();
|
||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||
|
||||
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||
|
||||
ViewModelClassToShow.__vm.storeAndSetKeyScope();
|
||||
|
||||
RL.popupVisibilityNames.push(ViewModelClassToShow.__name);
|
||||
|
||||
Plugins.runHook('view-model-on-show', [ViewModelClassToShow.__name, ViewModelClassToShow.__vm, aParameters || []]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue