* Use pre-release of string-format with Python like widths/etc.

* Very minor updates to message list
This commit is contained in:
Bryan Ashby 2015-10-09 20:46:28 -06:00
parent 0fd9df3821
commit a6cd6bd3b9
3 changed files with 10 additions and 16 deletions

View File

@ -530,8 +530,7 @@
},
"messageAreaMessageList" : {
"module" : "msg_list",
"art" : "msg_list",
"fallback" : "messageArea",
"art" : "msg_list"
"config" : {
"listType" : "public"
},
@ -556,7 +555,7 @@
},
"actionKeys" : [
{
"keys" : [ "escape" ],
"keys" : [ "escape", "q", "shift + q" ],
"action" : "@menu:messageArea"
}
]
@ -710,11 +709,9 @@
focus: true
}
ET3: {
//width: 27
argName: subject
maxLength: 72
submit: true
//textOverflow: ...
}
TL4: {
// :TODO: this is for RE: line (NYI)
@ -733,10 +730,10 @@
1: {
mci: {
MT1: {
width: 79
height: 14
argName: message
mode: edit
width: 79
height: 14
argName: message
mode: edit
}
}
submit: {
@ -767,7 +764,6 @@
{
value: { 1: 1 }
action: @systemMethod:fallbackMenu
//action: @method:replyDiscard
}
{
value: { 1: 2 },
@ -791,7 +787,6 @@
}
{
keys: [ "d", "shift + d" ]
//action: @method:replyDiscard
action: @systemMethod:fallbackMenu
}
{

View File

@ -112,14 +112,12 @@ MessageListModule.prototype.mciReady = function(mciData, cb) {
function populateList(callback) {
var msgListView = vc.getView(1);
// :TODO: {name!over5}, ...over6, over7... -> "text..." for format()
var msgNum = 1;
msgListView.setItems(_.map(self.messageList, function formatMsgListEntry(mle) {
return '{msgNum} - {subj} {to}'.format( {
return '{msgNum:>4} - {subj:>25} {to:>15}'.format( {
msgNum : msgNum++,
subj : mle.subject,
to : mle.toUsername
to : mle.toUserName
} );
}));
@ -131,6 +129,7 @@ MessageListModule.prototype.mciReady = function(mciData, cb) {
function complete(err) {
if(err) {
// :TODO: log this properly
// :TODO: use fallbackMenuModule() here
self.client.gotoMenuModule( { name : self.menuConfig.fallback } );
console.log(err)
}

View File

@ -17,7 +17,7 @@
"gaze" : "0.5.x",
"mkdirp" : "0.5.x",
"pty.js" : "0.3.x",
"string-format" : "0.5.x",
"string-format" : "davidchambers/string-format#mini-language",
"hjson" : "1.7.x"
},
"engine" : "node >= 0.12.2"