mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Fix etemplate2 clear instance broken by commit 51394
This commit is contained in:
parent
8c1f3a5386
commit
c3a8f0d7c0
@ -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