Missing icons in TableTools for pages in subdirectories

Missing icons in TableTools for pages in subdirectories

tombrowntombrown Posts: 7Questions: 0Answers: 0
edited March 2011 in TableTools
I had an old version of TableTools running with the DataTables on my .NET site and noticed that there was a version 2.0 that was a bit more compact and featured PDF exports, so I decided to upgrade. I did so with no problem on the main page of the site, but there's an issue on sections of the site that are in subfolders: the exporting features work, but the icons do not show up.

To be clear: I can click on the "CSV" button and it exports to a file just fine, but the CSV icon is missing. But only on pages that are in sub-folders of the site.

I felt sure that this must be a CSS issue, so I have gone into the TableTools.css file and messed around with the paths for the image files. No effect.

This seems like such a minor issue but I cannot figure it out!

Replies

  • tombrowntombrown Posts: 7Questions: 0Answers: 0
    Let me add a little more information: I am using the JQuery UI Themeroller styles with Datatables. I believe this is in some way related to the problem. I have discovered that when I apply TableTools styles but not JUI styles, the icons do appear. But of course I need them to appear when I apply both. My whole site uses JUI styles.
  • ricardoericardoe Posts: 1Questions: 0Answers: 0
    edited May 2011
    Hi, I have the same error, but the solution was as follows
    In the line:

    [code]
    if ( this.s.dt.bJUI )
    {
    buttonDef.sButtonClass += " ui-button ui-state-default";
    buttonDef.sButtonClassHover += " ui-button ui-state-default ui-state-hover";
    }
    [/code]

    You have to remove the equal sign (=) because when you apply this class generates an unexpected behavior.

    I think that evaluated css would be something like: "DTTT_button_xls = ui-ui-button-default state" and should be "DTTT_button_xls ui ui-button-state-default"

    Would be something like:


    [code]
    if ( this.s.dt.bJUI )
    {
    buttonDef.sButtonClass + " ui-button ui-state-default";
    buttonDef.sButtonClassHover + " ui-button ui-state-default ui-state-hover";
    }
    [/code]

    Sorry for my English.

    Ricardo.
  • brazbraz Posts: 12Questions: 0Answers: 0
    edited May 2011
    Same problem.
    It would be convenient to have a possibility to display icons in table tools when using jQuery UI
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    @Ricardo: I don't really understand the change that you've made I'm afraid. The removal of the equals sign means that the class names used for jQuery UI will not be added to the buttons and therefore won't be themed.

    @braz: There are two options off the top of my head:

    1. Use CSS and a suitable selector to give the button a background image
    2. Add an IMG tag using the sButtonText property for the button.

    Allan
This discussion has been closed.