mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 04:49:44 +01:00
If a specific template name is not provided, use the last template in the file
This commit is contained in:
parent
d58a3128e7
commit
a4395a8000
@ -209,7 +209,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set app_header
|
// set app_header
|
||||||
if (window.opener) { // popup
|
if (window.opener && _data) { // popup
|
||||||
document.title = _data.app_header;
|
document.title = _data.app_header;
|
||||||
} else {
|
} else {
|
||||||
// todo for idots or jdots framework
|
// todo for idots or jdots framework
|
||||||
@ -223,10 +223,11 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
|||||||
var template = _xmldoc.childNodes[i];
|
var template = _xmldoc.childNodes[i];
|
||||||
if(template.nodeName.toLowerCase() != "template") continue;
|
if(template.nodeName.toLowerCase() != "template") continue;
|
||||||
this.templates[template.getAttribute("id")] = template;
|
this.templates[template.getAttribute("id")] = template;
|
||||||
|
if(!_name) missing_name = template.getAttribute("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the XML structure of the requested template
|
// Read the XML structure of the requested template
|
||||||
this.widgetContainer.loadFromXML(this.templates[_name]);
|
this.widgetContainer.loadFromXML(this.templates[_name || missing_name]);
|
||||||
|
|
||||||
// Inform the widget tree that it has been successfully loaded.
|
// Inform the widget tree that it has been successfully loaded.
|
||||||
this.widgetContainer.loadingFinished();
|
this.widgetContainer.loadingFinished();
|
||||||
|
Loading…
Reference in New Issue
Block a user