TableTools Printing
TableTools Printing
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]
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]
This discussion has been closed.
Replies
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