From 906c19a46a0bc61071f18fadc6b02118a345dd93 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 3 Mar 2014 09:07:50 -0500 Subject: [PATCH] feature(config) add spinner before load --- lib/client/config.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/client/config.js b/lib/client/config.js index f60d3a29..2b1b209a 100644 --- a/lib/client/config.js +++ b/lib/client/config.js @@ -6,19 +6,23 @@ var CloudCmd, Util, DOM; CloudCmd.Config = ConfigProto; function ConfigProto() { - var Loading = true, - Key = CloudCmd.Key, - Images = DOM.Images, - Events = DOM.Events, - INPUT = 'INPUT', + var Loading = true, + Key = CloudCmd.Key, + Images = DOM.Images, + Events = DOM.Events, + showLoad = Images.showLoad.bind(DOM, { + top: true + }), + INPUT = 'INPUT', CONFIG, TEMPLATE, - Notify = DOM.Notify, - Config = this; + Notify = DOM.Notify, + Config = this; function init(pCallBack) { Loading = true; + showLoad(); Util.loadOnLoad([ CloudCmd.View, function(callback) { @@ -36,7 +40,7 @@ var CloudCmd, Util, DOM; ]; if (!Loading) { - Images.showLoad({top:true}); + showLoad(); Util.asyncCall(funcs, fillTemplate); } };