cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Hide the widget's Button from the Toolbar for Viewer User

We will be learning how to hide information/additional buttons on the widgets from the Viewer user. Also, it is possible to hide these buttons from all users. 

 

Screenshot_35.png

 

For this press the 3 dots in the upper right corner of the dashboard to Edit Script

Screenshot_36.png

 

 In the new window, paste this code and press the 'Save' button in the top right corner.

 

 

dashboard.on('widgetready', function(se, ev){
 if (prism.user.roleName == 'consumer')
{
$('widget-header', element.parent()).children('widget-toolbar').css('display','none');
}
})

 

 

 If we comment on the second line, we can hide these buttons from all users.

 

 

dashboard.on('widgetready', function(se, ev){
// if (prism.user.roleName == 'consumer')
{
$('widget-header', element.parent()).children('widget-toolbar').css('display','none');
}
})

 

 

Now you know how to hide the additional/information buttons from the widgets using simple JavaScript.

Rate this article:
Comments
antoniooce7
7 - Data Storage
7 - Data Storage

This does not work in the Tabber widget.

lesleycarron
7 - Data Storage
7 - Data Storage

can i hide the dashboard header so that a user does not see it when opening an accordion dashboard?

i do not want the user to access the "data  analytics" options so that they can do other things.  i just want them to see the accordion dashboard and be able to download it.  that is it

Version history
Last update:
‎03-29-2023 03:07 PM
Updated by:
Contributors