Project:jQuery plugins
Version:6.x-1.9
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Is it possible to add DataTables plugin ?
http://www.datatables.net
http://plugins.jquery.com/project/DataTables

Comments

#1

It would be nice to see a Datatables module, but I can confirm that the latest (dt 1.5) works with latest jQuery shipped with Drupal.

You can write yourself a little module (guess you'd be doing this anyhow to fetch the data) and put this in the page generation code:

<?php
  drupal_add_js
(drupal_get_path('module', 'mymodule') . '/dataTables/media/js/jquery.dataTables.js');
 
drupal_add_js(drupal_get_path('module', 'mymodule') . '/mymodule.js');
?>

Where mymodule.js contains the ready function. Eg:

$(document).ready(function() {
  $('#dt_mymodule').dataTable();
} );

Sadly the theme_table function doesn't put <thead> tags in so I had to write my own, but aside from that looks to work just fine.

Unpack the dt zip file into your module directory and symlink dataTables to it (so you can easily switch between versions).

#2

Yes, i tried this way, but it seems that IMCE module have conflict with datatables. Didnt figure it out yet, but all "download buttons" in imce disappear.

#3

If anyone is interested, I've created a new DataTables module: http://drupal.org/project/datatables

There isn't a stable release yet, but there's initial support for displaying views output as a datatable, as well as a basic datatable theme.

#4

I am interested duellj...

thank you for bringing this to life. I will be testing and getting back with use cases, bug & feature reports soon as I start playing with it.

#5

Hi All,
Here is an simple example of search form in Drupal using datatable, http://bit.ly/drupaldatatable.

Cheers,
Rajan

nobody click here