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

index cd230b2..8e28fd8 100644 (file)
@@ -98,6 +98,23 @@ Roo.Template.prototype = {
          
     },
     
+    loading : false,
+    
+    load : function (url, success)
+    {
+        if (this.loading) {
+            return false;
+        }
+        var cx = new Roo.data.Connection({
+            url : url,
+            method : 'GET',
+            success : success,
+            failure : function() {
+                Roo.log("Template failed to load from " + url);  
+            }
+        });
+    },
+
     /**
      * Sets the HTML used as the template and optionally compiles it.
      * @param {String} html