Both sides previous revisionPrevious revisionNext revision | Previous revision |
protogrid:locally_hide_ui_elements [2018-03-21 20:36] – dru | protogrid:locally_hide_ui_elements [2022-04-14 23:19] (current) – dru |
---|
====== Locally Hide UI Elements ====== | ====== Locally Hide UI Elements (aka "Demo Mode") ====== |
| |
This article explains how to locally hide UI elements like [[notifications]], [[protogrid:tableview_actions|TableView actions]] or [[protogrid:card_menu|Card menu]] entries. | This article explains how to locally hide UI elements like [[notifications]], [[protogrid:tableview_actions|TableView actions]] or [[protogrid:card_menu|Card menu]] entries. |
To reduce distractions for less experienced users you could add the following code to the bottom of a newly created [[protogrid:script_library|Client Script Library]]: | To reduce distractions for less experienced users you could add the following code to the bottom of a newly created [[protogrid:script_library|Client Script Library]]: |
<code javascript> | <code javascript> |
mod_csl_helpers().locally_hide_elements(["warning", "error", "export_csv"]); | mod_csl_helpers().locally_hide_elements(["warning", "error"]); |
</code> | </code> |
| |
Then create a [[protogrid:trigger| Trigger]] which refers to the above prepared [[protogrid:script_library|Client Script Library]] and place that [[protogrid:trigger| Trigger]] somewhere on your [[Default Card]]. This ensures that your hide settings immediately take effect in the browser of every logging in user. | Then create a [[protogrid:trigger| Trigger]] which refers to the above prepared [[protogrid:script_library|Client Script Library]] and place that [[protogrid:trigger| Trigger]] somewhere on your [[Default Card]]. This ensures that your hide settings immediately take effect in the browser of every user opening your application. |
| |
| |
"warning" // (hides all yellow notifications) | "warning" // (hides all yellow notifications) |
"error" // (hides red notifications) | "error" // (hides red notifications) |
| "support_chat" // (hides the chat option at the bottom right) |
</code> | </code> |
| |
== Card Menu == | == Card Menu == |
<code javascript> | <code javascript> |
"open_proto" // Open Proto | "open_proto" // Open Proto |
"print_card" // Print | "card_properties" // Show Properties |
"card_properties" // Show Properties | "card_mutation_history" // Show Mutation History |
"trash_single" // Put to Trash | "trash_single" // Put to Trash |
"to_menu" // Put Selected Into Menu ... | "to_menu" // Put Selected Into Menu ... |
</code> | </code> |
| |
"trash_multiple" // Put Selected To Trash | "trash_multiple" // Put Selected To Trash |
"card_update" // Update Selected | "card_update" // Update Selected |
"import_csv" // Import Spreadsheet | |
"export_csv" // Export Selected as Spreadsheet | |
</code> | </code> |