Make sure there's a template name before requesting it from server

This commit is contained in:
Nathan Gray 2012-07-23 23:51:47 +00:00
parent 9abe56ff94
commit 0fa5e2ee49

View File

@ -102,6 +102,8 @@ var et2_template = et2_DOMWidget.extend({
splitted = this.id.split('.');
var path = this.egw().webserverUrl + "/" + splitted.shift() + "/templates/default/" + splitted.join('.') + ".xet";
if(splitted.length)
{
et2_loadXMLFromURL(path, function(_xmldoc) {
var templates = {};
// Scan for templates and store them
@ -117,6 +119,7 @@ var et2_template = et2_DOMWidget.extend({
// Inform the widget tree that it has been successfully loaded.
this.loadingFinished();
}, this);
}
return;
}
}