diff --git a/ChangeLog b/ChangeLog index 4c4b04b4..0736f133 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/lib/client.js b/lib/client.js index 1f5887ae..d856dcf8 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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); - }); } }; diff --git a/lib/client/dom.js b/lib/client/dom.js index 5a5df352..f1559716 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -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;' + diff --git a/lib/server.js b/lib/server.js index 8406e2e4..8aaa57ee 100644 --- a/lib/server.js +++ b/lib/server.js @@ -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; diff --git a/lib/util.js b/lib/util.js index 4ee0ed25..e0bf8bf0 100644 --- a/lib/util.js +++ b/lib/util.js @@ -158,7 +158,7 @@ Util = exports || {}; * @param pSubStr */ Util.removeStr = function(pStr, pSubStr){ - return pStr.replace(pSubStr,''); + return pStr.replace(pSubStr, ''); }; /**