Index: datatables.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/datatables/datatables.module,v
retrieving revision 1.3.4.7
diff -u -p -r1.3.4.7 datatables.module
--- datatables.module	5 Jan 2011 03:45:15 -0000	1.3.4.7
+++ datatables.module	17 Jan 2011 13:54:27 -0000
@@ -33,7 +33,22 @@ function datatables_library() {
       drupal_get_path('module', 'datatables') . '/dataTables/media/css/demo_table.css' => array(),
     ),
   );
-  return $libraries;  
+  $libraries['datatables-tabletools'] = array(
+    'title' => 'Tabletools plugin for DataTables',
+    'website' => 'http://www.datatables.net/extras/tabletools/',
+    'version' => '1.1.4',
+    'js' => array(
+      drupal_get_path('module', 'datatables') . '/dataTables/extras/TableTools/media/ZeroClipboard/ZeroClipboard.js' => array(),
+      drupal_get_path('module', 'datatables') . '/dataTables/extras/TableTools/media/js/TableTools.js' => array(),
+    ),
+    'css' => array(
+      drupal_get_path('module', 'datatables') . '/dataTables/extras/TableTools/media/css/TableTools.css' => array(),
+    ),
+    'dependencies' => array(
+      array('datatables', 'datatables'),
+    ),
+  );
+  return $libraries;
 }
 
 /**
@@ -158,6 +173,15 @@ function theme_datatable($variables) {
     if (!$attributes['id']) {
       $attributes['id'] = _datatables_get_id();
     }
+    $is_table_tools_enabled = (isset($datatable_options['bTableTools'])) ? $datatable_options['bTableTools'] : FALSE;
+
+    if ($is_table_tools_enabled) {
+      $datatable_options['oTableTools'] = array(
+        'sSwfPath' => base_path() . drupal_get_path('module', 'datatables') . '/dataTables/extras/TableTools/media/swf/ZeroClipboard.swf',
+      );
+      $datatable_options['sDom'] = 'T<"clear">lfrtip';
+      drupal_add_library('datatables', 'datatables-tabletools');
+    }
 
     drupal_add_library('datatables', 'datatables');
     drupal_add_js(array('datatables' => array('#'. $attributes['id'] => $datatable_options)), 'setting');
Index: js/datatables.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/datatables/js/datatables.js,v
retrieving revision 1.1.4.3
diff -u -p -r1.1.4.3 datatables.js
--- js/datatables.js	26 Oct 2010 23:43:08 -0000	1.1.4.3
+++ js/datatables.js	17 Jan 2011 13:54:27 -0000
@@ -37,6 +37,11 @@ Drupal.behaviors.datatables = {
         }
       }
 
+      if (this.bTableTools) {
+        jQuery.each(this.oTableTools, function (key, value) {
+          TableToolsInit[key] = value;
+        });
+      }
       var datatable = jQuery(selector).dataTable(this);
 
       if (this.bExpandable) {
