Trigger a load event when the template is loaded, to make it easier to work with the template when it is loaded from the server

This commit is contained in:
Nathan Gray 2013-09-19 19:31:56 +00:00
parent 49f9935b60
commit 3cfbcc8cf1

View File

@ -164,6 +164,16 @@ var et2_template = et2_DOMWidget.extend(
getDOMNode: function() {
return this.div;
},
/**
* Override to trigger a load event, to facilitate processing when the xml file
* is loaded asyncronously
*/
doLoadingFinished: function() {
this._super.apply(this, arguments);
$j(this.getDOMNode()).trigger('load');
return true;
}
});
et2_register_widget(et2_template, ["template"]);