Menu options
The menu options are declared under "menuDataSource". Menu options are actions that start a certain event in relation to the opened entity. The menu options are normally located with the actions, but can also be placed in the context menu and/or as quick access if desired.
Properties
Property |
Description |
Exanple |
text |
The labelling of the menu option. Translations can also be maintained here. |
"text" : "{{{Projekt.Projekt}}}" oder "text" : "{{{Einsatz.Rebook.Umbuchen}}}" |
onClick |
The function and the parameters that are called in the component are specified here. |
"onClick" : "rebook()" oder "onClick" : "openEditor('parts')" |
icon |
Here you can specify the icon to be displayed next to the caption. You can find the icons on "Font Awesome". |
"icon" : "share-square" |
icons |
If it cannot find a suitable icon, you can superimpose existing icons to create new ones. These are specified as an array. |
"icons" : [ "share-square" , "ban" ] |
show |
Here you can specify a condition when this menu option should be visible. Alternatively, you can also specify a "boolean" directly here. If nothing is specified, the menu option is displayed by default. |
"show" : "!entity.IsNew && entity.IsRebookable" |
inContext |
If the menu option is to be displayed in the context menu, the value "true" must be entered for "inContext". |
"inContext" : true |
floating |
If the menu option is also to be available as quick access, the value "true" must be entered for "floating". |
"floating" : true |
floatingColor |
Here the background colour of the quick access can be customised. The colour can be specified by name (in English) or as hexadecimal. If no colour is specified, the background colour is grey by default. |
"floatingColor" : "blue" oder "floatingColor" : "#039be5" |
floatingHoverAnimation |
If you want to add an animation to the quick access, enter "animated" followed by the name of the animation in the field. You can find examples of animations here. |
"floatingHoverAnimation" : "animated pulse" |
floatingIconColor |
Here the icon colour of the quick access can be customised. The colour can be specified by name (in English) or as hexadecimal. If no colour is specified, the icon colour is white. |
"floatingIconColor" : "blue" oder "floatingIconColor" : "#039be5" |
type |
If you would like to use a ready-made menu option, enter the designation here. This sets certain properties automatically. |
"type" : "save" |
data |
Some prefabricated menu options require additional data or parameters. You enter these additional parameters as a "string" in an "array" called "params". |
"type" : "follow" , "data" : { "params" : [ "planung" ] } |
reevaluate |
Properties whose values are to be redetermined in the meantime, such as text, can be specified here as an array. |
"reevaluate" : [ "text" ] |
shortCut |
Find out more here. |
|
extendedView |
This property specifies whether the action should be hidden by default and can only be shown via a corresponding action. |
"extendedView" : true |
Standard
By specifying a type, you can embed ready-made menu options. The ready-made menu options set properties by default.
save
With these types, a menu option is created in the context menu by default. The properties "icon", "onClick", "text", "floatingColor" and "show" are set automatically.
This menu option is assigned a small tick as an icon. Furthermore, the text of the menu option depends on the translation key "Config.translations.saveLabel". By default, this menu option is found in the context menu, but if you prefer to access it as quick, the default colour value is "#4CAF50", which roughly reflects a light green. The visibility depends on the "RecordRight.CanWrite" property of the respective entity. When this menu option is pressed, the function "save()" is called, which should be implemented in the corresponding component. A special feature of this menu option, should it still be in the context menu, is that it turns light green when you change a property in the window. This menu option can be called up with CTRL and S if it has not been overwritten.
With these types, a menu item is created in the context menu by default. The properties "icon", "onClick", "text", "inContext" and "show" are set.
This menu option is assigned a small envelope as an icon. Furthermore, the text of the menu option depends on the transition key "Config.translations.emailHistory". The visibility depends on whether the entity has already been created. When this menu option is activated, the function "openEmail()" is called, which is already implemented as a global function and opens a sheet with which an email can be written. This menu option can be found in the menu item in the context menu if no further information on the position has been given.
emailhistory
With these types, a menu item is created in the context menu by default. The properties "icon", "onClick", "text", "inContext" and "show" are set.
This menu option is assigned a small box with an arrow pointing upwards as an icon. Furthermore, the text of the menu option depends on the transition key "Config.translations.emailHistory". The visibility depends on whether the entity has already been created. When this menu option is activated, the function "openEmail()" is called with the parameter "true", which is already implemented as a global function and opens a sheet with which the email history can be viewed. This menu option can be found in the menu item in the context menu, if no further information on the position has been given.
follow
With these types, a menu option is created by default for the actions. The properties "icon", "onClick", "text", "reevaluate" and "show" are set.
An eye is assigned to this menu option as an icon. Furthermore, the text of the menu option depends on the translation key "Config.translations.unfollow" or "Config.translations.follow", depending on the situation. The visibility depends on whether the entity has already been created and whether the entity is observable at all. When this menu option is activated, the function "toggleFollow()" is called. A value is required here. If this menu option is activated, the logged-in user is now informed on the start page what has happened to the corresponding entity. Furthermore, the text of this menu option changes when pressed. This menu option can be called up with CTRL, ALT and F if it has not been overwritten.
geomap
With these types, a menu option is created by default for the actions. The properties "icon", "onClick", "text" and "show" are set.
This menu option is assigned a small pin as an icon. Furthermore, the text of the menu option depends on the translation key "Config.translations.addPointToRoute". The visibility depends on whether the entity has already been created. When this menu option is pressed, the function "addToGeomapRoute()" is called. A value is required here. Clicking on this menu option adds another pin to GeoMap. Furthermore, the text of this menu option changes when pressed. This menu option can be called with CTRL, ALT and G if it has not been overwritten.
qrreport
With these types, a menu option is created by default for the actions. The properties "icon", "onClick" and "text" are set.
A printer is assigned to this menu option as an icon. If you click on this menu option in the software, a report is generated. Furthermore, the text of the menu option is "Generate report". A value is needed here. The parameters you need to implement and further information on the subject of reports can be found here.
new
With these types, a menu option is created by default for the actions. The properties "icon" and "text" are set.
This menu option is assigned a plus sign as an icon. Furthermore, the text of the menu option depends on the translation key "Config.translations.newLabel". Furthermore, the text of this menu option changes when it is pressed. This menu option can be called up with CTRL, ALT and N if it has not been overwritten.
delete
With these types, a menu option is created by default for the actions. The properties "icon", "onClick" and "text" are set. Furthermore, the text of this menu option changes when pressed. This menu option can be called up with CTRL, ALT and D if it has not been overwritten.
Shortcuts
It is possible to define shortcuts for individual menu options. Shortcuts have already been stored in the software for the standard menu options. These can be found in the FSM under Settings and the menu item
under
. The shortcuts for the standard menu options can also be overwritten. For the functionality of a shortcut to be executed, the corresponding menu option must also be visible. When configuring the shortcuts, two things must be taken into account:
1) Avoid configuring shortcuts more than once.
2) Do not use shortcuts that are already used by browsers (except CTRL + S, CTRL + ALT + N, CTRL + P).
Define shortcuts
The shortcuts are defined under the property "shortCut". The desired keys are written in a string separated by "+". Each shortcut must contain either "ctrl" or "alt".
"shortCut"
:
"ctrl + alt + n"