Hiding the Widgets' toollbars

Comments

13 comments

  • Avatar
    Malinda Jepsen

    Is there a way to hide the widget toolbar on just one widget on a dashboard?  For example, I would like to hide the toolbar for a tabber widget.

    0
    Comment actions Permalink
  • Avatar
    Michael Becker

    Malinda,

    copy this code to widget's script replace dashboard.on with widget.on. This should do the trick.

    0
    Comment actions Permalink
  • Avatar
    Malinda Jepsen

    Thanks for the quick response!  That works for disabling the menu, but it doesn't actually hide the toolbar and it doesn't disable the "full screen" option.  I'm attaching what I'm seeing by the end user (not in the designer).  I really want to remove that whole title bar space so that widgets line up.




    tabber.png
    0
    Comment actions Permalink
  • Avatar
    Michael Becker

    Then I guess we need to wait for Arik on this one, this was the only idea that came to my mind.

    0
    Comment actions Permalink
  • Avatar
    Galin Nikolov

    My intuition will be to find the html part you want to hide and put display none in the css.

    0
    Comment actions Permalink
  • Avatar
    Stefan

    Hi all, 

    I'm also very interested in hiding the header (title bar) of a widget, but this script doesn't work. Any other ideas?

    1
    Comment actions Permalink
  • Avatar
    Yoni Lerner (Edited )

    Hi,

    Add this script remove the Title Bar on a widget level

    Edit Widget > Options > Edit Script

     

    widget.on('ready', function(se, ev){
    if (prism.user.roleName == 'consumer'){

    $('widget-header, .menu-btn').hide();
    }});

     

    To remove only the options buttons

    widget.on('ready', function(se, ev){
    if (prism.user.roleName == 'consumer'){
    $('widget-header, .menu-btn').children('widget-toolbar').css('display','none');
    }});

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Yoni Lerner

    for applying this only on one or specific widgets use this logic

    widget.on('ready', function(se, ev){ 
    if (prism.user.roleName == 'consumer'){
    $('widget-header', element.parent()).children('widget-toolbar').css('display','none');
    }});
    0
    Comment actions Permalink
  • Avatar
    Glenn Hinkley

    Some odd things are happening when I try to hide a widget's title bar--the title bar for an unrelated widget disappears instead.  At no point does either widget interact with the other.  The one I want to disappear is a simple indicator and the one that is disappearing instead is a Tabber for two sets of three other widgets.

    Also, my limited understanding suggests that the following line is intended to have the title exist while in editing mode.

    if (prism.user.roleName == 'consumer'){

    If this is the case, then another oddity is that the Tabber title is disappearing in editing mode despite this check.

    Should switching to "View Mode" while in the editor trigger this role change?

    Thanks in advance for any assistance

    0
    Comment actions Permalink
  • Avatar
    Andy Chan (Edited )

    Hi Yoni,

    Is it possible to only remove the "Fullscreen" option (per widget, not system-wide)? We want to retain the title and description.

    Thanks

     

    0
    Comment actions Permalink
  • Avatar
    Sam Ovenshine

    Hi Andy,

    This code will hide that button at an individual widget level from viewer and designer users. Tested in 7.1.

    widget.on('ready', function(se, ev) {
    if (prism.user.roleName == 'contributor' || prism.user.roleName == 'consumer') {
    $('span.btn__icon.app-icon.app-icon--general-expand').css('display', 'none');
    }
    });
    0
    Comment actions Permalink
  • Avatar
    Andy Chan

    Thanks Sam.

    Is that specific only to 7.1? It isn't working for 6.7

     

    0
    Comment actions Permalink
  • Avatar
    Paul Furman (Edited )

    Is there anything we have to do differently in 8.0 and 8.1?  The dashboard script does not work.

     

    However, applying the widget script to one widget affects every widget on a dashboard:

    widget.on('ready', function(se, ev){
    if (prism.user.roleName == 'consumer'){
    $('widget-header, .menu-btn').hide();
    }});

    0
    Comment actions Permalink

Please sign in to leave a comment.