* Some work on NUA

* Placeholder for sysop feedback after NUA step
This commit is contained in:
Bryan Ashby 2015-09-22 23:13:06 -06:00
parent 6c38ff54d5
commit 1175278779
4 changed files with 152 additions and 92 deletions

View File

@ -245,8 +245,12 @@ function ViewController(options) {
function complete(err) {
// default to highest ID if no 'submit' entry present
if(!submitId) {
// :TODO: fix bug here: If errornous MCI code sare used, we'll reference invalid views -- these should jsut be ignored
self.getView(highestId).submit = true;
var highestIdView = self.getView(highestId);
if(highestIdView) {
highestIdView.submit = true;
} else {
self.client.log.warn( { highestId : highestId }, 'View does not exist');
}
}
cb(err, { initialFocusId : initialFocusId } );

View File

@ -160,6 +160,7 @@
*/
newUserApplication: {
art: NUA
next: newUserFeedbackToSysOp
form: {
0: {
mci: {
@ -179,7 +180,7 @@
ME4: {
argName: sex
maskPattern: A
textStyle: U
textStyle: upper
}
ET5: {
argName: location
@ -224,99 +225,154 @@
error: newUserCreateError
}
}
{
value: { "submission" : 1 }
action: @menu:matrix
}
]
}
actionKeys: [
{
keys: [ "escape" ]
action: @menu:matrix
}
]
}
}
}
"apply" : {
"art" : "APPLY",
"next" : "newUserActive",
"form" : {
"0" : {
"BTBTETETETETETETETETETMETL" : {
"mci" : {
"ET1" : {
"focus" : true,
"argName" : "username",
"maxLength" : "@config:users.usernameMax"
},
"ET2" : {
"argName" : "realName",
"maxLength" : 32
},
"ME3" : {
"argName" : "birthdate",
"maskPattern" : "####/##/##"
},
"ET4" : {
"argName" : "sex",
"maxLength" : 1
},
"ET5" : {
"argName" : "location",
"maxLength" : 32
},
"ET6" : {
"argName" : "affils",
"maxLength" : 32
},
"ET7" : {
"argName" : "email",
"maxLength" : 255
},
"ET8" : {
"argName" : "web",
"maxLength" : 255
},
"ET9" : {
"argName" : "password",
"password" : true,
"maxLength" : "@config:users.passwordMax"
},
"ET10" : {
"argName" : "passwordConfirm",
"password" : true,
"maxLength" : "@config:users.passwordMax"
},
"BT12" : {
"submit" : true,
"text" : "Apply"
},
"BT13" : {
"submit" : [ "escape" ],
"text" : "Cancel"
}
},
"submit" : {
"12" : [ // Apply
{
"value" : 12, // :TODO: better, this should be optional; if not present it's a any match
"action" : "@method:apply/submitApplication",
"extraArgs" : {
"inactive" : "userNeedsActivated",
"error" : "newUserCreateError"
}
}
],
"13" : [ // Cancel
{
"value" : 13,
"action" : "@menu:matrix"
}
]
}
actionKeys: [
newUserFeedbackToSysOp: {
status: Feedback to SysOp
module: msg_area_post_fse
"fallback" : "messageArea", // :TODO: remove once default fallback is in place
config: {
art: {
header: MSGEHDR
body: MSGBODY
footerEditor: MSGEFTR
footerEditorMenu: MSGEMFT
help: MSGEHLP
},
editorMode: edit
editorType: area
},
"form" : {
"0" : {
mci: {
TL1: {
width: 27
argName: from
}
ET2: {
width: 27
argName: to
focus: true
text: All
// :TODO: @systemMethod:getSysOpUsername
// :TODO: readOnly: true
}
"ET3" : {
"width" : 27,
"argName" : "subject",
"maxLength" : 72,
"submit" : true
},
"MA5" : {
"width" : 27,
"textOverflow" : "..."
}
},
"submit" : {
"3" : [
{
keys: [ "escape" ]
viewId: 13
"value" : { "subject" : null },
"action" : "@method:headerSubmit"
}
]
}
},
"1" : {
"mci" : {
MT1: {
width: 79
height: 14
argName: message
mode: edit
}
}
submit: {
*: [ { "value": "message", "action": "@method:editModeEscPressed" } ]
},
"actionKeys" : [
{
"keys" : [ "escape" ],
"viewId" : 1
}
]
},
"2" : {
"TLTL" : {
"mci" : {
"TL1" : {
"width" : 5
},
"TL2" : {
"width" : 4
}
}
}
},
"3" : {
"HM" : {
"mci" : {
"HM1" : {
// :TODO: Continue, Save, Discard, Clear, Quote, Help
"items" : [ "Save", "Discard", "Quote", "Help" ]
}
},
"submit" : {
"*" : [
{
"value" : { "1" : 0 },
"action" : "@method:editModeMenuSave"
},
{
"value" : { "1" : 1 },
"action" : "@menu:messageArea"
},
{
value: { 1: 2 },
action: @method:editModeQuote
},
{
"value" : { "1" : 3 },
"action" : "@method:editModeMenuHelp"
}
]
},
actionKeys: [ // :TODO: Need better name
{
keys: [ "escape" ]
action: @method:editModeEscPressed
}
{
keys: [ "?" ]
action: @method:editModeMenuHelp
}
]
// :TODO: something like the following for overriding keymap
// this should only override specified entries. others will default
/*
"keyMap" : {
"accept" : [ "return" ]
}
*/
}
}
}
},
}
"fullLoginSequenceLoginArt" : {
"art" : "LOGIN",
"options" : { "pause" : true },

Binary file not shown.

View File

@ -57,9 +57,9 @@
}
newUserApplication: {
ET1: { width: 21 }
ET1: { width: 38 }
ET2: { width: 21 }
ET2: { width: 38 }
/*ME3: {
styleSGR1: |00|30|01
@ -68,12 +68,12 @@
}*/
//ET4: { width: 1 }
ET5: { width: 21 }
ET6: { width: 21 }
ET7: { width: 21 }
ET8: { width: 21 }
ET9: { width: 21 }
ET10: { width: 21 }
ET5: { width: 38 }
ET6: { width: 38 }
ET7: { width: 38 }
ET8: { width: 38 }
ET9: { width: 38 }
ET10: { width: 38 }
TM12: {
focusTextStyle: first lower
}