From 86eac9dc8319bfe10ad6d5e0c0c139d6aadd72e9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 17 Feb 2014 09:42:48 -0500 Subject: [PATCH] refactor(client) init --- lib/client.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/client.js b/lib/client.js index 1999aa31..8c095d81 100644 --- a/lib/client.js +++ b/lib/client.js @@ -136,25 +136,25 @@ var Util, DOM, CloudFunc; * инициализации */ this.init = function() { - var lCallBack, lFunc; - - lCallBack = function() { - Util.loadOnLoad([ - initModules, - baseInit, - Util.bind(CloudCmd.route, location.hash) - ]); - }, - lFunc = function(pCallBack) { - CloudCmd.OLD_BROWSER = true; - var lSrc = CloudCmd.LIBDIRCLIENT + 'polyfill.js'; + var callback = function() { + Util.loadOnLoad([ + initModules, + baseInit, + Util.bind(CloudCmd.route, location.hash) + ]); + }, - DOM.jqueryLoad( - DOM.retJSLoad(lSrc, pCallBack) - ); - }; + func = function(callBack) { + var src = CloudCmd.LIBDIRCLIENT + 'polyfill.js'; + + CloudCmd.OLD_BROWSER = true; + + DOM.jqueryLoad(function() { + DOM.jsload(src, callback); + }); + }; - Util.ifExec(document.body.scrollIntoViewIfNeeded, lCallBack, lFunc); + Util.ifExec(document.body.scrollIntoViewIfNeeded, callback, func); }; this.route = function(path) {