mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 19:19:43 +01:00
Make sure this.et2 is there before trying to use it.
Fixes type error when closing un-viewed mail tab.
This commit is contained in:
parent
f049892993
commit
2eff897d52
@ -69,12 +69,14 @@ app.classes.mail = AppJS.extend(
|
|||||||
destroy: function()
|
destroy: function()
|
||||||
{
|
{
|
||||||
// Unbind from nm refresh
|
// Unbind from nm refresh
|
||||||
var nm = this.et2.getWidgetById('nm');
|
if(this.et2 != null)
|
||||||
if(nm != null)
|
|
||||||
{
|
{
|
||||||
$j(nm).off('refresh');
|
var nm = this.et2.getWidgetById('nm');
|
||||||
|
if(nm != null)
|
||||||
|
{
|
||||||
|
$j(nm).off('refresh');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
delete this.et2;
|
|
||||||
delete this.et2_obj;
|
delete this.et2_obj;
|
||||||
// call parent
|
// call parent
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
@ -92,7 +94,6 @@ app.classes.mail = AppJS.extend(
|
|||||||
// call parent; somehow this function is called more often. (twice on a display and compose) why?
|
// call parent; somehow this function is called more often. (twice on a display and compose) why?
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.et2_obj = et2;
|
this.et2_obj = et2;
|
||||||
this.et2 = et2.widgetContainer;
|
|
||||||
var isMainView = false;
|
var isMainView = false;
|
||||||
var isDisplay = false;
|
var isDisplay = false;
|
||||||
var isCompose = false;
|
var isCompose = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user