From 11752787796c4008de852a72a569e8734e06b5d6 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 22 Sep 2015 23:13:06 -0600 Subject: [PATCH] * Some work on NUA * Placeholder for sysop feedback after NUA step --- core/view_controller.js | 8 +- mods/menu.hjson | 220 ++++++++++++++++++++------------ mods/themes/NU-MAYA/NUA.ANS | Bin 2680 -> 2729 bytes mods/themes/NU-MAYA/theme.hjson | 16 +-- 4 files changed, 152 insertions(+), 92 deletions(-) diff --git a/core/view_controller.js b/core/view_controller.js index 4b544969..6acd42c5 100644 --- a/core/view_controller.js +++ b/core/view_controller.js @@ -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 } ); diff --git a/mods/menu.hjson b/mods/menu.hjson index 751f5a92..2c0600a4 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -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 }, diff --git a/mods/themes/NU-MAYA/NUA.ANS b/mods/themes/NU-MAYA/NUA.ANS index a53ce1e3aaf165647e877397ad9232787cd44709..780ad55df79871c214fe52bcfcc3579dd29d2247 100644 GIT binary patch delta 317 zcmew%vQl)zE>;%lXjAja3pr#aA7(Y49LT0WS(wdk@;6pK5e0<}8>FKRa;2jU4V;05 zwXs3&MpM$<6ErlLOd|CqHACn!FiE8*}JS;xGmpB|ABZqYuQL z%*&}4%*(~g1u{WF0c@smu4;&np&`f>K=TZ&jSYbUzJ^91NfV%*AbBtsqywnM*eqA! zAIJo-97JUDZf2PXka4+pz(xR-Y`jAh*r0$-*#?FCyj)Vjj-k%31_qNExjcCk6pRcE QO${uK3^ceVhj6I?0LHR+lK=n! delta 299 zcmZ1}`a@*HF4oBxS#2gKa>!1$VY8de%cehhEt?Ogg2ILk($R(n&Xc*>U1W@%foyAI zgWL@pz~ZJrzJax|VXkzv`D8|R>B;r%#*_Wo4JMxf(wo?&ChKt+PyWxYKe>*h4{WqG zryd7T3sAk0xKmMBc;@Xg1hnLo;X95MM(hkQx)9?I2}f zu0bv@7cZAC5JW2&nJC19SU5oqHW?Xgf>Obbq0X)b29piBytoyN3=B;TER77lb53sM GQUL(Wfl2@X diff --git a/mods/themes/NU-MAYA/theme.hjson b/mods/themes/NU-MAYA/theme.hjson index 233f0b6f..96a03e51 100644 --- a/mods/themes/NU-MAYA/theme.hjson +++ b/mods/themes/NU-MAYA/theme.hjson @@ -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 }