Use standard itemFormat for BBS list. Add docs

This commit is contained in:
Bryan Ashby 2018-11-05 21:08:56 -07:00
parent 8942eff203
commit a98940e967
3 changed files with 5 additions and 10 deletions

View File

@ -315,16 +315,14 @@
} }
bbsList: { bbsList: {
config: {
listFormat: "|00|07{bbsName}"
focusListFormat: "|00|19|15{bbsName!styleFirstLower}"
}
0: { 0: {
mci: { mci: {
VM1: { VM1: {
height: 11 height: 11
width: 22 width: 22
focusTextStyle: first upper focusTextStyle: first upper
itemFormat: "|00|07{bbsName}"
focusItemFormat: "|00|19|15{bbsName!styleFirstLower}"
} }
TL2: { width: 28 } TL2: { width: 28 }
TL3: { width: 28 } TL3: { width: 28 }

View File

@ -218,12 +218,7 @@ exports.getModule = class BBSListModule extends MenuModule {
} }
setEntries(entriesView) { setEntries(entriesView) {
const config = this.menuConfig.config; return entriesView.setItems(this.entries);
const listFormat = config.listFormat || '{bbsName}';
const focusListFormat = config.focusListFormat || '{bbsName}';
entriesView.setItems(this.entries.map( e => stringFormat(listFormat, e) ) );
entriesView.setFocusItems(this.entries.map( e => stringFormat(focusListFormat, e) ) );
} }
displayBBSList(clearScreen, cb) { displayBBSList(clearScreen, cb) {
@ -277,6 +272,7 @@ exports.getModule = class BBSListModule extends MenuModule {
(err, row) => { (err, row) => {
if (!err) { if (!err) {
self.entries.push({ self.entries.push({
text : row.bbs_name, // standard field
id : row.id, id : row.id,
bbsName : row.bbs_name, bbsName : row.bbs_name,
sysOp : row.sysop, sysOp : row.sysop,

View File

@ -69,6 +69,7 @@
- [User List]({{ site.baseurl }}{% link modding/user-list.md %}) - [User List]({{ site.baseurl }}{% link modding/user-list.md %})
- [Message Conference List]({{ site.baseurl }}{% link modding/msg-conf-list.md %}) - [Message Conference List]({{ site.baseurl }}{% link modding/msg-conf-list.md %})
- [Message Area List]({{ site.baseurl }}{% link modding/msg-area-list.md %}) - [Message Area List]({{ site.baseurl }}{% link modding/msg-area-list.md %})
- [BBS List]({{ site.baseurl }}{% link modding/bbs-list.md %})
- Administration - Administration
- [oputil]({{ site.baseurl }}{% link admin/oputil.md %}) - [oputil]({{ site.baseurl }}{% link admin/oputil.md %})