From 7e6bc4fb611df1324c855e7d3210c3d199917c1f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 11 Dec 2013 16:03:47 +0000 Subject: [PATCH] feature(config) add Loading --- lib/client/config.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/client/config.js b/lib/client/config.js index 115de4c0..7107f8aa 100644 --- a/lib/client/config.js +++ b/lib/client/config.js @@ -5,7 +5,8 @@ var CloudCmd, Util, DOM; CloudCmd.Config = ConfigProto; function ConfigProto() { - var Key = CloudCmd.Key, + var Loading = true, + Key = CloudCmd.Key, Images = DOM.Images, Events = DOM.Events, INPUT = 'INPUT', @@ -17,6 +18,9 @@ var CloudCmd, Util, DOM; function init(pCallBack) { Util.loadOnLoad([ Config.show, + function() { + Loading = false; + }, CloudCmd.View, ]); @@ -30,8 +34,10 @@ var CloudCmd, Util, DOM; cssLoad ]; - Images.showLoad({top:true}); - Util.asyncCall(funcs, fillTemplate); + if (!Loading) { + Images.showLoad({top:true}); + Util.asyncCall(funcs, fillTemplate); + } }; function cssLoad(callback) {