mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 00:50:59 +00:00
added RESTfull object to DOM for easy work with CloudCmd REST API
This commit is contained in:
parent
5f12c5e339
commit
2f8f41b50e
3 changed files with 83 additions and 60 deletions
|
|
@ -78,19 +78,7 @@ var CloudCommander, Util, DOM, CloudFunc, CodeMirror;
|
|||
DOM.remove(lCSS, document.head);
|
||||
},
|
||||
'Ctrl-S': function(){
|
||||
CloudCmd.getConfig(function(pConfig){
|
||||
var lURL = pConfig && pConfig.api_url + DOM.getCurrentPath();
|
||||
|
||||
DOM.ajax({
|
||||
method : 'put',
|
||||
url : lURL,
|
||||
data : lEditor.getValue(),
|
||||
error : DOM.Images.showError,
|
||||
success : function(pData){
|
||||
Util.log(pData);
|
||||
}
|
||||
});
|
||||
});
|
||||
DOM.RESTfull.save(DOM.getCurrentPath(), lEditor.getValue());
|
||||
}
|
||||
},
|
||||
readOnly : ReadOnly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue