? sites/default/files ? sites/default/private ? sites/default/settings.php Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.553 diff -u -p -r1.553 theme.inc --- includes/theme.inc 20 Nov 2009 04:29:42 -0000 1.553 +++ includes/theme.inc 25 Nov 2009 08:45:32 -0000 @@ -1659,6 +1659,11 @@ function theme_table($variables) { $attributes['class'][] = 'sticky-enabled'; } + // Attach tablefilter behavior, if required. + if (is_array($attributes['class']) && in_array('tablefilter', $attributes['class'])) { + drupal_add_js('misc/tablefilter.js'); + } + $output = '\n"; if (isset($caption)) { Index: misc/tablefilter.js =================================================================== RCS file: misc/tablefilter.js diff -N misc/tablefilter.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ misc/tablefilter.js 25 Nov 2009 08:45:32 -0000 @@ -0,0 +1,180 @@ +// $Id$ + +(function($) { + +// Create an object on which each instance of the tableFilter object will be applied to. +Drupal.tablefilters = {}; + +/** + * The tableFilter object. + */ +Drupal.tableFilter = function(container, settings) { + // Create a reference and define it's variables. + var ref = this; + ref.settings = settings; + ref.container = (container[0].tagName.toLowerCase() == 'form' ? container.children('div') : container); + ref.textfield; + + /** + * Initializes the tablefilter behavior. + */ + ref.init = function() { + ref.createTextfield(); + ref.attachEventListeners(); + }; + + /** + * Creates an input textfield inside the container. + */ + ref.createTextfield = function() { + var wrapper = $('
').addClass('form-item form-type-textfield form-item-tablefilter').prependTo(ref.container); + var label = $('