mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(config) add localStorage
This commit is contained in:
parent
9c3a0cd079
commit
0634633101
2 changed files with 10 additions and 6 deletions
|
|
@ -2,6 +2,7 @@
|
|||
"api_url" : "/api/v1",
|
||||
"appcache" : false,
|
||||
"analytics" : true,
|
||||
"localStorage" : true,
|
||||
"minification" : {
|
||||
"js" : true,
|
||||
"css" : true,
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
});
|
||||
});
|
||||
|
||||
/* выделяем строку с первым файлом */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue