Allow template attribute to be the ID of a known template, not just a separate file

This commit is contained in:
Nathan Gray 2014-02-19 21:57:10 +00:00
parent 9b84be6d01
commit 45303ecb15

View File

@ -405,7 +405,16 @@ var et2_dialog = et2_widget.extend({
}
this.template = new etemplate2(this.div[0], false);
this.template.load("",template,this.options.value||{});
if(template.indexOf('.xet') > 0)
{
// File name provided, fetch from server
this.template.load("",template,this.options.value||{});
}
else
{
// Just template name, it better be loaded already
this.template.load(template,'',this.options.value||{});
}
},
/**