From: Alan Knowles Date: Fri, 6 Apr 2012 15:20:33 +0000 (+0800) Subject: Roo/Template.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=2997769ebcc32a8d8b7193e06e9879cbb2df3610 Roo/Template.js --- diff --git a/Roo/Template.js b/Roo/Template.js index 73f962bc4e..bfcc6cd9dc 100644 --- a/Roo/Template.js +++ b/Roo/Template.js @@ -105,12 +105,18 @@ Roo.Template.prototype = { if (this.loading) { return; } + this.loading = true; + var _t = this; var cx = new Roo.data.Connection({ url : url, method : 'GET', - success : success, + success : function () { + _t.loading = false; + success && success(); + }, failure : function() { - Roo.log("Template failed to load from " + url); + Roo.log("Template failed to load from " + url); + _t.loading = false; } }); },