forked from extern/egroupware
Fix etemplate2 clear instance broken by commit 51394
This commit is contained in:
parent
0361739045
commit
f01cfd4a41
@ -196,6 +196,19 @@ etemplate2.prototype.clear = function()
|
||||
this.widgetContainer = null;
|
||||
}
|
||||
$j(this.DOMContainer).empty();
|
||||
|
||||
// Remove self from the index
|
||||
for(name in this.templates)
|
||||
{
|
||||
if(typeof etemplate2._byTemplate[name] == "undefined") continue;
|
||||
for(var i = 0; i < etemplate2._byTemplate[name].length; i++)
|
||||
{
|
||||
if(etemplate2._byTemplate[name][i] == this)
|
||||
{
|
||||
etemplate2._byTemplate[name].splice(i,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user