From e001f46c980cf310e2a2641694f8b7badf306f3b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 3 Jan 2014 10:01:34 +0000 Subject: [PATCH] chore(client) baseInit: mv vars to top --- lib/client.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index c550a6b3..46dddcbf 100644 --- a/lib/client.js +++ b/lib/client.js @@ -237,7 +237,6 @@ var Util, DOM, CloudFunc, CloudCmd; DOM.setCurrentFile(files[0]); Listeners = CloudCmd.Listeners; - Listeners.init(); /* загружаем Google Analytics */ Listeners.analytics(); @@ -247,16 +246,17 @@ var Util, DOM, CloudFunc, CloudCmd; CloudCmd.KeysPanel = Listeners.initKeysPanel(); CloudCmd.getConfig(function(config) { - var localStorage = config.localStorage; + var localStorage = config.localStorage, + dirPath = DOM.getCurrentDirPath(); + /* устанавливаем переменную доступности кэша */ Storage.setAllowed(localStorage); /* Устанавливаем кэш корневого каталога */ - var lDirPath = DOM.getCurrentDirPath(); - lDirPath = CloudFunc.rmLastSlash(lDirPath) || '/'; + dirPath = CloudFunc.rmLastSlash(dirPath) || '/'; - if (!Storage.get(lDirPath)) - Storage.set(lDirPath, getJSONfromFileTable()); + if (!Storage.get(dirPath)) + Storage.set(dirPath, getJSONfromFileTable()); }); Util.exec(CloudCmd.Key);