mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-25 14:41:50 +01:00
Make sure et2 is availabe, because it could be not available over cases like when mail connection error. It Fixes error: "can not read getWidgetById of undefined"
This commit is contained in:
parent
3055fe6875
commit
95e1fb860a
@ -227,7 +227,7 @@ app.classes.mail = AppJS.extend(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'emailadmin': // update tree with given mail account _id and _type
|
case 'emailadmin': // update tree with given mail account _id and _type
|
||||||
var tree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
|
var tree = this.et2 ? this.et2.getWidgetById(this.nm_index+'[foldertree]') : null;
|
||||||
if (!tree) break;
|
if (!tree) break;
|
||||||
var node = tree.getNode(_id);
|
var node = tree.getNode(_id);
|
||||||
switch(_type)
|
switch(_type)
|
||||||
@ -1209,7 +1209,8 @@ app.classes.mail = AppJS.extend(
|
|||||||
* Object with the required data (KEY id, VALUE desc), or ID => {new data}
|
* Object with the required data (KEY id, VALUE desc), or ID => {new data}
|
||||||
*/
|
*/
|
||||||
mail_reloadNode: function(_status) {
|
mail_reloadNode: function(_status) {
|
||||||
var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
|
var ftree = this.et2?this.et2.getWidgetById(this.nm_index+'[foldertree]'):null;
|
||||||
|
if (!ftree) return;
|
||||||
var selectedNode = ftree.getSelectedNode();
|
var selectedNode = ftree.getSelectedNode();
|
||||||
for (var i in _status)
|
for (var i in _status)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user