Version 8 (modified by ehb, 6 years ago) (diff) |
---|
menu json
- the menu organizes modules
- see genapptest/menu.json for an example
menu help
- help for the menu json can be added for each menu level entry with the "help" : "help text..." name value pair.
- note that the width of these is overridden by a currently fixed value
- it can be adjusted, inform a tool developer
- technically, it is blocked by a 'div' and would be too thin if let to autosize
restricted menu options
- menu options can be restricted to certain users
- you add the tag "restricted" : "groupcode"
- example menu.json fragment
,{ "id" : "beta" ,"restricted" : "somegroupname" ,"label" : "Beta" ,"icon" : "pngs/beta.png" ,"modules" : [ { "id" : "testbeta" ,"label" : "testbeta" } ] }
- in the above case only users with "somegroupname" permission will be given access after login
- example menu.json fragment
- then in appconfig.json, one manually enters user permissions
- in future we plan to add admin control of appconfig.json editing
- N.B.: appconfig.json does not support comments # !
- N.B.: make sure you don't make mistakes in appconfig.json
- verify no comments manually
- $ check_json.pl appconfig.json
- example appconfig.json fragement
,"restricted" : { "somegroupname" : [ "ausername", "anotherusername" ] ,"othergroup" : [ "oneuser" ] }
autorun
- if a menu entry has only one module, it can automatically be run when clicking on the menu item with the "autorun" tag
- behaviour is undefined when more that one module is present
- here is an example with autorun set
... ,{ "id" : "simulate", "label" : "Simulate", "icon" : "pngs/simulate.png", "autorun" : "true", "modules" : [ { "id" : "simulate_1", "label" : "Simulate 1" } ] } ...
startup
- a menu can be the default at startup... i.e. it be as if the user clicked that menu entry with the "startup" tag
- e.g.
... { "id" : "build", "label" : "Build", "icon" : "pngs/build.png", "help" : "build help text", "startup" : "build_1", "modules" : [ { "id" : "build_1", "label" : "Build 1" }, { "id" : "build_2", "label" : "Build 2" } ] }, ...
- "startup" can be combined with "autorun" to provide a welcome page, e.g.
... { "id" : "welcome_menu", "label" : "Welcome!", "icon" : "pngs/noicon.png", "autorun" : "true", "startup" : "welcome", "modules" : [ { "id" : "welcome", "label" : "Welcome" } ] } ...
- e.g.
nobutton
- by default, each module within a menu will have a button to run it
- this option will disable the display of the menu
- this is primarily useful in combination with "autorun" above... (without "autorun", there is no way to run a "nobutton" module)
- e.g.
... { "id" : "welcome_menu", "label" : "Welcome!", "icon" : "pngs/noicon.png", "autorun" : "true", "startup" : "welcome", "modules" : [ { "id" : "welcome", "label" : "Welcome", "nobutton" : "true" } ] } ...
nohidemenu
- by default the sidebar menu hides when a menu button is pressed. this can be overridden for each menu entry with the "nohidemenu" option
- e.g. perhaps for the autorun startup welcome menu you wanted to leave the options present
... { "id" : "welcome_menu", "label" : "Welcome!", "icon" : "pngs/noicon.png", "autorun" : "true", "startup" : "true", "nohidemenu" : "true", "modules" : [ { "id" : "welcome", "label" : "Welcome" } ] } ...
- e.g. perhaps for the autorun startup welcome menu you wanted to leave the options present