* Not much ... few minor changes
This commit is contained in:
parent
9442760679
commit
3be271aab5
|
@ -128,7 +128,7 @@ function logoff(callingMenu, formData, extraArgs) {
|
|||
//
|
||||
client.term.write(
|
||||
ansi.normal() + '\n' +
|
||||
require('crypto').randomBytes(Math.floor(Math.random() * 35) + 10).toString(client.term.outputEncoding) +
|
||||
require('crypto').randomBytes(Math.floor(Math.random() * 65) + 20).toString(client.term.outputEncoding) +
|
||||
'NO CARRIER');
|
||||
|
||||
client.end();
|
||||
|
|
|
@ -521,7 +521,11 @@ ViewController.prototype.loadFromPromptConfig = function(options, cb) {
|
|||
|
||||
ViewController.prototype.loadFromMenuConfig = function(options, cb) {
|
||||
assert(_.isObject(options));
|
||||
assert(_.isObject(options.mciMap));
|
||||
|
||||
if(!_.isObject(options.mciMap)) {
|
||||
cb(new Error('Missing option: mciMap'));
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var formIdKey = options.formId ? options.formId.toString() : '0';
|
||||
|
|
Binary file not shown.
|
@ -266,6 +266,10 @@
|
|||
"value" : { "command" : "C" },
|
||||
"action" : "@menu:messageAreaChangeCurrentArea"
|
||||
},
|
||||
{
|
||||
"value" : { "command" : "L" },
|
||||
"action" : "@menu:messageAreaMessageList"
|
||||
},
|
||||
/*{
|
||||
"value" : { "command" : "A" },
|
||||
"action" : "@method:changeArea"
|
||||
|
@ -312,6 +316,26 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"messageAreaMessageList" : {
|
||||
"module" : "msg_list",
|
||||
"art" : "msg_list",
|
||||
"options" : { "cls" : true },
|
||||
"fallback" : "messageArea",
|
||||
"config" : {
|
||||
|
||||
},
|
||||
"form" : {
|
||||
"0" : {
|
||||
"VM" : {
|
||||
"mci" : {
|
||||
"VM1" : {
|
||||
"height" : 10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// :TODO: messageAreaSelect (change msg areas -> call @systemMethod -> fallback to menu
|
||||
"messageAreaNewPost" : {
|
||||
"module" : "msg_area_post_fse",
|
||||
|
|
|
@ -19,6 +19,20 @@ exports.moduleInfo = {
|
|||
author : 'NuSkooler',
|
||||
};
|
||||
|
||||
/*
|
||||
:TODO:
|
||||
|
||||
Obv/2 has the following:
|
||||
CHANGE .ANS - Message base changing ansi
|
||||
|SN Current base name
|
||||
|SS Current base sponsor
|
||||
|NM Number of messages in current base
|
||||
|UP Number of posts current user made (total)
|
||||
|LR Last read message by current user
|
||||
|DT Current date
|
||||
|TI Current time
|
||||
*/
|
||||
|
||||
function MessageAreaListModule(options) {
|
||||
MenuModule.call(this, options);
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
'use strict';
|
||||
|
||||
var MenuModule = require('../core/menu_module.js').MenuModule;
|
||||
var ViewController = require('../core/view_controller.js').ViewController;
|
||||
|
||||
//var moment = require('moment');
|
||||
var async = require('async');
|
||||
var assert = require('assert');
|
||||
var _ = require('lodash');
|
||||
|
||||
exports.getModule = MessageListModule;
|
||||
|
||||
|
@ -14,20 +20,24 @@ exports.moduleInfo = {
|
|||
//
|
||||
// :TODO:
|
||||
// * Avail data:
|
||||
// To
|
||||
// From
|
||||
// To - {to}
|
||||
// From - {from}
|
||||
// Subject
|
||||
// Date
|
||||
// Status (New/Read)
|
||||
// Message Num (Area)
|
||||
// Message Total (Area)
|
||||
// Message Area desc
|
||||
// Message Area Name
|
||||
// Message Area desc - {areaDesc} / %TL2
|
||||
// Message Area Name - {areaName}
|
||||
//
|
||||
// Ideas
|
||||
// * Module config can define custom formats for items & focused items (inc. Pipe Codes)
|
||||
// * Single list view
|
||||
// * Single list view with advanced formatting (would need textOverflow stuff)
|
||||
// * Multiple LV's in sync with keyboard input
|
||||
// * New Table LV (TV)
|
||||
// *
|
||||
//
|
||||
// See Obv/2, Iniq, and Mystic docs
|
||||
|
||||
function MessageListModule(options) {
|
||||
MenuModule.call(this, options);
|
||||
|
@ -37,3 +47,28 @@ function MessageListModule(options) {
|
|||
|
||||
require('util').inherits(MessageListModule, MenuModule);
|
||||
|
||||
MessageListModule.prototype.mciReady = function(mciData, cb) {
|
||||
var self = this;
|
||||
|
||||
var vc = self.viewControllers.msgList = new ViewController( { client : self.client } );
|
||||
|
||||
async.series(
|
||||
[
|
||||
function callParentMciReady(callback) {
|
||||
MessageListModule.super_.prototype.mciReady.call(this, mciData, callback);
|
||||
},
|
||||
function loadFromConfig(callback) {
|
||||
var loadOpts = {
|
||||
callingMenu : self,
|
||||
mciMap : mciData.menu
|
||||
};
|
||||
|
||||
vc.loadFromMenuConfig(loadOpts, callback);
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
cb(err);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue