cancel
Showing results for 
Search instead for 
Did you mean: 
Liliia_DevX
Sisense Team Member
Sisense Team Member

How to Remove/Hide a Full-Screen Button from the Widget

This article explains how a user can hide, or remove, the 'Full-Screen' button from their widget toolbar. Please note that this button is available for users who are not the dashboard owner. The owners and users with 'Can Design' access to the dashboard will have an 'Edit Widget' button instead.

In order to achieve this, you need to add the JavaScript Code Snippet below to the 'Edit Script' area in the widget edit mode:

Screenshot 2023-05-30 at 17.31.30.png 

The code snippet:

 

 

widget.on('domready', () => {
$(`widget[widgetid='${widget.oid}'] widget-toolbar`).find('button.widget-toolbar-btn--fullscreen').remove()
})

 

 

After the script is saved, the button won't be available for users with 'View' access. 

 

gif.gif

 

Note: the script was developed on the L2023.3 Sisense version. 

Feel free to use it as an example to implement your own solutions! 

 

Disclaimer: Please note, that this blog post contains one possible custom workaround solution for users with similar use cases. We cannot guarantee that the custom code solution described in this post will work in every scenario or with every Sisense software version. As such, we strongly advise users to test solutions in their own environment prior to deploying them to ensure that the solutions proffered function as desired in their environment. For the avoidance of doubt, the content of this blog post is provided to you “as-is” and without warranty of any kind, express, implied or otherwise, including without limitation any warranty of security and or fitness for a particular purpose. The workaround solution described in this post incorporates custom coding which is outside the Sisense product development environment and is therefore not covered by not covered by Sisense warranty and support services.

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

How can I hide a full-screen button from a Tabber widget? This option does not work in a Tabber widget.

Liliia_DevX
Sisense Team Member
Sisense Team Member

Hi,

Please check if the script is applied to the Tabber widget itself or to the specific widget you used in the Tabber code. I assume that each of these widgets could have their own full-screen button. 

For example, for the Tabber widget the code I used (with 'Show title in view mode' toggle on') is on the screenshot below:

Liliia_DevX_1-1686660091848.png

Liliia_DevX_0-1686660021944.png

Liliia_DevX_4-1686660574025.png

 

And the same script could be applied to the widgets you set under widget.tabs in the Tabber code (take the id of the widget and open it in Edit Mode to add the script):

Liliia_DevX_2-1686660201861.png

Liliia_DevX_3-1686660225426.png

Hope it helps to achieve your goal!

gayatrishahane
8 - Cloud Apps
8 - Cloud Apps

How to hide it for the entire dashboard(all widgets) all at once?

ILLIA
Sisense Team Member
Sisense Team Member

Hello!

Please find this dashboard script useful in this case:

dashboard.on('initialized', (dash, args) => {
    dashboard.widgets.$$widgets.forEach(w => {
        w.on('domready', () => {
            $(`widget[widgetid='${w.oid}'] widget-toolbar`).find('button.widget-toolbar-btn--fullscreen').remove()
        })
    })
})

 

Version history
Last update:
‎05-30-2023 08:16 AM
Updated by: