Roo/Template.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 6 Apr 2012 15:24:49 +0000 (23:24 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 6 Apr 2012 15:24:49 +0000 (23:24 +0800)
Roo/Template.js

index 0916bdd..ea096de 100644 (file)
@@ -100,11 +100,16 @@ Roo.Template.prototype = {
     
     loading : false,
     
     
     loading : false,
     
+    afterLoad : false,
+    
     load : function (url, success)
     {
     load : function (url, success)
     {
+        
+        this.afterLoad = success;
         if (this.loading) {
             return;
         }
         if (this.loading) {
             return;
         }
+        
         this.loading = true;
         this.compiled = false;
         var _t = this;
         this.loading = true;
         this.compiled = false;
         var _t = this;
@@ -115,7 +120,7 @@ Roo.Template.prototype = {
             success : function (response) {
                 _t.loading = false;
                 _t.html = response.responseText;
             success : function (response) {
                 _t.loading = false;
                 _t.html = response.responseText;
-                success && success();
+                _t.afterLoad && _t.afterLoad();
             },
             failure : function(response) {
                 Roo.log("Template failed to load from " + url);
             },
             failure : function(response) {
                 Roo.log("Template failed to load from " + url);