Hiding Bootstrap tooltips on Datatables Buttons

Hiding Bootstrap tooltips on Datatables Buttons

yusufozturkyusufozturk Posts: 9Questions: 3Answers: 0
edited August 2016 in Buttons

Hello,

I'm using:
DataTables 1.10.12
JSZip 2.5.0, pdfmake 0.1.18, Buttons 1.2.2, Column visibility 1.2.2, HTML5 export 1.2.2, Print view 1.2.2
FixedColumns 3.2.2

Is anyone know a way to hide "Bootstrap tooltips" from "Column Visibility" and HTML5 Exports?

This is how I use Tooltips:

<span class="fa fa-question-circle datatable-th-info js-datatable-info-tooltip" data-html="true" data-delay='{"show":"500", "hide":"1500"}' title="<b>Friendlyname:</b> Description"></span>

I think in code, there is a function to strip html. Is that possible to change to strip all tooltip?

Here is jsfiddle:
http://jsfiddle.net/yusufozturk/m6zhwsxy/72/

Thanks for help.

Yusuf

Answers

  • yusufozturkyusufozturk Posts: 9Questions: 3Answers: 0
    edited August 2016

    Added jsfiddle.

  • yusufozturkyusufozturk Posts: 9Questions: 3Answers: 0

    Oh I see, I think stripHtml is not working correctly. Maybe need to change Regex for that?

  • yusufozturkyusufozturk Posts: 9Questions: 3Answers: 0

    For Export Options, I used this for stripHtml:

    str.replace( /="(.*?)"/g, '' ).replace( /<[^>]*>/g, '' );
    

    But still cant figure out how to apply this to Colvis.

  • yusufozturkyusufozturk Posts: 9Questions: 3Answers: 0

    I found same stripHTML for Colvis Column Visibility. For people who needs same thing, you need to change like this:

    sTitle.replace(/\n/g," ").replace(/="(.*?)"/g,"").replace(/<[^>]*>/g,"")
    
  • allanallan Posts: 57,737Questions: 1Answers: 9,204 Site admin

    You could set the titleAttr option for the buttons to be an empty string if you don't want them to have a title attribute (which is presumably where the tooltip you mention is coming from).

    Allan

This discussion has been closed.