If et2 object changes, we need the new one, not reject.

This commit is contained in:
Nathan Gray 2013-08-20 23:20:56 +00:00
parent c1be84c912
commit 1d9589db99

View File

@ -78,19 +78,17 @@ var AppJS = Class.extend({
/**
* This function is called when the etemplate2 object is loaded
* and ready. If you must store a reference to the et2 object,
* make sure to clean it up in destroy().
* make sure to clean it up in destroy(). Note that this can be called
* several times, with different et2 objects, as templates are loaded.
*
* @param et2 etemplate2 Newly ready object
*/
et2_ready: function(et2) {
if(this.et2 === null)
if(this.et2 !== null)
{
this.et2 = et2.widgetContainer;
}
else
{
egw.debug('warn', "Tried to overwrite et2 object");
egw.debug('log', "Changed et2 object");
}
this.et2 = et2.widgetContainer;
},
/**