TableTools 2.1.5 issue randering Buttons

TableTools 2.1.5 issue randering Buttons

muflomuflo Posts: 11Questions: 0Answers: 0
edited October 2013 in TableTools
Hello there,

I have an issue with as per subject. Table tools 2.1.5 and Datatables 1.9.4.
I'm using Jquery UI but tableTools buttons are not rendered according jquery UI style. If I just change the TableTools version to 2.0.1 everything works fine.

My table initialization is:

[code]
var oTable = $('#mytable').dataTable( {
"bServerSide": true,
"sAjaxSource": "pub/ClassLoader.php?classe=myclass&where=0&controller=Y",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sScrollX": "100%",
"bScrollCollapse": true,


"bSortClasses": false,
"aaSorting": [[ 0, "desc" ]],
"bFilter": true,
"iDisplayLength": 10,

"sDom": 'R<"top"TC><"clear"><"H"fl>t<"F"ip>',



"oTableTools": {
"sSwfPath": "../js/tabletools/swf/copy_csv_xls_pdf.swf",
"aButtons":
[
"copy", "csv", "xls"
]
},


"oColVis": {
"buttonText": "Seleziona colonne" ,
"sAlign": "left"
},

.........
[/code]


The thing that I see is that buttos in 2.0.1 are defined like :

[code]


Copy


... [/code]



and in 2.1.5 they are defined using tag. Can this be the problem? Any way to fix ?



[code]

Copy




[/code]

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Possibly - have you updated the CSS? Please link to a test case.

    Allan
  • muflomuflo Posts: 11Questions: 0Answers: 0
    Hi Allan,

    thanks for this incredible DataTable!
    I have uploaded the entire TableTools new package including CSS folder, deleting first all regarding previus version. I don't Know if this can be relevant: I'm using Jquery 1.5.1 and JQuery UI 1.8.2.
    Unfotunately I cannot link test case as my project is under our Intranet :(
    Any way to force TT to use tag instead of tag?
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    [code]
    TableTools.buttonBase.sTag = 'button';
    [/code]

    Allan
  • muflomuflo Posts: 11Questions: 0Answers: 0
    let me try
  • muflomuflo Posts: 11Questions: 0Answers: 0
    No way! :(

    Where is supposed I put [quote] "TableTools.buttonBase.sTag = 'button';" [/quote] ? I'm initialising tableTools through the sDom.
  • muflomuflo Posts: 11Questions: 0Answers: 0
    Found! Fixed!! Thanks..... :)
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Just put it somewhere in your code before you initialise the table.
  • muflomuflo Posts: 11Questions: 0Answers: 0
    It works, but I discovered that even if I include manually the tabletools.css and tabletools_JUI.css the problem doesn't appear (leaving default buttonBase.sTag). The only issue in this case is the color of button that is black (instead of UI custom blue) due the !important keyword used in tableUI CSS that override that jquery.ui.theme.css"
  • VirgilsEgoVirgilsEgo Posts: 1Questions: 0Answers: 0
    muflo: "Found! Fixed!" Where and how.
This discussion has been closed.