mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
feature(dom) rest: add markdown
This commit is contained in:
parent
a05870e053
commit
b5ba13d257
2 changed files with 29 additions and 16 deletions
|
|
@ -7,9 +7,14 @@ var CloudCmd, Util, DOM;
|
|||
function HelpProto(CallBack){
|
||||
var Key = CloudCmd.Key,
|
||||
Images = DOM.Images,
|
||||
RESTful = DOM.RESTful,
|
||||
Help = this;
|
||||
|
||||
function init() {
|
||||
Images.showLoad({
|
||||
top:true
|
||||
});
|
||||
|
||||
Util.loadOnLoad([
|
||||
CloudCmd.View,
|
||||
Help.show,
|
||||
|
|
@ -24,21 +29,16 @@ var CloudCmd, Util, DOM;
|
|||
DOM.ajax({
|
||||
url : '/HELP.md',
|
||||
success : function (data) {
|
||||
DOM.ajax({
|
||||
method : 'put',
|
||||
url : '/api/v1/markdown',
|
||||
data : data,
|
||||
success : function(result) {
|
||||
var div = DOM.anyload({
|
||||
name : 'div',
|
||||
className : 'help',
|
||||
inner : result
|
||||
});
|
||||
|
||||
Images.hideLoad();
|
||||
|
||||
CloudCmd.View.show(div);
|
||||
}
|
||||
RESTful.markdown(data, function(result) {
|
||||
var div = DOM.anyload({
|
||||
name : 'div',
|
||||
className : 'help',
|
||||
inner : result
|
||||
});
|
||||
|
||||
Images.hideLoad();
|
||||
|
||||
CloudCmd.View.show(div);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue