refactor(help) constructor -> module.exports

This commit is contained in:
coderaiser 2017-02-15 16:07:24 +02:00
parent 1dfee4eac7
commit 59d501a2f0

View file

@ -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();
}