minor changes

This commit is contained in:
coderaiser 2012-11-06 07:33:45 -05:00
parent 773f72bd5c
commit e8d1e13997
2 changed files with 18 additions and 15 deletions

View file

@ -25,19 +25,20 @@
function indexProcessing(pIndex, pList){
var lReplace_s;
/* если выбрана опция минифизировать скрпиты
* меняем в index.html обычные css на
* минифицированый
*/
if(srv.Minify._allowed.css){
var lReplace_s = '<link rel=stylesheet href="/css/reset.css">';
lReplace_s = '<link rel=stylesheet href="/css/reset.css">';
pIndex = Util.removeStr(pIndex, lReplace_s);
pIndex = pIndex.replace('/css/style.css', srv.Minify.MinFolder + 'all.min.css');
}
pIndex = pIndex.replace('<div id=fm class=no-js>',
'<div id=fm class=no-js>'+ pList);
lReplace_s = '<div id=fm class=no-js>';
pIndex = pIndex.replace(lReplace_s, lReplace_s + pList);
/* меняем title */
pIndex = pIndex.replace('<title>Cloud Commander</title>',
@ -71,7 +72,7 @@
* (usually /) to it.
* argv[1] - is always script name
*/
var lServerDir = path.dirname(process.argv[1]);
var lServerDir = path.dirname(process.argv[1]) + '/';
if( DIR !== lServerDir ){
console.log('current dir: ' + DIR);

View file

@ -116,27 +116,29 @@ CloudServer.Minify = main.minify,
CloudServer.AppCache = main.appcache,
CloudServer.Socket = main.socket;
CloudServer.Socket = main.socket;
/* базовая инициализация */
CloudServer.init = (function(pAppCachProcessing){
var lConfig = this.Config,
lMinify = this.Minify,
lCache = this.Cache,
lAppCache = this.AppCache;
/* Переменная в которой храниться кэш*/
this.Cache.setAllowed(this.Config.cache.allowed);
lCache.setAllowed(lConfig.cache.allowed);
/* Change default parameters of
* js/css/html minification
*/
this.Minify.setAllowed(this.Config.minification);
lMinify.setAllowed(lConfig.minification);
/* Если нужно минимизируем скрипты */
this.Minify._allowed = this.Minify.doit();
var lAppCache = this.AppCache;
lMinify._allowed = lMinify.doit();
/* создаём файл app cache */
if( this.Config.appcache &&
lAppCache &&
this.Config.server )
Util.exec( pAppCachProcessing );
if( lConfig.appcache && lAppCache && lConfig.server )
Util.exec( pAppCachProcessing );
});