* Start skeleton work on message editor module

This commit is contained in:
Bryan Ashby 2015-06-24 23:09:26 -06:00
parent 30b98e9e3b
commit 8c7d609abb
3 changed files with 41 additions and 4 deletions

View File

@ -432,7 +432,14 @@
},
"demoMessageEditor" : {
"module" : "message_editor",
"options" : { "cls" : true }
"options" : { "cls" : true },
"args" : {
"art" : {
"header" : "MSGHDR",
"body" : "MSGBODY",
"footer" : "MSGFTR"
}
}
}
/*

View File

@ -3,6 +3,10 @@
var MenuModule = require('../core/menu_module.js').MenuModule;
var async = require('async');
var assert = require('assert');
var _ = require('lodash');
exports.getModule = MessageEditorModule;
exports.moduleInfo = {
@ -11,8 +15,34 @@ exports.moduleInfo = {
author : 'NuSkooler',
};
function MessageEditorModule(menuConfig) {
MenuModule.call(this, menuConfig);
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) {
});
}
}
]
);
};
}
require('util').inherits(MessageEditorModule, MenuModule);
require('util').inherits(MessageEditorModule, MenuModule);
MessageEditorModule.prototype.enter = function(client) {
MessageEditorModule.super_.prototype.enter.call(this, client);
};

Binary file not shown.