TableTools 2.0.2

DataTables CDN files for TableTools 2.0.2. This software was originally released on 25th January, 2012.

Release notes

It has been a long time in coming this TableTools release, but it is now finally here! TableTools has been lagging a little bit behind the main DataTables releases, but this version sees full compatibility with DataTables 1.8 and newer (specifically for mDataProp). A number of bug fixes, including addressing a memory leak in IE are the main items of interest with this release, but there are also some welcome new features, mainly to do with providing more control over selected rows through the API and also data that is read front he table can now be pre-processed before export, to provide more control over what is exported (fnCellRender).

  • New: New API method called fnGetSelectedData - this is basically the same as fnGetSelected except rather than giving an array of nodes, this function will give an array of the data source that DataTables uses for the selected rows. Save a few lines of code in the calling function :-)
  • New: fnSelect and fnDeselect API methods which will select or deselect an individual row given to the method as the first parameter
  • New: When hovering over a button, the default class (sButtonClass) is no longer removed from the button and then replaced with sButtonClassHover. This was proving to be a bit of a pain since you had to specify both the hover and non-hover classes everytime you wanted to assign a custom class. Instead the new behaviour is to append the hover class and leave the base class in place.
  • New: TableTools now has a 'div' option for the buttons that are created, which will create a div rather than a 'button' tag. This is intended for use as a label or presentation spacer, although it does have the standard range of options (the same as a text button, so fnClick etc) which can be used if required.
  • New: Add 'sortable' target for mColumns - 4637
  • New: nContent property for the new DIV non-button elements, which is a node that will be appended to the element that is created.
  • New: fnCellRender function for buttons which can be used to modify the data that has been read from the table. This allows pre-processing of the data before exporting it - for example stripping certain parts of the HTML or postfixing other stuff.
  • Updated: When clicking on a row, check that the row is controlled by DataTables first - this can be useful for when dealing with a table which has dynamic rows inserted by callbacks - and replaces the anOpen check
  • Updated: Now require DataTables 1.8.2 or newer
  • Updated: The row selected and row deselected callbacks are now fired when select all and select none are used. The second parameter passed to the callback in these cases is 'null' (rather than the node of the row that was selected as is done in the single row select case)
  • Updated: Use the same copyright license as DataTables - changing from LGPL to GPLv2 and/or BSD 3 point style. Add links to the license files - 3481
  • Fix: A proper file for IE losing the callbacks when the table is initialised in a hidden element - this time without a memory leak! Its actually very simple (as it usually is when you know how...) - the Event.ACTIVATE event is called on the stage when it is made visible agian, allowing us to reattach the event listeners.
  • Fix: Comma escaping was wrong - apparently in CSV files you don't use a backslash to esacpe the fild boundary, what you do is double up the character to escape it:
  • Fix: When the height / width of a Flash movie is found to be 0, don't try to set the height / width, as IE will throw a JS error about the div's child nodes not existing
  • Fix: Trim Header Column.
  • Fix: Due to a recent change the data collection was not working if there was no row selection active.
  • Fix: bSelectedOnly wasn't copying all rows when no rows were selected - 5249
  • Fix: Add a destroy function for TableTools which will clean out the DOM when the host DataTable is destroyed. This stops an error occuring in IE7/8, whereby before the Flash movie was removed, but still running (not collected by the garbage collector...).
  • Fix: CSV field boundary is now a double quote (") as per rfc4180 - 1401
  • Fix: When using DataTables 1.8 and mDataProp TableTools would not correctly read the data source - 5346
  • Fix: The CSS position value attached to the DTTT_container should be 'soft' CSS and not applied using Javascript to the element (which would result in being unable to override)
  • Fix: Bit of a mix of spaces and tabs...
  • Fix: Tooltip wasn't being added to print button
  • Fix: fnGetMasters was returning an array of the setting objects not the instances as it should have been
  • Dev: Combination of tabs and spaces in the header :-(. Fixed
  • Dev fix: Need a hover class to be defined for the new div target
  • Dev fix: The change to call postDeselected on deselect all has a performance hit since it was run on every row - not good. So only do it for the 'all'
  • Dev fix: Fix a couple of daft little errors in the new fnSelect and