Wrap loadingFinished() in a try / catch, so if one widget has problems it doesn't break the whole template.

This commit is contained in:
Nathan Gray 2013-07-20 13:54:31 +00:00
parent 0c30eeaee4
commit f60fa14c30
2 changed files with 9 additions and 2 deletions

View File

@ -732,9 +732,16 @@ var et2_widget = Class.extend(
{ {
// Descend recursively into the tree // Descend recursively into the tree
for (var i = 0; i < this._children.length; i++) for (var i = 0; i < this._children.length; i++)
{
try
{ {
this._children[i].loadingFinished(); this._children[i].loadingFinished();
} }
catch (e)
{
egw.debug("error", "There was an error with a widget:\nError:%s\nProblem widget:%o",e.message,this._children[i]);
}
}
} }
}, },

View File

@ -334,7 +334,7 @@ var et2_dialog = et2_widget.extend({
} }
// If dialog already created, update buttons // If dialog already created, update buttons
if(this.div.data('uiDialog')) if(this.div.data('ui-dialog'))
{ {
this.div.dialog("option", "buttons", buttons); this.div.dialog("option", "buttons", buttons);