Sample Right menu Image
...
Menu-Items
These are possible properties for all menu-items. These properties should be applied to static menu items. Each property listed can also take a function as long as it returns the type listed.
property | type | default value | restricted values | description | example | ||
---|---|---|---|---|---|---|---|
displayName | string | Text that will be displayed in the menu item. |
| ||||
appId | string |
““ | Used to identify the menu-item and highlighting. |
| |||
string |
““ | The action to take when the user has clicked on the menu item. This string will be ran as JavaScript. |
| |||||||
icon | string |
““ | Icon that will appear to the left of the displayName. |
| |||||
iconType | string |
| Type of icon. This will typically be "class". |
| |||
iconClass | string |
““ | |||
rightIcon | string |
““ | Icon that will appear to the right of the displayName, between the displayName and badge. |
| |||||
rightIconType | string |
| Type of icon. |
| |||
rightIconTooltip | string |
““ | Tooltip that will appear when the mouse cursor hovers over the icon. |
| |||||||
hasBadge | bool |
|
| Adds a badge to the right of the displayName |
| ||||
badgeValue | string or int |
““ | The value that will be displayed within the badge. Can be a number or a string. |
| |||||||
badgeType | string |
|
| Adds color to the badge. Normal is no color, error is red, success is green, focus is blue. |
| ||||
badgeTooltip | string |
““ | Tooltip that will appear when the mouse cursor hovers over the badge. |
| |||||
keepOpen | bool |
|
| Keeps the right-side menu open after clicking on menu item. | |||
classes | string | ““ |
| Hides a menu item on certain devices. Based after pixel length. NOTE: "tablet-hidden" hides on tablet screens and larger. |
| |||||
level | int | 0 | The level of indentation of a menu item. | ||||
order | int | 99 | The order in which menu-items are sorted before being sorted alphabetically. On the main menu: The "End User Apps" divider is -1000, the "System Integrator Apps" divider is 10, the "Advanced Apps" is 9990. In all menu's that include the pre-defined back button, the main divider is set to -1000 and the back button to -1100. | ||||
isDivider | bool | false |
| If set to true, the menu item will be rendered as a divider. In this case only a displayName is required. | |||
ignoreSettings | marker | null |
| If this tag is present, the menu items will not be apply the passed settings to the menu item. (See settings properties below) | |||
JSON formatted string | " |
“ | A dict with 2 properties: startOpen: <true|false> items: List of dicts where each dict is a submenu-item. | Adds a sliding feature that houses a submenu. In axon, This will be a dict that is run through the toJSON() function. NOTE: On desktops this can fit up to 4 sub-menu items before closing the slider becomes difficult. On smaller devices such as phones, 3 is the max. |
|
|
|
|
|
|
|
|
|
|
|
| ||
JSON formatted string | " |
“ | A list of dics. | Adds a bar that is filled based of a percentage. In axon this will be a list of dicts that is ran through the toJSON() function. |
| ||
body | string | " |
“ | string | The contents of the string get added into the menu item as embedded HTML. NOTE: This requires that the ignoreSettings tag is on the menu item. | "<p>This is a paragraph with an image <img src=\"image.png\"></p>" |
Additional Notes
Here are some additional notes on the more complex properties stated above:
...
With the action property three different possible actions exist: opening a new menu, running a function, opening a new app. Each of these action must be a string.
To open a new menu use the FinStack JS function ObtainMenu, formatted as
"window.app.ObtainMenu('username', 'recId', 'appName', settings)"
1. username is the current user logged in. can be found using context() function.
2. recId is the id of a record as a string. The current location can be used by setting this parameter as '{{targetRef}}'
3. appName is name of the menu to be opened. Typically the same as the appId of the menu-item.
4. settings is a dict of properties that will be applied to each menu-item in the new menu.To open an app in the main content window use the FinStack JS function LoadApplication, formatted as
"window.app.LoadApplication('url')"
To open a form or run a axon function use finstack.eval, formated as
"finstack.eval('myForm()')"
Anchor | ||||
---|---|---|---|---|
|
Possible properties for submenus include:
label: equivalent to displayName property for menu-items
icon: same as icon property for menu-items
tooltip: equivalent to iconTooltip property for menu-items
action: same as action property for menu-items
keepOpen: same as keepOpen property for menu-items
Anchor | ||||
---|---|---|---|---|
|
Both properties for progressBars can also be a function as long as they return the correct type:
percent: Sn integer that will also fill in the progress bar.
label: A string that appears above the progress bar.
Settings Properties
The following properties are genereric propties to be include in the settings dictionary when creating a menu item that navigates to a new menu. Generally speaking, funcCall and display are required.
property | type | default value | restricted values | description | example | ||
---|---|---|---|---|---|---|---|
funcCall | string | This should be a function or query that will create/find items that will become menu-items. |
| ||||
header | string |
““ | Every new menu has a header and a back-button that takes the user back to the main menu. This holds the string that will be displayed in the default header, |
| |||
display | string |
|
|
|
|
|
|
| If used instead of displayName, this contain the name of a string property that will found on the menu-items created/ queried by funcCall. |
| |||||
paginateCount | int | 25 | Indicates how many items will be shown before a menu is split into several pages. | ||||
folderPathCount | int | 10 | How many items will show below | ||||
hideBackButton | bool | false |
| Every new menu has a header and a back-button that takes the user back to the main menu. Setting this property will hide both the back button and header. |
The following properties are not required. These properties are used to apply the corresponding property to all items returned in the funcCall (either by a function or a query).
property | type | default value | restricted values | description | example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
action | string | "" |
| The action the menu-item takes when it is clicked. "func:" signifies a function to be ran, "openMenu:" signifies a new menu to be opened, "openApp:" signifies another app to open in the main window. |
| ||||||||
displayFunc | |||||||||||||
orderFunc | |||||||||||||
levelFunc | |||||||||||||
iconTypeFunc | |||||||||||||
iconFunc | |||||||||||||
iconTooltipFunc | |||||||||||||
iconClassFunc | |||||||||||||
rightIconFunc | |||||||||||||
rightIconTypeFunc | |||||||||||||
rightIconTooltipFunc | |||||||||||||
keepOpenFunc | |||||||||||||
hasBadgeFunc | |||||||||||||
badgeTooltipFunc | |||||||||||||
badgeValueFunc | |||||||||||||
badgeTypeFunc | |||||||||||||
progressbarFunc | |||||||||||||
submenuFunc | |||||||||||||
classesFunc |