diff --git a/json/config.json b/json/config.json index 5447f706..4b910d41 100644 --- a/json/config.json +++ b/json/config.json @@ -2,6 +2,7 @@ "api_url" : "/api/v1", "appcache" : false, "analytics" : true, + "localStorage" : true, "minification" : { "js" : true, "css" : true, diff --git a/lib/client.js b/lib/client.js index 60bcf060..1583ec2b 100644 --- a/lib/client.js +++ b/lib/client.js @@ -211,12 +211,15 @@ var Util, DOM, CloudFunc, CloudCmd; CloudCmd.KeysPanel = Listeners.initKeysPanel(); - /* устанавливаем переменную доступности кэша */ - Cache.setAllowed(true); - /* Устанавливаем кэш корневого каталога */ - var lDirPath = DOM.getCurrentDirPath(); - if (!Cache.get(lDirPath)) - Cache.set(lDirPath, getJSONfromFileTable()); + CloudCmd.getConfig(function(config) { + var localStorage = config.localStorage; + /* устанавливаем переменную доступности кэша */ + Cache.setAllowed(localStorage); + /* Устанавливаем кэш корневого каталога */ + var lDirPath = DOM.getCurrentDirPath(); + if (!Cache.get(lDirPath)) + Cache.set(lDirPath, getJSONfromFileTable()); + }); }); /* выделяем строку с первым файлом */