mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(edit) if patch fail - save all
This commit is contained in:
parent
f3ed6e5d41
commit
f9a8e4bb4d
2 changed files with 12 additions and 4 deletions
|
|
@ -116,12 +116,13 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
});
|
||||
};
|
||||
|
||||
this.save = function(pUrl, pData, pCallBack, pQuery){
|
||||
this.save = function(pUrl, pData, pQuery, pCallBack, pError){
|
||||
sendRequest({
|
||||
method : 'PUT',
|
||||
url : CloudFunc.FS + pUrl + (pQuery || ''),
|
||||
data : pData,
|
||||
callback : pCallBack,
|
||||
error : pError,
|
||||
imgPosition : { top: true }
|
||||
});
|
||||
};
|
||||
|
|
@ -174,11 +175,15 @@ var CloudCmd, Util, DOM, CloudFunc;
|
|||
method : p.method,
|
||||
url : p.url,
|
||||
data : lData,
|
||||
error : Images.showError,
|
||||
success : function(pData){
|
||||
success : function(pData) {
|
||||
Images.hideLoad();
|
||||
Util.log(pData);
|
||||
Util.exec(p.callback, pData);
|
||||
},
|
||||
error : function(pData) {
|
||||
Images.showError();
|
||||
Util.log(pData);
|
||||
Util.exec(p.error, pData);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -94,7 +94,10 @@ var CloudCmd, Util, DOM, JsDiff, ace;
|
|||
|
||||
Value = lValue;
|
||||
DOM.setCurrentSize( lLength, lCurrent );
|
||||
DOM.RESTfull.save( lPath, lData, null, lPatch);
|
||||
DOM.RESTfull.save( lPath, lData, lPatch, null, function (){
|
||||
if (lPatch)
|
||||
DOM.RESTfull.save( lPath, lValue);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue