added RESTfull object to DOM for easy work with CloudCmd REST API

This commit is contained in:
coderaiser 2013-02-27 04:25:32 -05:00
parent 5f12c5e339
commit 2f8f41b50e
3 changed files with 83 additions and 60 deletions

View file

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