mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Check for old template and clear it before loading a new template into same DOM node
Prevents action corruption in home when new etemplate is loaded before old one is cleared.
This commit is contained in:
parent
4c307f7d1f
commit
009b5b72e7
@ -1141,6 +1141,13 @@ function etemplate2_handle_load(_type, _response)
|
||||
var node = document.getElementById(data.DOMNodeID);
|
||||
if(node)
|
||||
{
|
||||
if(node.children.length)
|
||||
{
|
||||
// Node has children already? Check for loading over an
|
||||
// existing etemplate
|
||||
var old = etemplate2.getById(node.id);
|
||||
if(old) old.clear();
|
||||
}
|
||||
var et2 = new etemplate2(node);
|
||||
et2.load(data.name, data.url, data.data);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user