mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Small fixes and code refactoring
This commit is contained in:
parent
e6c712862d
commit
1a85330770
67 changed files with 413 additions and 181 deletions
|
|
@ -170,11 +170,20 @@
|
|||
Globals.popupVisibilityNames.push(this.viewModelName);
|
||||
oViewModel.viewModelDom.css('z-index', 3000 + Globals.popupVisibilityNames().length + 10);
|
||||
|
||||
Utils.delegateRun(this, 'onFocus', [], 500);
|
||||
// Utils.delegateRun(this, 'onShow'); // moved to showScreenPopup function (for parameters)
|
||||
|
||||
if (this.onShowTrigger)
|
||||
{
|
||||
this.onShowTrigger(!this.onShowTrigger());
|
||||
}
|
||||
|
||||
Utils.delegateRun(this, 'onShowWithDelay', [], 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.delegateRun(this, 'onHide');
|
||||
Utils.delegateRun(this, 'onHideWithDelay', [], 500);
|
||||
|
||||
if (this.onHideTrigger)
|
||||
{
|
||||
this.onHideTrigger(!this.onHideTrigger());
|
||||
|
|
@ -251,11 +260,8 @@
|
|||
if (ViewModelClassToShow.__vm && ViewModelClassToShow.__dom)
|
||||
{
|
||||
ViewModelClassToShow.__vm.modalVisibility(true);
|
||||
|
||||
Utils.delegateRun(ViewModelClassToShow.__vm, 'onShow', aParameters || []);
|
||||
if (ViewModelClassToShow.__vm.onShowTrigger)
|
||||
{
|
||||
ViewModelClassToShow.__vm.onShowTrigger(!ViewModelClassToShow.__vm.onShowTrigger());
|
||||
}
|
||||
|
||||
_.each(ViewModelClassToShow.__names, function (sName) {
|
||||
Plugins.runHook('view-model-on-show', [sName, ViewModelClassToShow.__vm, aParameters || []]);
|
||||
|
|
@ -325,6 +331,7 @@
|
|||
if (self.oCurrentScreen)
|
||||
{
|
||||
Utils.delegateRun(self.oCurrentScreen, 'onHide');
|
||||
Utils.delegateRun(self.oCurrentScreen, 'onHideWithDelay', [], 500);
|
||||
|
||||
if (self.oCurrentScreen.onHideTrigger)
|
||||
{
|
||||
|
|
@ -340,7 +347,9 @@
|
|||
{
|
||||
ViewModelClass.__dom.hide();
|
||||
ViewModelClass.__vm.viewModelVisibility(false);
|
||||
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onHide');
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onHideWithDelay', [], 500);
|
||||
|
||||
if (ViewModelClass.__vm.onHideTrigger)
|
||||
{
|
||||
|
|
@ -382,7 +391,7 @@
|
|||
ViewModelClass.__vm.onShowTrigger(!ViewModelClass.__vm.onShowTrigger());
|
||||
}
|
||||
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onFocus', [], 200);
|
||||
Utils.delegateRun(ViewModelClass.__vm, 'onShowWithDelay', [], 200);
|
||||
|
||||
_.each(ViewModelClass.__names, function (sName) {
|
||||
Plugins.runHook('view-model-on-show', [sName, ViewModelClass.__vm]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue