TableTools 2.0.1

DataTables CDN files for TableTools 2.0.1. This software was originally released on 26th February, 2011.

Release notes

This release of TableTools 2.0.1 brings a number of important bug fixes and minor new features to the suite, making this quite an exciting update. New features include the ability to customise the selection class used for the row selecting options in TableTools, the ability to customise saved PDFs a bit more (title, message, page size and orientation. There is also a new API method (fnResizeButtons and it's companion fnResizeRequired) which will resize Flash buttons if needed (for example if initialised in a hidden element - i.e. a tab). Finally for the new features there is 'bSelectedOnly' for the copy, and save buttons which allows the output to be limited to only selected rows if set to true.

In terms of bug fixes, there are two important fixes: firstly collections could suffer from not being able to save a file more than once in IE, the second fix addresses the use of save buttons in collections which could under certain circumstances cause some browsers to freeze.

There are a number of other smaller changes as well - see the release notes below.

  • New: Added sSelectedClass to the initialisation options and defaults to allow customisation of the class
  • New: Added bSelectedOnly option for buttons which make use of fnGetTableData - with this you can limit the data collection to only selected rows
  • New: API method (fnResizeButtons) to re-calculate the size of flash buttons. This is useful for when initialising TableTools when it is hidden (display:none) since sizes can't be calculated at that time.
  • New: Add new options for PDF export: "sPdfOrientation" which can be 'portrait' or 'landscape' to alter the orientation of the output PDF, "sPdfSize" which can be 'A[3-4]', 'letter', 'legal' or 'tabloid', and "sPdfMessage" which is a free text input that will show at the top of the table.
  • New: New example showing how to add customised text to the output PDF and also how to change the PDF's orientation
  • New example: Showing multiple table initialisation with a single call to $().dataTable() - 3963
  • Changed: A warning is now given if you try to use the version of ZeroClipboard which came with TableTools 1, with TableTools 2 - as they are incompatiable, and odd things happen in Firefox and IE. Please ensure that you use the version of ZeroClipboard which comes with TableTools 2, with TableTools 2!
  • Changed: ZeroClipboard version to make it clear it is a TableTools 2 script and also remove the default moviePath since this is a source of possible confusion and is always set by TableTools.
  • Changed: By default the footer is no longer included in the PDF export
  • Changed: Background colour for the header is now a light grey rather than light blue
  • Changed: Added padding around the header text to make it standout more
  • Fix: Visible sample code was out of date - the running code was correct - updated.
  • Fix: Missing the 'sNewline' option from the ajax button type.
  • Fix: When copying text the number of rows copied calculation needs to depend on if there is a footer present or not (otherwise the number of rows TableTools says it has copied can be off by one).
  • Fix: Alert stating the number of rows copied was off by one
  • Fix: Comment updated for the correct file name with the compile command
  • Fix: Save file using FileReference is non-blocking - need to use an event listener to know when it is done. This could lock up browsers and cause some real confusion when using collections
  • Fix: Use Unix LF rather than Mac Classic for new lines!
  • Fix: Workaround for AS / JS bridge callbacks being unassigned when a Flash movie (or one of its parents) is hidden by display:none. I'm far from proud of this, however, when a Flash movie is hidden in IE (i.e. display:none) then all callbacks are removed, and there is no way to tell that this has happened! Javascript can't tell us since there are no callbacks - so we need to add them again and again... Fortunatly Flash doesn't allow multiple callback functions to be used with each callback name, it just uses the provided function, so the only thing we use for this workaround is a couple of clock cycles.
  • Fix: PDF title wasn't being shown - it is now.
  • Fix: Remove the Javascript error for is the SWF isn't detected. Nice idea, but didn't really work in practice due to inconsistencies in browsers and handling the collection buttons

Files

js

swf

css

images