From 2997769ebcc32a8d8b7193e06e9879cbb2df3610 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 6 Apr 2012 23:20:33 +0800 Subject: [PATCH] Roo/Template.js --- Roo/Template.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } }); }, -- 2.39.2