enigma-bbs/mods/menu.json

127 lines
2.3 KiB
JSON
Raw Normal View History

{
/*
Menu Configuration
Some concept/ideas:
"mci" : {
"BN1" : {
...
"draw" : "@script:blah.js/drawButton"
// @method:scriptName[.js]/methodName (foreign .js)
// @art:artName
// @method:/methodName (local to module.js)
"draw" : {
"normal" : ...,
"focus" : ...
}
..note that script/methods should be part of a *theme* - or at least checked first with fallback
}
}
*/
"matrix" : {
"art" : "matrix",
"form" : {
"0" : {
"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" : {
"art" : "login", // TODO: rename to login_form
"module" : "login",
"form" : {
"0" : {
"BN3BN4ET1ET2TL5" :{
"mci" :{
"ET1" : {
"focus" : true
},
"BN3" : {
"submit" : true,
"text" : "Login"
},
"BN4" : {
"submit" : true,
"text" : "Cancel"
}
},
2015-03-31 15:03:47 +00:00
"submit" : {
"3" : [ // Login
2015-03-31 15:03:47 +00:00
{
"value" : { "3" : null },
"action" : "@method:attemptLogin",
"args" : { "username" : "{1}", "password" : "{2}" } // :TODO: rename to actionArgs ?
}
],
"4" : [ // cancel
{
"value" : { "4" : null },
"action" : "@menu:matrix"
2015-03-31 15:03:47 +00:00
}
]
}
}
}
},
"options" : {
"clearScreen" : true
}
},
"logoff" : {
"art" : "logoff",
"module" : "logoff"
2015-04-07 04:29:45 +00:00
},
"apply" : {
"art" : "apply",
"module" : "apply",
"form" : {
"0" : {
"BN13BN14ET1ET2ET3ET4ET5ET6ET7ET8ET9TL10TL11TL12" : {
2015-04-07 04:29:45 +00:00
"mci" : {
"ET1" : {
"focus" : true
},
"BN13" : {
"text" : "Apply"
},
"BN14" : {
"text" : "Cancel"
2015-04-07 04:29:45 +00:00
}
}
}
}
},
"options" : {
"clearScreen" : true
2015-04-07 04:29:45 +00:00
}
}
}