* More work on theming

This commit is contained in:
Bryan Ashby 2015-10-06 21:21:13 -06:00
parent 73952a2c37
commit a3ba9b0252
3 changed files with 92 additions and 75 deletions

View File

@ -296,15 +296,23 @@ function applyThemeCustomization(options) {
}
if(themeConfig.mci) {
console.log('>>>>>>>>>>>>>>>>>>>>>>> ' + options.name)
Object.keys(themeConfig.mci).forEach(function mciEntry(mci) {
_.defaults(options.mci[mci], themeConfig.mci[mci]);
// :TODO: a better way to do this?
if(options.mci[mci]) {
_.defaults(options.mci[mci], themeConfig.mci[mci]);
} else {
options.mci[mci] = themeConfig.mci[mci];
}
});
}
if(themeConfig.config) {
Object.keys(themeConfig.config).forEach(function confEntry(conf) {
_.defaultsDeep(options.config[conf], themeConfig.config[conf]);
if(options.config[conf]) {
_.defaultsDeep(options.config[conf], themeConfig.config[conf]);
} else {
options.config[conf] = themeConfig.config[conf];
}
});
}
}

View File

@ -582,38 +582,22 @@
editorMode: view
editorType: area
},
"form" : {
"0" : {
"mci" : {
"TL1" : {
// "width" : 27
},
"TL2" : {
// "width" : 27
},
"TL3" : {
//"width" : 27,
//"textOverflow" : "..."
},
"TL5" : {
// "width" : 27
},
"MA5" : {
"width" : 27,
"textOverflow" : "..."
form: {
0: {
mci: {
// :TODO: ensure this block isn't even req. for theme to apply...
}
}
1: {
mci: {
MT1: {
width: 79
//"height" : 14,
mode: preview
}
}
},
"1" : {
"mci" : {
"MT1" : {
"width" : 79,
"height" : 14,
"mode" : "preview"
}
},
"submit" : {
"*" : [
submit: {
*: [
{
"value" : "message",
"action" : "@method:editModeEscPressed"
@ -645,15 +629,15 @@
// :TODO: (#)Jump/(L)Index (msg list)/Last
items: [
// (P)revious
Prev
prev
// (N)ext
Next
next
// (R)reply
Reply
reply
// (Q)uit (ESC)
Quit
quit
// (?)Help
Help
help
]
}
},
@ -795,7 +779,7 @@
HM: {
mci: {
HM1: {
items: [ "Save", "Discard", "Quote", "Help" ]
items: [ "save", "discard", "quote", "help" ]
}
}
@ -895,30 +879,23 @@
editorMode: edit
editorType: area
},
"form" : {
"0" : {
form: {
0: {
mci: {
TL1: {
//width: 27
argName: from
argName: from
}
ET2: {
//width: 27
argName: to
focus: true
argName: to
focus: true
text: All
}
"ET3" : {
//"width" : 27,
"argName" : "subject",
"maxLength" : 72,
"submit" : true
},
"MA5" : {
//"width" : 27,
//"textOverflow" : "..."
ET3: {
argName: subject
maxLength: 72
submit: true
}
},
}
"submit" : {
"3" : [
{
@ -927,21 +904,21 @@
}
]
}
},
"1" : {
}
1: {
"mci" : {
MT1: {
width: 79
height: 14
argName: message
mode: edit
width: 79
argName: message
mode: edit
}
}
submit: {
*: [ { "value": "message", "action": "@method:editModeEscPressed" } ]
},
"actionKeys" : [
actionKeys: [
{
"keys" : [ "escape" ],
"viewId" : 1
@ -964,8 +941,8 @@
"HM" : {
"mci" : {
"HM1" : {
// :TODO: Continue, Save, Discard, Clear, Quote, Help
"items" : [ "Save", "Discard", "Quote", "Help" ]
// :TODO: clear
"items" : [ "save", "discard", "help" ]
}
},
"submit" : {
@ -977,13 +954,9 @@
{
"value" : { "1" : 1 },
"action" : "@menu:messageArea"
},
}
{
value: { 1: 2 },
action: @method:editModeQuote
},
{
"value" : { "1" : 3 },
"value" : { "1" : 2 },
"action" : "@method:editModeMenuHelp"
}
]

View File

@ -72,10 +72,34 @@
messageAreaViewPost: {
0: {
mci: {
TL1: { width: 19, textOverflow: "..." }
TL2: { width: 19, textOverflow: "..." }
TL3: { width: 19, textOverflow: "..." }
TL5: { width: 19, textOverflow: "..." }
TL1: {
width: 19
textOverflow: ...
}
TL2: {
width: 19
textOverflow: ...
}
TL3: {
width: 19
textOverflow: ...
}
TL5: {
width: 19
textOverflow: ...
}
}
}
1: {
mci: {
MT1: { height: 14 }
}
}
4: {
mci: {
HM1: {
focusTextStyle: first upper
}
}
}
}
@ -89,6 +113,11 @@
//TL4: { width: 25 }
}
}
1: {
mci: {
MT1: { height: 14 }
}
}
}
messageAreaReplyPost: {
@ -100,6 +129,13 @@
TL4: { width: 25, textOverflow: "..." }
}
}
1: {
mci: {
HM1: {
focusTextStyle: first lower
}
}
}
}
}
}