loading : false,
+ afterLoad : false,
+
load : function (url, success)
{
+
+ this.afterLoad = success;
if (this.loading) {
return;
}
+
this.loading = true;
+ this.compiled = false;
var _t = this;
- var cx = new Roo.data.Connection({
+ var cx = new Roo.data.Connection();
+ cx.request({
url : url,
method : 'GET',
- success : function () {
+ success : function (response) {
_t.loading = false;
- success && success();
+ _t.html = response.responseText;
+ _t.afterLoad && _t.afterLoad();
},
- failure : function() {
+ failure : function(response) {
Roo.log("Template failed to load from " + url);
_t.loading = false;
}