X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=fb819f7e82e83289aeba4c51f40cee1c61b11d26;hb=960d50c92006ef3fcd1c47eb3e521591ed9319e1;hp=7b65ff1ce66b2dc3df1082d0de844a9dfa5bf27d;hpb=e2f3f95937a0262710ebbdf11f3f122a1d6fdfbd;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 7b65ff1ce6..fb819f7e82 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -4678,6 +4678,12 @@ Roo.Template = function(cfg){ }; Roo.Template.prototype = { + /** + * @cfg {Function} onLoad Called after the template has been loaded and complied (usually from a remove source) + */ + onLoad : false, + + /** * @cfg {String} url The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly.. * it should be fixed so that template is observable... @@ -4755,6 +4761,9 @@ Roo.Template.prototype = { _t.html = response.responseText; _t.url = false; _t.compile(); + if (_t.onLoad) { + _t.onLoad(); + } }, failure : function(response) { Roo.log("Template failed to load from " + _t.url);