Table tools buttons not showing after change from to

Table tools buttons not showing after change from to

ov3rhearov3rhear Posts: 4Questions: 0Answers: 0
edited August 2012 in TableTools
I was updating my table tools 2.1.2.dev to the latest 2.1.3 and the buttons were not showing anymore.
I merged all the changes one by one to find the culprit and this is it:

in TableTools.DEFAULTS
before:
"button": ie ? "div" : "button",
after:
"button": "a", // We really want to use buttons here, but Firefox and IE ignore the
// click on the Flash element in the button (but not mouse[in|out]).

the same for the simliar change a few lines after inside the collection.
That's the only change that breaks the button showing. Tried in Chrome and IE.
Any thoughts why would this no longer show the buttons? Maybe I need to include/change something on my datatable configuration?
This is what I have:

"oTableTools": {
"sSwfPath": "Content/copy_csv_xls_pdf.swf",
"aButtons": [{
"sExtends": "xls",
"sToolTip": "Exportar Excel",
"sButtonText": ""
}, {
"sExtends": "pdf",
"sToolTip": "Exportar PDF",
"sButtonText": ""
}]
}
Any help would be appreciated.
Thanks in advance.

Replies

  • ov3rhearov3rhear Posts: 4Questions: 0Answers: 0
    Ok I found out what's wrong.
    First of all, I had only updated the .js, after updating the .css as well I understood what's going on.

    I was using images to show the buttons, and this code in the css is commented out:


    /*
    * BUTTON_STYLES
    * Action specific button styles
    * If you want images - comment this back in

    Thing is, this code is outdated.
    It still contains
    button.DTTT_button_csv
    where it should be
    a.DTTT_button_csv

    For it to show the buttons propertly with the images, you must un-comment this code and either change or add the definitions for a.XXX everywhere that's using button.XXX

    All working fine now, using for the buttons and showing images.
  • sfarrell24sfarrell24 Posts: 1Questions: 0Answers: 0
    Thank you for posting that fix! Worked very well for me after making that "a." change. :)
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Its in the stylesheet for current TableTools distribution. You need to update the stylesheet as well as the Javascript source file.

    Allan
This discussion has been closed.