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

View file

@ -72,10 +72,34 @@
messageAreaViewPost: { messageAreaViewPost: {
0: { 0: {
mci: { mci: {
TL1: { width: 19, textOverflow: "..." } TL1: {
TL2: { width: 19, textOverflow: "..." } width: 19
TL3: { width: 19, textOverflow: "..." } textOverflow: ...
TL5: { 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 } //TL4: { width: 25 }
} }
} }
1: {
mci: {
MT1: { height: 14 }
}
}
} }
messageAreaReplyPost: { messageAreaReplyPost: {
@ -100,6 +129,13 @@
TL4: { width: 25, textOverflow: "..." } TL4: { width: 25, textOverflow: "..." }
} }
} }
1: {
mci: {
HM1: {
focusTextStyle: first lower
}
}
}
} }
} }
} }