xpagesxpages-extlib

How to disable the "Dashboard" and "Carousel" default tooltip for the xe:dashboard and xe:carousel controls?


I am trying to disable the "Dashboard" and "Carousel" tooltips that are displayed automatically when hovering over the the xe:dashboard and xe:carousel controls.

enter image description here

I did try adding the following scriptBolck but am still getting the tooltips

    <xp:scriptBlock id="scriptBlock2">
        <xp:this.value><![CDATA[// disable tooltips
           $(document).ready(function(){
              console.log("IN $(document).ready(function(){ ");
              $('[rel=tooltip]').tooltip()          // Init tooltips
              $('[rel=tooltip]').tooltip('disable') // Disable tooltips
              $('[rel=tooltip]').tooltip('enable')  // (Re-)enable tooltips
              $('[rel=tooltip]').tooltip('destroy') // Hide and destroy tooltips
       });]]></xp:this.value>
    </xp:scriptBlock>

Solution

  • It's not a tooltip but a title property on the containing div with the xspDashboard class:

    <div id="view:_id1:layout:contentPanel:dashboardPanel:mainDashboard" class="row xspDashboard" style="background-color: #eeeeee;border-radius: 8px;" title="Dashboard" role="presentation"><div class="xspDashboardInner">
    

    The title is set in DashboardRenderer.java line 163. I tried to set another title using the title property on xe:dashboard but this does not change the attribute but instead prints out the title text directly as you can see in line 161 of the source code. I believe that this is a bug as the renderer uses w.writeText(boardTitle, null); instead of w.writeAttribute("title", boardTitle, null);.

    As a workaround you can clear the title like this:

    $('.xspDashboard').attr("title", "")