chore(client) baseInit: mv vars to top

This commit is contained in:
coderaiser 2014-01-03 10:01:34 +00:00
parent c36428f74f
commit e001f46c98

View file

@ -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);