collective.js.datatables

by Jean-Michel FRANCOIS last modified Oct 19, 2012 08:41 AM

Plone Integration of jquery.dataTables plugin

Project Description

Introduction

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the principle of progressive enhancement, which will add advanced interaction controls to any HTML table.

This version includes datatables 1.9.4 without the examples available in the source distribution of the plugin. It is provided with an @@example.datatables view.

Install

A genericsetup profile is provided to add jquery.dataTables to portal_javascript in a non-minified version with compression option set to safe.

Key features of jquery.dataTables

  • Variable-length pagination
  • On-the-fly filtering
  • Multi-column sorting with data type detection
  • Smart handling of column widths
  • Display data from almost any data source
  • Scrolling options for table viewport
  • Fully internationalisable
  • jQueryUI ThemeRoller support
  • Rock solid - backed by a suite of 1400+ unit tests
  • Wide variety of plug-ins inc. TableTools, FixedHeader and KeyTable
  • It's free!
  • State saving
  • Hidden columns
  • Dynamic creation of tables
  • Ajax auto-loading of data
  • Custom DOM positioning
  • Single-column filtering
  • Alternative pagination types
  • Non-destructive DOM interaction
  • Sorting column(s) highlighting
  • Extensive plug-in support
  • Fully themeable by CSS
  • Solid documentation
  • 60+ pre-built examples
  • Full support for Adobe AIR
  • Source available at github

Plugins

This addon embed extras plugins:

  • AutoFill 1.1.2
  • ColReorder 1.0.5
  • ColVis 1.0.7
  • FixedColumns 2.0.3
  • FixedHeader 2.0.6
  • KeyTable 1.1.7
  • Scroller 1.0.1
  • TableTools 2.0.3

How to use tabletools

First include dependencies in your template, or register theses in portal_javascripts:

<link rel="stylesheet" type="text/css" media="screen" href="++resource++jquery.datatables/media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" media="screen" href="++resource++jquery.datatables/extras/TableTools/media/css/TableTools.css">
<script type="text/javascript" src="++resource++jquery.datatables.js"></script>
<script type="text/javascript" src="++resource++jquery.datatables/extras/TableTools/media/js/ZeroClipboard.js"></script>
<script type="text/javascript" src="++resource++jquery.datatables/extras/TableTools/media/js/TableTools.js"></script>
<style type="text/css">.clear{clear:both}</style>

Next you can create your datatable:

var oTable = $('#mydatatable').dataTable({
  "sDom": 'T<"clear">lfrtip',
  "oTableTools": {"sSwfPath": "++resource++jquery.datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"}
});

How to use translations

This addon provide translations of datatables. To use translations you have to init your datatables providing sUrl param:

$(document).ready(function() {
  $('#example').dataTable( {
      "oLanguage": {
          "sUrl": "@@collective.js.datatables.translation"
      }
  } );
} );

Credits

Authors

Contributors

  • Nejc Zupan (zupo)
  • Martijn Pieters
  • Luca Fabbri (keul)
  • Jens Klein (jensens)

Changelog

2.0 (2012-10-19)

  • use zope.i18n.translate directly and avoid resticted python calls. [jensens]
  • refactor code to do more genric recursive dict-tree walking.[jensens]
  • Update German translation and use more genric word Einträge instaed of Datensätze. [jensens]
  • upgrade DataTables to 1.9.4 [toutpt]

1.9.3.1 (2012-08-09)

  • Add translations: de, nl, es, it [ebrehault]
  • upgrade DataTables to 1.9.3

1.9.2.3 (2012-07-14)

  • Add locales folder with french translations [toutpt]
  • Add collective.js.datatables.translation view to use translations [toutpt]
  • Add italian translations [keul]

1.9.2.2 (2012-06-22)

  • update to DataTables to 1.9.2

1.9.2.1 (2012-04-25)

  • register css of datatable in cssregistry. [toutpt]
  • move example in splited module [toutpt]

1.9.2 (2012-04-24)

  • Upgrade all plugins and add documentation about them [toutpt]
  • Upgrade jquery.datatables to 1.9.1 [toutpt]

1.9.1 (2012-02-12)

  • Add a missing trailing newline in README. [zupo]
  • Also increase version number in README. [zupo]

1.9 (2012-02-12)

  • Upgrade to the latest version of jquery.datatables. [zupo]

1.8.0.2 (2011-09-26)

  • update contributors [toutpt]

1.8.0.1 (2011-08-08)

  • Applied commit 547af3f4987d6194438d from github.com/DataTables/TableTools.git that fixes TableTools when using server-side processing. [zupo]

1.8.0 (2011-06-18)

  • Upgrade to the latest version of jquery.datatables. [zupo]

1.7.5.2 (2011-05-23)

  • Remove compression none in default profile. add upgrade step

1.7.5.1 (2011-01-13)

  • Upgrade to the latest version of jquery.datatables. [mj]

1.7.4.3 (2010-11-16)

  • Fix packaging issue. [esteele]

1.7.4.2 (2010-11-09)

  • Add compatibility with old version from esteele. [toutpt]

1.7.4.1 (2010-11-09)

  • Initial release.

Self-Certification

[ ] Internationalized

[X] Unit tests

[X] End-user documentation

[X] Internal documentation (documentation, interfaces, etc.)

[X] Existed and maintained for at least 6 months

[X] Installs and uninstalls cleanly

[X] Code structure follows best practice

Current Release
collective.js.datatables 2.0

Released Oct 19, 2012

Download file Get collective.js.datatables for all platforms
collective.js.datatables-2.0.zip
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
2.0 Oct 19, 2012 More about this release… GPL final
1.9.3.1 Aug 09, 2012 More about this release… GPL final
1.9.2.3 Jul 14, 2012 More about this release… GPL final
1.9.2.2 Jun 22, 2012 More about this release… GPL final
1.9.2.1 Apr 25, 2012 Register the CSS of jquery datatables / add tests More about this release…
Plone 4.1
Plone 4
GPL final