if create directory command executed - loading spinner would be on top

This commit is contained in:
coderaiser 2013-03-11 08:34:14 -04:00
parent 50a6bd820f
commit bce99f2a65
3 changed files with 34 additions and 26 deletions

View file

@ -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);