enigma-bbs/mods/menu.json

144 lines
3.0 KiB
JSON
Raw Normal View History

{
/*
Menu Configuration
Some concept/ideas:
"mci" : {
"BT1" : {
...
"draw" : "@script:blah.js/drawButton"
// @method:scriptName[.js]/methodName (foreign .js)
// @art:artName
// @method:/methodName (local to module.js)
// ... pass isFocused/etc. into draw method
"draw" : {
"normal" : ...,
"focus" : ...
}
..note that script/methods should be part of a *theme* - or at least checked first with fallback
.....why?
}
}
*/
"connected" : {
"art" : "connect",
"next" : "matrix",
"options" : {
"clearScreen" : true,
"nextTimeout" : 1500
}
},
"matrix" : {
"art" : "matrix",
"form" : {
"0" : { // :TODO: Make form "0" the default if missing (e.g. optional)
"VM1" : {
"mci" : {
"VM1" : {
"submit" : true,
"focus" : true,
// :TODO: need a good way to localize these ... Standard Orig->Lookup seems good.
"items" : [ "Login", "Apply", "Log Off" ]
}
},
"submit" : {
"*" : [
{
"value" : { "1" : 0 },
"action" : "@menu:login"
},
{
"value" : { "1" : 1 },
"action" : "@menu:apply"
},
{
"value" : { "1" : 2 },
"action" : "@menu:logoff"
}
]
}
}
}
},
"options" : {
"clearScreen" : true
}
},
"login" : {
// :TODO: may want { "prompt" : { "name" : "blah", "action" : ... }}
"prompt" : "userCredentials",
"fallback" : "matrix",
"next" : "newUserActive",
"action" : "@method:login.js/attemptLogin",
"options" : {
"clearScreen" : true
}
},
"logoff" : {
"art" : "logoff",
"module" : "logoff"
2015-04-07 04:29:45 +00:00
},
"apply" : {
"art" : "apply",
"module" : "apply",
"next" : "newUserActive",
2015-04-07 04:29:45 +00:00
"form" : {
"0" : {
"BT12BT13ET1ET10ET2ET3ET4ET5ET6ET7ET8ET9TL11" : {
2015-04-07 04:29:45 +00:00
"mci" : {
"ET1" : {
"focus" : true,
"argName" : "username"
},
"ET2" : { "argName" : "realName" },
"ET3" : { "argName" : "age" },
"ET4" : { "argName" : "sex" },
"ET5" : { "argName" : "location" },
"ET6" : { "argName" : "affils" },
"ET7" : { "argName" : "email" },
"ET8" : { "argName" : "web" },
"ET9" : { "argName" : "pw" },
"ET10" : { "argName" : "pwConfirm" },
"BT12" : {
"submit" : true,
"text" : "Apply"
},
"BT13" : {
"submit" : true,
"text" : "Cancel"
2015-04-07 04:29:45 +00:00
}
},
"submit" : {
"12" : [ // Apply
{
"value" : { "12" : null },
"action" : "@method:submitApplication",
"extraArgs" : {
"inactive" : "userNeedsActivated",
"error" : "newUserCreateError"
}
}
],
"13" : [ // Cancel
{
"value" : { "13" : null }, // :TODO: allow just "13" (number)
"action" : "@menu:matrix"
}
]
2015-04-07 04:29:45 +00:00
}
}
}
},
"options" : {
"clearScreen" : true
2015-04-07 04:29:45 +00:00
}
},
"newUserActive" : {
"art" : "STATS",
"options" : {
// :TODO: implement MCI codes for this
"clearScreen" : true
}
}
}