fixed double slashes in loaded pathes on client

This commit is contained in:
coderaiser 2012-07-06 10:50:47 -04:00
parent 8c3127013b
commit 5495021900
5 changed files with 12 additions and 12 deletions

View file

@ -39,8 +39,8 @@ var CloudClient={
/* КОНСТАНТЫ*/
/* название css-класа текущего файла*/
CURRENT_FILE :'current-file',
LIBDIR :'/lib',
LIBDIRCLIENT :'/lib/client'
LIBDIR :'/lib/',
LIBDIRCLIENT :'/lib/client/'
};
/*
@ -132,7 +132,7 @@ CloudClient.Cache.clear=(function(){
/* функция обработки нажатий клавишь */
CloudClient.keyBinding=(function(){
/* loading keyBinding module and start it */
CloudClient.jsload(CloudClient.LIBDIRCLIENT+'/keyBinding.js',function(){
CloudClient.jsload(CloudClient.LIBDIRCLIENT+'keyBinding.js',function(){
CloudCommander.keyBinding();
});
});
@ -308,7 +308,7 @@ CloudClient.init=(function()
});
/* загружаем общие функции для клиента и сервера*/
CloudClient.jsload(CloudClient.LIBDIR+'/cloudfunc.js',function(){
CloudClient.jsload(CloudClient.LIBDIR+'cloudfunc.js',function(){
/* берём из обьекта window общий с сервером функционал */
CloudFunc=window.CloudFunc;

View file

@ -7,5 +7,5 @@
"img" : true
},
"server" : true,
"logs" : true
"logs" : false
}

View file

@ -49,6 +49,6 @@
<button>F7 - make dir</button>
<button>F8 - remove</button>
</div>
<script src=/client.js></script>
<script src=client.js></script>
</body>
</html>

View file

@ -9,7 +9,7 @@ console.log('minify.js loaded...');
var fs = require('fs');
var path=require('path');
var MinFolder='./min/';
var MinFolder='min/';
/* function clear MinFolder
* if we could not create
* directory and it is
@ -118,15 +118,15 @@ exports.jsScripts=function jsScripts(pJSFiles_a){
(final_code=final_code
.replace('cloudfunc.js','cloudfunc.min.js')
.replace('keyBinding.js','keyBinding.min.js')
.replace('/lib', MinFolder)
.replace('/lib/client', MinFolder)).length);
.replace('/lib/', MinFolder)
.replace('/lib/client/', MinFolder)).length);
/* minimized file will be in min file
* if it's possible if not -
* in root
*/
minFileName = MinFolder+path.basename(minFileName);
minFileName = MinFolder + path.basename(minFileName);
/* записываем сжатый js-скрипт*/
fs.writeFile(minFileName, final_code, fileWrited(minFileName));
};

View file

@ -163,7 +163,7 @@ CloudServer.Minify={
this.done.html=this._allowed.html?lMinify.html():false;
this.done.css=this._allowed.css?lMinify.cssStyles(this._allowed.img):false;
this.MinFolder=lMinify.MinFolder;
this.MinFolder=lMinify.MinFolder;
}
}),
/* свойство показывающее случилась ли ошибка*/
@ -589,7 +589,7 @@ CloudServer._readDir=function (pError, pFiles)
lIndex = CloudServer.Minify.done.js?lIndex.replace('client.js',
CloudServer.Minify.MinFolder +
'client.min.js')
'/client.min.js')
:lIndex;
lIndex=lIndex.toString().replace('<div id=fm class=no-js>','<div id=fm class=no-js>'+lList);