More itemFormat & doc work
This commit is contained in:
parent
a98940e967
commit
5af2fdc6c5
|
@ -290,13 +290,14 @@
|
|||
}
|
||||
|
||||
mainMenuRumorz: {
|
||||
config: {
|
||||
listFormat: "|00|11 {rumor}"
|
||||
focusListFormat: "|00|15> |14{rumor}"
|
||||
}
|
||||
0: {
|
||||
mci: {
|
||||
VM1: { height: 14, width: 70 }
|
||||
VM1: {
|
||||
height: 14,
|
||||
width: 70
|
||||
itemFormat: "|00|11 {rumor}"
|
||||
focusItemFormat: "|00|15> |14{rumor}"
|
||||
}
|
||||
TM2: {
|
||||
focusTextStyle: upper
|
||||
items: [ "yes", "no" ]
|
||||
|
|
|
@ -8,7 +8,6 @@ const theme = require('./theme.js');
|
|||
const resetScreen = require('./ansi_term.js').resetScreen;
|
||||
const StatLog = require('./stat_log.js');
|
||||
const renderStringLength = require('./string_util.js').renderStringLength;
|
||||
const stringFormat = require('./string_format.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -155,12 +154,13 @@ exports.getModule = class RumorzModule extends MenuModule {
|
|||
});
|
||||
},
|
||||
function populateEntries(entriesView, entries, callback) {
|
||||
const config = self.config;
|
||||
const listFormat = config.listFormat || '{rumor}';
|
||||
const focusListFormat = config.focusListFormat || listFormat;
|
||||
entriesView.setItems(entries.map(e => {
|
||||
return {
|
||||
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();
|
||||
|
||||
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