{ /* 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 @draw & @art should check theme first. @draw:myMethod -> theme/draw.js::myMethod(opts) } } */ "connected" : { "art" : "CONNECT", "next" : "matrix", "options" : { "cls" : true, "nextTimeout" : 1500 } }, "matrix" : { "art" : "matrix", "form" : { "0" : { // :TODO: Make form "0" the default if missing (e.g. optional)... not sure how with current structure though "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" : { "cls" : true } }, "login" : { // :TODO: may want { "prompt" : { "name" : "blah", "action" : ... }} "prompt" : "userCredentials", "fallback" : "matrix", "next" : "newUserActive", "action" : "@systemMethod:login", // :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" } ], "options" : { "cls" : true } }, "logoff" : { "art" : "LOGOFF", //"module" : "logoff", "action" : "@systemMethod:logoff", "options" : { "cls" : true } }, "apply" : { "art" : "APPLY", "next" : "newUserActive", "form" : { "0" : { "BT12BT13ET1ET10ET2ET3ET4ET5ET6ET7ET8ET9TL11" : { "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" : "password" }, "ET10" : { "argName" : "passwordConfirm" }, "BT12" : { "submit" : true, "text" : "Apply" }, "BT13" : { "submit" : [ "esc" ], "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" } ] } } } }, "options" : { "cls" : true } }, "newUserActive" : { "art" : "STATS", "options" : { // :TODO: implement MCI codes for this "cls" : true } }, "demoMain" : { "art" : "DEMOMAIN", "options" : { "cls" : true }, "form" : { "0" : { "VM1" : { "mci" : { "VM1" : { "items" : [ "Views" ] } } } } } } }