mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
if create directory command executed - loading spinner would be on top
This commit is contained in:
parent
50a6bd820f
commit
bce99f2a65
3 changed files with 34 additions and 26 deletions
|
|
@ -23,6 +23,9 @@ and get them out to file system.
|
|||
|
||||
* Fixed bug of multiple call of sockets.
|
||||
|
||||
* If create directory command executed - loading spinner
|
||||
would be on top.
|
||||
|
||||
|
||||
2012.03.01, Version 0.1.9
|
||||
|
||||
|
|
|
|||
46
cloudcmd.js
46
cloudcmd.js
|
|
@ -165,31 +165,33 @@
|
|||
'from now all logs will be writed to log.txt');
|
||||
writeLogsToFile();
|
||||
}
|
||||
}
|
||||
|
||||
if(Config.server)
|
||||
fs.watch(CONFIG_PATH, function(){
|
||||
/* every catch up - calling twice */
|
||||
setTimeout(function() {
|
||||
readConfig();
|
||||
}, 1000);
|
||||
});
|
||||
if(Config.server)
|
||||
fs.watch(CONFIG_PATH, function(){
|
||||
/* every catch up - calling twice */
|
||||
setTimeout(function() {
|
||||
readConfig();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
var lParams = {
|
||||
appcache : appCacheProcessing,
|
||||
minimize : minimize,
|
||||
rest : rest,
|
||||
route : route
|
||||
};
|
||||
|
||||
if(Config.ssl)
|
||||
lParams.ssl = {
|
||||
ca : fs.readFileSync(DIR + 'ssl/sub.class1.server.ca.pem'),
|
||||
key : fs.readFileSync(DIR + 'ssl/ssl.key'),
|
||||
cert : fs.readFileSync(DIR + 'ssl/ssl.crt')
|
||||
var lParams = {
|
||||
appcache : appCacheProcessing,
|
||||
minimize : minimize,
|
||||
rest : rest,
|
||||
route : route
|
||||
};
|
||||
|
||||
server.start(lParams);
|
||||
|
||||
if(Config.ssl)
|
||||
lParams.ssl = {
|
||||
ca : fs.readFileSync(DIR + 'ssl/sub.class1.server.ca.pem'),
|
||||
key : fs.readFileSync(DIR + 'ssl/ssl.key'),
|
||||
cert : fs.readFileSync(DIR + 'ssl/ssl.crt')
|
||||
};
|
||||
|
||||
server.start(lParams);
|
||||
}
|
||||
else
|
||||
Util.log('read error: config.json');
|
||||
}
|
||||
|
||||
function readConfig(pCallBack){
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ var CloudCommander, Util,
|
|||
/* Обьект содержит функции для работы с CloudCmd API */
|
||||
RESTfull = function(){
|
||||
this.delete = function(pUrl, pCallBack){
|
||||
DOM.Images.showLoad();
|
||||
sendRequest({
|
||||
method : 'DELETE',
|
||||
url : CloudFunc.FS + pUrl,
|
||||
|
|
@ -55,7 +54,8 @@ var CloudCommander, Util,
|
|||
method : 'PUT',
|
||||
url : CloudFunc.FS + pUrl,
|
||||
data : pData,
|
||||
callback : pCallBack
|
||||
callback : pCallBack,
|
||||
imgPosition : top
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -79,9 +79,12 @@ var CloudCommander, Util,
|
|||
function sendRequest(pParams){
|
||||
var lRet = Util.checkObjTrue(pParams, ['method']);
|
||||
if(lRet){
|
||||
DOM.Images.showLoad();
|
||||
var p = pParams,
|
||||
lImgPosition = p.imgPosition && p.imgPosition.top;
|
||||
|
||||
DOM.Images.showLoad( lImgPosition );
|
||||
CloudCommander.getConfig(function(pConfig){
|
||||
var p = pParams, lData;
|
||||
var lData;
|
||||
|
||||
if( Util.isString(p.url) )
|
||||
p.url = decodeURI(p.url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue