Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
protogrid:locally_hide_ui_elements [2018-03-21 20:04] druprotogrid:locally_hide_ui_elements [2020-07-01 23:45] dru
Line 1: Line 1:
-====== Locally Hide Ui Elements ======+====== Locally Hide UI Elements (aka "Demo Mode"======
  
-This article explains how to locally hide UI elements like notifications, [[protogrid:tableview|TableView]] actions or [[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.
  
-You can use the [[protogrid:script_library|Client Script Library]] helper functions "locally_hide_elements" and "locally_unhide_elements" to hide/unhide specific elements.+You can use the [[protogrid:script_library|Client Script Library]] helper functions "locally_hide_elements" and "locally_unhide_elements" to hide/unhide specific UI elements.
  
-For example you could add the following code to the bottom of a newly created [[protogrid:script_library|Client Script Library]]:+Please note: These settings apply only to the UI and must not be used for safety-related purposes. 
 + 
 + 
 +=== Example === 
 +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", "export_csv"]);
 </code> </code>
  
-Now, create a [[protogrid:trigger| Trigger]] which refers to the above created [[protogrid:script_library|Client Script Library]] and place this [[protogrid:trigger| Trigger]] somewhere on your [[Default Card]]. This ensures that your desired settings (whether to show or hide specific UI elements) immediately take effect in the browser of every visiting 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.
  
-==List of hideable UI elements== 
  
-In the notification bar: +=== List of Hideable UI Elements === 
-n bar: + 
-<code> +== Notification Bar == 
-message +<code javascript
-warning +"message           // (hides all blue notifications) 
-error+"warning           // (hides all yellow notifications) 
 +"error             // (hides red notifications) 
 +"support_chat"       // (hides the chat option at the bottom right)
 </code> </code>
  
-In the card menu: +Note: Hidden notifications can still be viewed by clicking on the small hamburger menu in the upper right corner of Protogrid. 
-<code> + 
-print_card +== Card Menu == 
-card_properties +<code javascript
-open_proto +"open_proto"            // Open Proto 
-trash_single +"print_card           // Print 
-to_menu+"card_properties      // Show Properties 
 +"card_mutation_history" // Show Mutation History 
 +"trash_single         // Put to Trash 
 +"to_menu              // Put Selected Into Menu ...
 </code> </code>
  
-In the TableView actions menu: +== TableView Actions Menu == 
-<code> +<code javascript
-import_csv +"trash_multiple    // Put Selected To Trash 
-export_csv +"card_update       // Update Selected 
-trash_multiple +"import_csv"         // Import Spreadsheet 
-card_update+"export_csv"         // Export Selected as Spreadsheet
 </code> </code>
Print/export