More itemFormat & doc work
This commit is contained in:
parent
a98940e967
commit
5af2fdc6c5
|
@ -290,13 +290,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
mainMenuRumorz: {
|
mainMenuRumorz: {
|
||||||
config: {
|
|
||||||
listFormat: "|00|11 {rumor}"
|
|
||||||
focusListFormat: "|00|15> |14{rumor}"
|
|
||||||
}
|
|
||||||
0: {
|
0: {
|
||||||
mci: {
|
mci: {
|
||||||
VM1: { height: 14, width: 70 }
|
VM1: {
|
||||||
|
height: 14,
|
||||||
|
width: 70
|
||||||
|
itemFormat: "|00|11 {rumor}"
|
||||||
|
focusItemFormat: "|00|15> |14{rumor}"
|
||||||
|
}
|
||||||
TM2: {
|
TM2: {
|
||||||
focusTextStyle: upper
|
focusTextStyle: upper
|
||||||
items: [ "yes", "no" ]
|
items: [ "yes", "no" ]
|
||||||
|
|
|
@ -8,7 +8,6 @@ const theme = require('./theme.js');
|
||||||
const resetScreen = require('./ansi_term.js').resetScreen;
|
const resetScreen = require('./ansi_term.js').resetScreen;
|
||||||
const StatLog = require('./stat_log.js');
|
const StatLog = require('./stat_log.js');
|
||||||
const renderStringLength = require('./string_util.js').renderStringLength;
|
const renderStringLength = require('./string_util.js').renderStringLength;
|
||||||
const stringFormat = require('./string_format.js');
|
|
||||||
|
|
||||||
// deps
|
// deps
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
|
@ -155,12 +154,13 @@ exports.getModule = class RumorzModule extends MenuModule {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function populateEntries(entriesView, entries, callback) {
|
function populateEntries(entriesView, entries, callback) {
|
||||||
const config = self.config;
|
entriesView.setItems(entries.map(e => {
|
||||||
const listFormat = config.listFormat || '{rumor}';
|
return {
|
||||||
const focusListFormat = config.focusListFormat || listFormat;
|
text : e.log_value, // standard
|
||||||
|
rumor : e.log_value,
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
entriesView.setItems(entries.map( e => stringFormat(listFormat, { rumor : e.log_value } ) ) );
|
|
||||||
entriesView.setFocusItems(entries.map(e => stringFormat(focusListFormat, { rumor : e.log_value } ) ) );
|
|
||||||
entriesView.redraw();
|
entriesView.redraw();
|
||||||
|
|
||||||
return callback(null);
|
return callback(null);
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: BBS List
|
||||||
|
---
|
||||||
|
## The BBS List Module
|
||||||
|
The built in `bbs_list` module provides the ability for users to manage entries to other Bulletin Board Systems.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
### Config Block
|
||||||
|
Available `config` block entries:
|
||||||
|
* `youSubmittedFormat`: Provides a format for entries that were submitted (and therefor ediable) by the current user. Defaults to `'{submitter} (You!)'`. Utilizes the same `itemFormat` object as entries described below.
|
||||||
|
|
||||||
|
### Theming
|
||||||
|
The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`) (the BBS list):
|
||||||
|
* `id`: Row ID
|
||||||
|
* `bbsName`: System name. Note that `{text}` also contains this value.
|
||||||
|
* `sysOp`: System Operator
|
||||||
|
* `telnet`: Telnet address
|
||||||
|
* `www`: Web address
|
||||||
|
* `location`: System location
|
||||||
|
* `software`: System's software
|
||||||
|
* `submitter`: Username of entry submitter
|
||||||
|
* `submitterUserId`: User ID of submitter
|
||||||
|
* `notes`: Any additional notes about the system
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Rumorz
|
||||||
|
---
|
||||||
|
## The Rumorz Module
|
||||||
|
The built in `rumorz` module provides a classic interface for users to add and view rumorz!
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Theming
|
||||||
|
The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`) (the rumor list):
|
||||||
|
* `rumor`: The rumor text. Also available in the standard `{text}` field.
|
Loading…
Reference in New Issue