Hide the widget's Button from the Toolbar for Viewer User
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.
2 comments
lesleycarron
·3 years agocan 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
antoniooce7
·3 years agoThis does not work in the Tabber widget.