From 5eb440c22bb87b1d69c14193954620b9f1cec023 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 4 Feb 2010 15:12:34 -0800 Subject: lazy load the status dom --- src/Widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Widgets.js') diff --git a/src/Widgets.js b/src/Widgets.js index 01877128..5e844ae0 100644 --- a/src/Widgets.js +++ b/src/Widgets.js @@ -779,8 +779,8 @@ PopUp.prototype = { function Status(body) { - this.loader = body.append(Status.DOM).find("#ng-loading"); this.requestCount = 0; + this.body = body; }; Status.DOM ='
loading....
'; @@ -788,7 +788,7 @@ Status.DOM ='
loading....
'; Status.prototype = { beginRequest: function () { if (this.requestCount === 0) { - this.loader.show(); + (this.loader = this.loader || this.body.append(Status.DOM).find("#ng-loading")).show(); } this.requestCount++; }, -- cgit v1.2.3