2015-06-25 04:45:21 +00:00
|
|
|
/* jslint node: true */
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var MenuModule = require('../core/menu_module.js').MenuModule;
|
|
|
|
|
2015-06-25 05:09:26 +00:00
|
|
|
var async = require('async');
|
|
|
|
var assert = require('assert');
|
|
|
|
var _ = require('lodash');
|
|
|
|
|
2015-06-25 05:12:03 +00:00
|
|
|
// :TODO: rename to fse.js & FullScreenEditor
|
|
|
|
|
2015-06-25 04:45:21 +00:00
|
|
|
exports.getModule = MessageEditorModule;
|
|
|
|
|
|
|
|
exports.moduleInfo = {
|
|
|
|
name : 'Message Editor',
|
|
|
|
desc : 'A module for editing messages',
|
|
|
|
author : 'NuSkooler',
|
|
|
|
};
|
|
|
|
|
2015-06-25 05:09:26 +00:00
|
|
|
function MessageEditorModule(options) {
|
|
|
|
MenuModule.call(this, options);
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
var args = options.menuConfig.args;
|
|
|
|
|
|
|
|
this.initSequence = function() {
|
|
|
|
async.waterfall(
|
|
|
|
[
|
|
|
|
function beforeDisplayArt(callback) {
|
|
|
|
self.beforeArt();
|
|
|
|
callback(null);
|
|
|
|
},
|
|
|
|
function displayHeader(callback) {
|
|
|
|
if(_.isString(args.art.header)) {
|
|
|
|
self.displayArtAsset(args.art.header, function hdrDisplayed(err, mciMap) {
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2015-06-25 05:12:03 +00:00
|
|
|
|
|
|
|
callback(null);
|
|
|
|
},
|
|
|
|
function displayBody(callback) {
|
|
|
|
|
|
|
|
},
|
|
|
|
function displayFooter(callback) {
|
|
|
|
|
2015-06-25 05:09:26 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
);
|
|
|
|
};
|
2015-06-25 04:45:21 +00:00
|
|
|
}
|
|
|
|
|
2015-06-25 05:09:26 +00:00
|
|
|
require('util').inherits(MessageEditorModule, MenuModule);
|
|
|
|
|
|
|
|
MessageEditorModule.prototype.enter = function(client) {
|
|
|
|
MessageEditorModule.super_.prototype.enter.call(this, client);
|
|
|
|
};
|
|
|
|
|