2015-03-24 05:12:19 +00:00
|
|
|
{
|
2015-03-26 05:23:14 +00:00
|
|
|
/*
|
|
|
|
Menu Configuration
|
2015-04-04 20:41:04 +00:00
|
|
|
|
|
|
|
Some concept/ideas:
|
|
|
|
"mci" : {
|
2015-04-16 04:46:45 +00:00
|
|
|
"BT1" : {
|
2015-04-04 20:41:04 +00:00
|
|
|
...
|
|
|
|
"draw" : "@script:blah.js/drawButton"
|
2015-04-05 07:15:04 +00:00
|
|
|
// @method:scriptName[.js]/methodName (foreign .js)
|
|
|
|
// @art:artName
|
|
|
|
// @method:/methodName (local to module.js)
|
2015-04-19 08:13:13 +00:00
|
|
|
// ... pass isFocused/etc. into draw method
|
2015-04-05 07:15:04 +00:00
|
|
|
"draw" : {
|
|
|
|
"normal" : ...,
|
|
|
|
"focus" : ...
|
|
|
|
}
|
2015-04-10 04:49:56 +00:00
|
|
|
|
2015-04-21 04:50:58 +00:00
|
|
|
NOte that @draw & @art should check theme first.
|
|
|
|
@draw:myMethod -> theme/draw.js::myMethod(opts)
|
|
|
|
|
2015-05-01 04:29:24 +00:00
|
|
|
priority:
|
|
|
|
@draw:location.js/myMethod -> outside of theme
|
|
|
|
@draw:myMethod -> checks theme -> local first
|
|
|
|
|
|
|
|
-OR- just inside themes for customization...
|
|
|
|
e.g;
|
|
|
|
{
|
|
|
|
"myTheme" {
|
|
|
|
"views" : {
|
|
|
|
"VerticalMenuView" : {
|
|
|
|
"draw" : "@method:location.js/myMethod"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-04 20:41:04 +00:00
|
|
|
}
|
|
|
|
}
|
2015-03-26 05:23:14 +00:00
|
|
|
*/
|
2015-04-19 08:13:13 +00:00
|
|
|
"connected" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"art" : "CONNECT",
|
2015-04-19 08:13:13 +00:00
|
|
|
"next" : "matrix",
|
|
|
|
"options" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"cls" : true,
|
2015-04-19 08:13:13 +00:00
|
|
|
"nextTimeout" : 1500
|
|
|
|
}
|
|
|
|
},
|
2015-03-24 05:12:19 +00:00
|
|
|
"matrix" : {
|
|
|
|
"art" : "matrix",
|
2015-04-02 04:13:29 +00:00
|
|
|
"form" : {
|
2015-04-24 05:00:48 +00:00
|
|
|
"0" : { // :TODO: Make form "0" the default if missing (e.g. optional)... not sure how with current structure though
|
2015-04-02 04:13:29 +00:00
|
|
|
"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" ]
|
|
|
|
}
|
2015-03-30 03:47:48 +00:00
|
|
|
},
|
2015-04-02 04:13:29 +00:00
|
|
|
"submit" : {
|
|
|
|
"*" : [
|
|
|
|
{
|
|
|
|
"value" : { "1" : 0 },
|
2015-04-05 07:15:04 +00:00
|
|
|
"action" : "@menu:login"
|
2015-04-02 04:13:29 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"value" : { "1" : 1 },
|
2015-04-05 07:15:04 +00:00
|
|
|
"action" : "@menu:apply"
|
2015-04-02 04:13:29 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"value" : { "1" : 2 },
|
2015-04-05 07:15:04 +00:00
|
|
|
"action" : "@menu:logoff"
|
2015-04-02 04:13:29 +00:00
|
|
|
}
|
|
|
|
]
|
2015-03-30 03:47:48 +00:00
|
|
|
}
|
2015-04-02 04:13:29 +00:00
|
|
|
}
|
2015-03-27 04:58:22 +00:00
|
|
|
}
|
2015-04-10 04:49:56 +00:00
|
|
|
},
|
|
|
|
"options" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"cls" : true
|
2015-04-02 04:13:29 +00:00
|
|
|
}
|
2015-03-24 05:12:19 +00:00
|
|
|
},
|
2015-04-05 07:15:04 +00:00
|
|
|
"login" : {
|
2015-04-20 04:58:18 +00:00
|
|
|
// :TODO: may want { "prompt" : { "name" : "blah", "action" : ... }}
|
2015-04-19 08:13:13 +00:00
|
|
|
"prompt" : "userCredentials",
|
|
|
|
"fallback" : "matrix",
|
|
|
|
"next" : "newUserActive",
|
2015-04-21 05:24:15 +00:00
|
|
|
"action" : "@systemMethod:login",
|
2015-04-21 04:50:58 +00:00
|
|
|
|
|
|
|
// :TODO: support alt submit method for prompts
|
|
|
|
// if present, standard filters apply. No need for multiple submit ID's
|
|
|
|
// since a prompt can only utilize one:
|
|
|
|
"submit" : [
|
|
|
|
{
|
|
|
|
"value" : { "1" : "thing" },
|
|
|
|
"action" : "@method:doThings"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
|
2015-04-10 04:49:56 +00:00
|
|
|
"options" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"cls" : true
|
2015-04-04 20:41:04 +00:00
|
|
|
}
|
|
|
|
},
|
2015-03-26 05:23:14 +00:00
|
|
|
"logoff" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"art" : "LOGOFF",
|
|
|
|
//"module" : "logoff",
|
2015-04-21 05:24:15 +00:00
|
|
|
"action" : "@systemMethod:logoff",
|
2015-04-21 04:50:58 +00:00
|
|
|
"options" : { "cls" : true }
|
2015-04-07 04:29:45 +00:00
|
|
|
},
|
|
|
|
"apply" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"art" : "APPLY",
|
2015-04-20 04:58:18 +00:00
|
|
|
"next" : "newUserActive",
|
2015-04-07 04:29:45 +00:00
|
|
|
"form" : {
|
|
|
|
"0" : {
|
2015-04-16 04:46:45 +00:00
|
|
|
"BT12BT13ET1ET10ET2ET3ET4ET5ET6ET7ET8ET9TL11" : {
|
2015-05-01 04:29:24 +00:00
|
|
|
//
|
|
|
|
// :TODO: defaults { width : XX, ... } kinda thing would be nice
|
2015-04-27 02:46:16 +00:00
|
|
|
//
|
|
|
|
// "beforeViewsDraw" : "@method:location.js/myBeforeViewsDraw" -> myBeforeViewsDraw(views)
|
2015-04-07 04:29:45 +00:00
|
|
|
"mci" : {
|
|
|
|
"ET1" : {
|
2015-04-20 04:58:18 +00:00
|
|
|
"focus" : true,
|
2015-05-01 04:29:24 +00:00
|
|
|
"argName" : "username",
|
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : "@config:users.usernameMax"
|
2015-04-10 04:49:56 +00:00
|
|
|
},
|
2015-04-27 02:46:16 +00:00
|
|
|
"ET2" : {
|
2015-05-01 04:29:24 +00:00
|
|
|
"width" : 15,
|
|
|
|
"argName" : "realName",
|
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : 32
|
|
|
|
},
|
|
|
|
"ET3" : {
|
|
|
|
"argName" : "age",
|
|
|
|
"width" : 3,
|
|
|
|
"maxLength" : 3
|
|
|
|
},
|
|
|
|
"ET4" : {
|
|
|
|
"argName" : "sex",
|
|
|
|
"width" : 1,
|
|
|
|
"maxLength" : 1
|
|
|
|
},
|
|
|
|
"ET5" : {
|
|
|
|
"argName" : "location",
|
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : 32
|
2015-04-27 02:46:16 +00:00
|
|
|
},
|
|
|
|
"ET6" : {
|
|
|
|
"argName" : "affils",
|
2015-05-01 04:29:24 +00:00
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : 32
|
2015-04-27 02:46:16 +00:00
|
|
|
},
|
|
|
|
"ET7" : {
|
|
|
|
"argName" : "email",
|
2015-05-01 04:29:24 +00:00
|
|
|
"width" : 15,
|
2015-04-27 02:46:16 +00:00
|
|
|
"maxLength" : 255
|
|
|
|
},
|
|
|
|
"ET8" : {
|
|
|
|
"argName" : "web",
|
2015-05-01 04:29:24 +00:00
|
|
|
"width" : 15,
|
2015-04-27 02:46:16 +00:00
|
|
|
"maxLength" : 255
|
|
|
|
},
|
|
|
|
"ET9" : {
|
2015-05-01 04:29:24 +00:00
|
|
|
"argName" : "password",
|
|
|
|
"password" : true,
|
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : "@config:users.passwordMax"
|
2015-04-27 02:46:16 +00:00
|
|
|
},
|
|
|
|
"ET10" : {
|
2015-05-01 04:29:24 +00:00
|
|
|
"argName" : "passwordConfirm",
|
|
|
|
"password" : true,
|
|
|
|
"width" : 15,
|
|
|
|
"maxLength" : "@config:users.passwordMax"
|
2015-04-27 02:46:16 +00:00
|
|
|
},
|
2015-04-16 04:46:45 +00:00
|
|
|
"BT12" : {
|
2015-04-14 06:19:14 +00:00
|
|
|
"submit" : true,
|
2015-04-10 04:49:56 +00:00
|
|
|
"text" : "Apply"
|
|
|
|
},
|
2015-04-16 04:46:45 +00:00
|
|
|
"BT13" : {
|
2015-04-24 05:00:48 +00:00
|
|
|
"submit" : [ "esc" ],
|
2015-04-10 04:49:56 +00:00
|
|
|
"text" : "Cancel"
|
2015-04-07 04:29:45 +00:00
|
|
|
}
|
2015-04-14 06:19:14 +00:00
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
"12" : [ // Apply
|
|
|
|
{
|
2015-04-24 05:00:48 +00:00
|
|
|
"value" : 12, // :TODO: better, this should be optional; if not present it's a any match
|
2015-04-21 04:50:58 +00:00
|
|
|
"action" : "@method:apply/submitApplication",
|
2015-04-20 04:58:18 +00:00
|
|
|
"extraArgs" : {
|
|
|
|
"inactive" : "userNeedsActivated",
|
|
|
|
"error" : "newUserCreateError"
|
|
|
|
}
|
2015-04-14 06:19:14 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"13" : [ // Cancel
|
|
|
|
{
|
2015-04-21 04:50:58 +00:00
|
|
|
"value" : 13,
|
2015-04-14 06:19:14 +00:00
|
|
|
"action" : "@menu:matrix"
|
|
|
|
}
|
|
|
|
]
|
2015-04-07 04:29:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-04-10 04:49:56 +00:00
|
|
|
},
|
|
|
|
"options" : {
|
2015-04-21 04:50:58 +00:00
|
|
|
"cls" : true
|
2015-04-07 04:29:45 +00:00
|
|
|
}
|
2015-04-16 04:46:45 +00:00
|
|
|
},
|
|
|
|
"newUserActive" : {
|
2015-04-19 08:13:13 +00:00
|
|
|
"art" : "STATS",
|
2015-05-01 04:29:24 +00:00
|
|
|
"prompt" : "pause",
|
2015-04-16 04:46:45 +00:00
|
|
|
"options" : {
|
2015-04-17 04:29:53 +00:00
|
|
|
// :TODO: implement MCI codes for this
|
2015-04-21 04:50:58 +00:00
|
|
|
"cls" : true
|
2015-04-16 04:46:45 +00:00
|
|
|
}
|
2015-04-24 22:54:25 +00:00
|
|
|
},
|
|
|
|
"demoMain" : {
|
2015-05-03 23:35:55 +00:00
|
|
|
"art" : "demo_selection_vm.ans",
|
2015-04-24 22:54:25 +00:00
|
|
|
"options" : { "cls" : true },
|
|
|
|
"form" : {
|
|
|
|
"0" : {
|
|
|
|
"VM1" : {
|
|
|
|
"mci" : {
|
|
|
|
"VM1" : {
|
2015-04-28 23:18:02 +00:00
|
|
|
"items" : [
|
|
|
|
"Single Line Text Editing Views",
|
|
|
|
"Spinner & Toggle Views",
|
2015-05-03 23:35:55 +00:00
|
|
|
"Art Display",
|
2015-04-28 23:18:02 +00:00
|
|
|
"Other"
|
|
|
|
],
|
2015-04-28 23:21:24 +00:00
|
|
|
// :TODO: justify not working??
|
|
|
|
"focusTextStyle" : "small i"
|
2015-04-24 22:54:25 +00:00
|
|
|
}
|
2015-04-25 20:44:48 +00:00
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
"*" : [
|
|
|
|
{
|
|
|
|
"value" : { "1" : 0 },
|
|
|
|
"action" : "@menu:demoEditTextView"
|
2015-04-29 03:15:36 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"value" : { "1" : 1 },
|
|
|
|
"action" : "@menu:demoSpinAndToggleView"
|
2015-05-03 23:35:55 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"value" : { "1" : 2 },
|
|
|
|
"action" : "@menu:demoArtDisplay"
|
2015-04-25 20:44:48 +00:00
|
|
|
}
|
|
|
|
]
|
2015-04-24 22:54:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-04-25 20:44:48 +00:00
|
|
|
},
|
2015-04-27 23:27:23 +00:00
|
|
|
"demoEditTextView" : {
|
|
|
|
"art" : "demo_edit_text_view1.ans",
|
|
|
|
"options" : { "cls" : true },
|
|
|
|
"form" : {
|
|
|
|
"0" : {
|
2015-04-28 04:40:05 +00:00
|
|
|
"BT5ET1ET2ET3ET4" : {
|
2015-04-27 23:27:23 +00:00
|
|
|
"mci" : {
|
|
|
|
"ET1" : {
|
2015-04-28 04:40:05 +00:00
|
|
|
"width" : 20,
|
2015-04-27 23:27:23 +00:00
|
|
|
"maxLength" : 20
|
|
|
|
},
|
|
|
|
"ET2" : {
|
2015-04-28 04:40:05 +00:00
|
|
|
"width" : 20,
|
|
|
|
"maxLength" : 40
|
2015-04-27 23:27:23 +00:00
|
|
|
},
|
|
|
|
"ET3" : {
|
2015-04-28 04:40:05 +00:00
|
|
|
"width" : 20,
|
|
|
|
"fillChar" : "-",
|
|
|
|
// :TODO: fillColor
|
2015-04-27 23:27:23 +00:00
|
|
|
"maxLength" : 20
|
|
|
|
},
|
2015-04-28 04:40:05 +00:00
|
|
|
"ET4" : {
|
|
|
|
"width" : 20,
|
|
|
|
"maxLength" : 20,
|
|
|
|
"password" : true
|
|
|
|
},
|
|
|
|
"BT5" : {
|
|
|
|
"width" : 8,
|
2015-04-28 23:18:02 +00:00
|
|
|
"text" : "< Back",
|
|
|
|
"submit" : [ "esc" ]
|
2015-04-27 23:27:23 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
"*" : [
|
|
|
|
{
|
2015-04-28 23:18:02 +00:00
|
|
|
"value" : 5,
|
2015-04-29 03:15:36 +00:00
|
|
|
"action" : "@menu:demoMain"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"demoSpinAndToggleView" : {
|
|
|
|
"art" : "demo_spin_and_toggle.ans",
|
|
|
|
"options" : { "cls" : true },
|
|
|
|
"form" : {
|
|
|
|
"0" : {
|
|
|
|
"BT8SM1SM2TM3" : {
|
|
|
|
"mci" : {
|
|
|
|
"SM1" : {
|
|
|
|
"items" : [ "Henry Morgan", "François l'Ollonais", "Roche Braziliano", "Black Bart", "Blackbeard" ]
|
|
|
|
},
|
|
|
|
"SM2" : {
|
|
|
|
"items" : [ "Razor 1911", "DrinkOrDie", "TRSI" ]
|
|
|
|
},
|
|
|
|
"TM3" : {
|
2015-05-01 04:29:24 +00:00
|
|
|
"items" : [ "Yarly", "Nowaii" ],
|
|
|
|
"styleSGR1" : { "fg" : 30, "intensity" : 1 },
|
|
|
|
"hotkeys" : { "Y" : 0, "N" : 1 }
|
2015-04-29 03:15:36 +00:00
|
|
|
},
|
|
|
|
"BT8" : {
|
|
|
|
"text" : "< Back",
|
|
|
|
"submit" : [ "esc" ]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
"*" : [
|
|
|
|
{
|
|
|
|
"value" : 8,
|
2015-04-27 23:27:23 +00:00
|
|
|
"action" : "@menu:demoMain"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-05-03 23:35:55 +00:00
|
|
|
},
|
|
|
|
"demoArtDisplay" : {
|
|
|
|
"art" : "demo_selection_vm.ans",
|
|
|
|
"options" : { "cls" : true },
|
|
|
|
"form" : {
|
|
|
|
"0" : {
|
|
|
|
"VM1" : {
|
|
|
|
"mci" : {
|
|
|
|
"VM1" : {
|
|
|
|
"items" : [
|
|
|
|
"Defaults - DOS ANSI",
|
|
|
|
"Defaults - Amiga",
|
|
|
|
"Pause at Term Height"
|
|
|
|
],
|
|
|
|
// :TODO: justify not working??
|
|
|
|
"focusTextStyle" : "small i"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
"*" : [
|
|
|
|
{
|
|
|
|
"value" : { "1" : 0 },
|
|
|
|
"action" : "@menu:demoDefaultsDosAnsi"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"demoDefaultsDosAnsi" : {
|
|
|
|
"art" : "bw_bc.ans",
|
|
|
|
"options" : { "cls" : true }
|
2015-04-27 23:27:23 +00:00
|
|
|
}
|
2015-05-03 23:35:55 +00:00
|
|
|
|
2015-04-27 23:27:23 +00:00
|
|
|
/*
|
2015-04-28 04:40:05 +00:00
|
|
|
:TODO: conceptual simplified menus -- actions/etc. without forms
|
2015-04-28 23:18:02 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
"myMenu" : {
|
|
|
|
"art" : "MENUART",
|
|
|
|
"mci" : { // lack of "form": direct to form:0 {}
|
|
|
|
"VM1" : {
|
|
|
|
"items" : [ "Hello", "Goodbye" ],
|
|
|
|
"action" : "@method:someMethod" // implies { "submit" : true }
|
|
|
|
},
|
|
|
|
"submit" : {
|
|
|
|
// alternate form with filters
|
|
|
|
}
|
2015-04-28 04:40:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
/*
|
2015-04-25 20:44:48 +00:00
|
|
|
"demoEditTextView" : {
|
|
|
|
"art" : "demo_edit_text_view.ans",
|
|
|
|
"options" : { "cls" : true },
|
|
|
|
"form" : {
|
|
|
|
"0" : {
|
2015-04-27 22:04:41 +00:00
|
|
|
"ET1ET2ET3ET5SM4TM6" : {
|
2015-04-27 02:46:16 +00:00
|
|
|
"mci" : {
|
|
|
|
"ET1" : { "maxLength" : 1 },
|
|
|
|
"ET2" : { "maxLength" : 1 },
|
|
|
|
"ET3" : { "maxLength" : 1 },
|
2015-04-27 03:57:23 +00:00
|
|
|
"SM4" : {
|
2015-04-27 22:04:41 +00:00
|
|
|
"items" : [ "One", "Two", "Three", "Four" ]
|
2015-04-27 03:57:23 +00:00
|
|
|
},
|
2015-04-27 02:46:16 +00:00
|
|
|
"ET5" : {
|
|
|
|
"password" : true,
|
|
|
|
"submit" : [ "esc" ],
|
|
|
|
"fillChar" : "#"
|
2015-04-27 22:04:41 +00:00
|
|
|
},
|
|
|
|
"TM6" : {
|
|
|
|
"items" : [ "Yes", "No" ],
|
2015-04-27 23:27:23 +00:00
|
|
|
"hotkeys" : { "Y" : 0, "n" : 1 }
|
2015-04-27 02:46:16 +00:00
|
|
|
}
|
|
|
|
}
|
2015-04-25 20:44:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-03-24 05:12:19 +00:00
|
|
|
}
|
2015-04-27 23:27:23 +00:00
|
|
|
*/
|
2015-03-24 05:12:19 +00:00
|
|
|
}
|