removed getting data from Minify cache

This commit is contained in:
coderaiser 2013-01-23 03:21:00 -05:00
parent 1a52543801
commit 1e0430fe3e
5 changed files with 9 additions and 38 deletions

View file

@ -97,6 +97,8 @@ clicked on menu item.
* Added migrate plugin for jquery.
* Removed getting data from Minify cache.
2012.12.12, Version 0.1.8

View file

@ -114,27 +114,16 @@ CloudCmd._editFileName = function(pParent){
lA.contentEditable = true;
KeyBinding.unSet();
var lDocumentOnclick = document.onclick;
/* setting event handler onclick
* if user clicks somewhere keyBinded
* backs
*/
document.onclick = (function(){
DOM.addOneTimeListener('click', function(){
var lA = DOM.getCurrentLink(pParent);
if (lA && lA.textContent !== '..')
lA.contentEditable = false;
KeyBinding.set();
/* backs old document.onclick
* and call it if it was
* setted up earlier
*/
document.onclick = lDocumentOnclick;
Util.exec(lDocumentOnclick);
});
}
};

View file

@ -649,7 +649,8 @@ var CloudCommander, Util,
* maybe we offline, load font from local
* directory
*/
DOM.cssSet({id:'local-droids-font',
DOM.cssSet({
id :'local-droids-font',
element : document.head,
inner : '@font-face {font-family: "Droid Sans Mono";' +
'font-style: normal;font-weight: normal;' +

View file

@ -265,7 +265,7 @@
Util.log('reading ' + lName);
/* watching is file changed */
if(lConfig.appcache)
if(lConfig.appcache)
CloudServer.AppCache.watch(lName);
/* сохраняем указатель на response и имя */
@ -282,43 +282,22 @@
CloudServer.Gzip?(lName+'_gzip') : lName);
Util.log(Path.basename(lName));
var lMinify = CloudServer.Minify;
/* object thet contains information
* about the source of file data
*/
var lFromCache_o = {'cache': true};
/* if cache is empty and Cache allowed and Minify_allowed
* and in Minifys cache is files, so save it to
* CloudServer cache
*/
if(!lFileData && lMinify._allowed){
Util.log('trying to read data from Minify.Cache');
lFromCache_o.cache = false;
if(lMinify.Cache)
lFileData = lMinify.Cache[Path.basename(lName)];
}
var lReadFileFunc_f = CloudServer.getReadFileFunc(lName),
/* если там что-то есть передаём данные в функцию readFile */
lResult = lFileData;
if(lResult){
/* if file readed not from cache -
* he readed from minified cache
*/
lFromCache_o.minify = !lFromCache_o.cache;
Util.log(lName + ' readed from cache');
/* передаём данные с кэша,
* если gzip включен - сжатые
* в обратном случае - несжатые
*/
lReadFileFunc_f(undefined, lFileData, lFromCache_o);
lReadFileFunc_f(undefined, lFileData, {'cache': true});
}
/* if file not in one of caches
* and minimizing setted then minimize it
@ -654,7 +633,7 @@
* @pData - данные
* @pFromCache_o - прочитано с файла,
* или из одного из кешей
* Пример {cache: false, minify: true}
* Пример {cache: false}
*/
var lReadFile = function(pError, pData, pFromCache_o){
var lSrv = CloudServer;

View file

@ -158,7 +158,7 @@ Util = exports || {};
* @param pSubStr
*/
Util.removeStr = function(pStr, pSubStr){
return pStr.replace(pSubStr,'');
return pStr.replace(pSubStr, '');
};
/**