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-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-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,
|
|
|
|
"argName" : "username"
|
2015-04-10 04:49:56 +00:00
|
|
|
},
|
2015-04-27 02:46:16 +00:00
|
|
|
"ET2" : {
|
|
|
|
"argName" : "realName",
|
|
|
|
"maxLength" : "@config:users.usernameMax"
|
|
|
|
},
|
2015-04-20 04:58:18 +00:00
|
|
|
"ET3" : { "argName" : "age" },
|
|
|
|
"ET4" : { "argName" : "sex" },
|
|
|
|
"ET5" : { "argName" : "location" },
|
2015-04-27 02:46:16 +00:00
|
|
|
"ET6" : {
|
|
|
|
"argName" : "affils",
|
|
|
|
"maxLength" : 30
|
|
|
|
},
|
|
|
|
"ET7" : {
|
|
|
|
"argName" : "email",
|
|
|
|
"maxLength" : 255
|
|
|
|
},
|
|
|
|
"ET8" : {
|
|
|
|
"argName" : "web",
|
|
|
|
"maxLength" : 255
|
|
|
|
},
|
|
|
|
"ET9" : {
|
|
|
|
"argName" : "password",
|
|
|
|
"password" : true
|
|
|
|
},
|
|
|
|
"ET10" : {
|
|
|
|
"argName" : "passwordConfirm",
|
|
|
|
"password" : true,
|
|
|
|
"maxLength" : "@config:users.passwordMax"
|
|
|
|
},
|
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-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-04-28 23:18:02 +00:00
|
|
|
"art" : "demo_main",
|
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",
|
|
|
|
"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-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-27 23:27:23 +00:00
|
|
|
"action" : "@menu:demoMain"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
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
|
|
|
}
|