TableTools Printing

TableTools Printing

HaydarHaydar Posts: 3Questions: 0Answers: 0
edited January 2010 in Plug-ins
First, let me thank you for all your effort in developing this excellent plugin.

I have a question and a change I made that others might be interested in.

First, I too am worried about my users wondering where the formatting went. And I was worried that they wouldn't read the popup. So I modified the plugin to stay up and then to fade out after the user has hit escape. My method uses the @media to control the visibility of the div on the printout, so it might not be appropriate for everyone.
All I had to do was remove the fadeout/remove statement from the fnFeaturePrint function and put the following line in the fnPrintEnd function.
[code]$(".TableTools_PrintInfo").fadeOut("normal",function(){$(this).remove();});[/code]

Finally, I haven't been able to figure out the syntax for specifying the visibility of the conversion buttons. This application only needs the print feature and I don't want to worry about flash issues.

Here is an example of one of the syntax combinations I have tried. Can you point me in the right direction?
[code]"sDom": 'T<"clear">lfrtip',
"oFeatures": {
"bCsv": false,
"bXls": false,
"bCopy": false,
"bPrint": true
}
[/code]

Replies

  • allanallan Posts: 55,815Questions: 1Answers: 8,815 Site admin
    Hi Haydar,

    Thanks very much for your compliments and also for posting your modification! I think this is a good interaction change to have the option of using, and I'm sure others will be making use of it!

    Regarding your question - the TableTools options should be set just before you initialise your DataTable. So something like:

    [code]
    TableToolsInit.oFeatures = {
    "bCsv": false,
    "bXls": false,
    "bCopy": false,
    "bPrint": true
    };
    $('whatever').dataTable({ ... });
    [/code]
    Regards,
    Allan
  • HaydarHaydar Posts: 3Questions: 0Answers: 0
    Thanks, That worked.
This discussion has been closed.