mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
refactor(help) constructor -> module.exports
This commit is contained in:
parent
1dfee4eac7
commit
59d501a2f0
1 changed files with 26 additions and 23 deletions
|
|
@ -1,31 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
/* global DOM, CloudCmd */
|
||||
/* global CloudCmd */
|
||||
|
||||
window.CloudCmd.Help = HelpProto;
|
||||
CloudCmd.Help = HelpProto;
|
||||
|
||||
function HelpProto() {
|
||||
const Images = DOM.Images;
|
||||
const Help = this;
|
||||
Images.show.load('top');
|
||||
show();
|
||||
|
||||
function init() {
|
||||
Images.show.load('top');
|
||||
Help.show();
|
||||
}
|
||||
|
||||
this.show = () => {
|
||||
CloudCmd
|
||||
.Markdown
|
||||
.show('/HELP.md', {
|
||||
positionLoad : 'top',
|
||||
relative : true
|
||||
});
|
||||
};
|
||||
|
||||
this.hide = () => {
|
||||
CloudCmd.View.hide();
|
||||
};
|
||||
|
||||
init();
|
||||
return exports;
|
||||
}
|
||||
|
||||
const {Images} = require('./dom');
|
||||
|
||||
module.exports.show = show;
|
||||
module.exports.hide = hide;
|
||||
|
||||
function show() {
|
||||
const positionLoad = 'top';
|
||||
const relative = true;
|
||||
|
||||
CloudCmd
|
||||
.Markdown
|
||||
.show('/HELP.md', {
|
||||
positionLoad,
|
||||
relative,
|
||||
});
|
||||
}
|
||||
|
||||
function hide() {
|
||||
CloudCmd.View.hide();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue