Buttons 1.1.0

DataTables CDN files for Buttons 1.1.0. This software was originally released on 8th November, 2015.

Release notes

This release of Buttons addresses a number of issues, primarily around the export of files (correct CSV escaping, certain data casing invalid Excel files to be created, and others). It also introduces a few new features such as automatic copy to clipboard for HTML5 and a new pageLength button type that can be used to replace the DataTables default page length menu (since Buttons often takes the place of the length menu).

Additionally, as with all other releases of DataTables and its extensions today, Buttons now uses a CommonJS and AMD loader that is consistent with the other software in the package.

Buttons is now available on NPM and Bower in distribution form, i.e. minified files and compiled CSS in the package, under the name datatables.net-buttons. Styling packages for the DataTables base style, Bootstrap, Foundation and jQuery UI are also available.

New

  • New: copyHtml5 will now copy to clipboard on click in all modern browsers (with the exception of Safari, which doesn't support the required API) no longer requiring the end user to activate the copy command themselves. The old method is retained for Safari and older browsers.
  • New: pageLength button that can be used to replace the DataTables built in page length control
  • New: buttons.exportData() will now accept a decodeEntities option to determine if entities should be decoded or not.
  • New: Add buttons.buttons.titleAttr option to give the ability to set title text for a button
  • New: Support for collections in collections
  • New: format option for the buttons.exportData() method to allow formatting of the header, footer and body. This also extends to the export buttons on account of the exportOptions object presented by these buttons.
  • New: When using CommonJS allow jQuery and the window object to be passed in
  • New: AMD and CommonJS loaders for Button definition files
  • New: AMD and CommonJS loaders for the styling integration files

Fixes

  • Fix: Initialisation is now performed immediately prior to initComplete so the Buttons methods can be used in the init callback.
  • Fix: ColReorder and column visibility restore were not compatible due to the changed indexes. This addresses that issue, although it does require ColReorder 1.3 or newer.
  • Fix: null and undefined would cause an error to be thrown on Excel export
  • Fix: button().text() was not operating correctly on collection buttons when the collection liner tag is not the same as the main buttons liner tag. This is the case in Bootstrap and caused the formatting to be lost as a tag was removed.
  • Fix: If an extension was found not to be available then the button chain should not continue.
  • Fix: "Numbers" with a leading zero should be exported as strings to Excel
  • Fix: Entities are now decoded for output
  • Fix: Don't update Button names when columns are reordered if they control more than one column
  • Fix: Fields which contains only numbers and - were being detected as numbers, even if there were multiple - characters (e.g. dates in the format 2015-10-25).
  • Fix: Multiple columns could not be selected for column visibility control with a single button
  • Fix: All columns were not being selected by default
  • Fix: Collection couldn't be closed in iOS Safari when clicking on the background
  • Fix: Boolean values were resulting in invalid Excel documents
  • Fix: Defaults were not used when initialised with the B option in dom
  • Fix: Rework of AMD and CommonJS loaders to present a consistent require interface and naming for DataTables and all of its extensions
  • Fix: Excel export could throw an error if numeric data were output
  • Fix: HTML5 PDF export would break when asked to draw non-string data.
  • Fix: Remove control characters from data in Excel export as they would cause the creation of an invalid XML file
  • Fix: Make the CSV export compliant with RFC4180
  • Fix: Add escapeChar option to the CSV export button types to allow customisation of the escape character
  • Fix: Add character set to CSV output blob
  • Fix: Split the filename and title configuration options - this was confusing and potentially wrong for Buttons
  • Fix: An invalid spreadsheet could be created if a Javascript exponential number was in the data set.
  • Fix: If a button tries to extend one which does not exist, a cryptic JS error would occur that doesn't explain what is happening. An error is now thrown stating what the problem is.
  • Fix: Error when exporting to HTML5 CSV when data contains numbers
  • Fix: If undefined is given in the buttons array and error would be thrown rather than the value ignored, as it is now.
  • Fix: Chrome 45 rendering error - see Chromium issue 531528
  • Fix: Responsive styling for Bootstrap and Foundation
  • Fix: Prevent RangeError when no columns present
  • Fix: CSV data which contained the field boundary character multiple times was not being full escaped
  • Fix: Row modifier was not being correctly applied to exported data

Examples

  • New: Icons example showing how icons can be used in place of text for the button
  • New: Examples of formatting the output using the new formatting functions option and also using orthogonal data.
  • New example: State saving with column visibility

Documentation

Files

css

js

swf