Skip to content
Mottie edited this page Nov 23, 2012 · 12 revisions

Wiki: Home | Language | Change Log | Change summary

Overall changes between v2.0.5 and the latest version (currently v2.4.5).

Appearance:

  • Updated documents to include more detailed instructions, more examples and include missing documentation from v2.0.5.
  • jQuery UI themes can now be applied using the "uitheme" widget. Added in v2.0.17.
  • Headers are now wrapped in a div with class "tablesorter-header-inner". Initially added a span in v2.0.6, modified in v2.0.26 then renamed in v2.1.
  • Empty table cells can now be set to sort to the top, bottom or treated as having a value of zero. Added in v2.1.11
  • Strings within a numerical column can now be treated as a max, min or zero value; or set to always sort to the top or bottom. Added in v2.0.10, updated in v2.1.16.
  • Clicking on a header that spans several columns will now sort all columns within it. Modified in v2.3.
  • Nested tables are now completely independent from their parent table (v2.3).
  • Added a theme option in v2.4. This also included updating the uitheme widget to include both the jQuery UI theme and Bootstrap themes.
  • Fixed inconsistencies in using sort up and sort down (v 2.5).

Functionality:

  • Added a basic alphanumeric sort in v2.0.6, then replaced with a natural sort algorithm in v2.2.2.
  • Accented characters are now replaced with their equivalent character to better allow for alphanumeric sorting. Improvement over the localeCompare function which only does a basic alphabetic sort. Modified in v2.2.
  • Added ability to sort multiple tbodies in v2.2.
  • Cell content can be sorted with or without case sensitivity (v2.2).
  • A custom text only sorting algorithm can be applied using the textSorter option.
  • Reordered default parsers to better detect data types. Changed in v2.3.
  • Set column parser, string within numerical column, empty cell position, initial sort direction, disable filter widget, locked order or date format with the following priority: jQuery data > metadata > headers option > header class name > overall option. Updated in v2.3.1.
  • Initializing tablesorter on an empty table will now allow sorting and not cause javascript errors. Fixed in v2.0.13.
  • Added options to reset the sort (as if unsorted), and restart the sort from the initial sort order when a column was previously unsorted in v2.0.27.
  • Cells with numbers wrapped in parenthesis are now treated as being a negative number. Modified in v2.1.12.
  • Improved method to rebuild the table after a sort resulting in about a 20% increase in speed (v2.1.20).
  • Table cell data parser can be delayed, useful for very large tables, until the initial sort. This speeds up initialization (v2.3).
  • The sortList option can be set using jQuery data (v2.3.1). Previously it was set only by the sortList option or table metadata.
  • A destroy method will now remove tablesorter functionality (v2.3.2).
  • Thanks to Nick Craver for removing the eval() function from multisorts thus improving performance of the sort across all browsers. (v2.5).

Parser updates:

  • Fixed currency & digit parsers numerous times to better work with international formatting.
  • Modified shortDate parser to use the dateFormat option to allow setting m-d-y, d-m-y or y-m-d formats in v2.0.23. The cell data can also include the time (modified in v2.1.14).
  • Modified various parsers to better work with empty cells and text within a numerical column (v2.1.5).
  • Access to parsers was made public (available via the API) in v2.4.

Widget updates:

  • Added init function which is called when tablesorter has almost completed initialization, but before initial sort (if any) in v2.0.28. Not commonly used by the included widgets to keep them backwards compatible with the original v2.0.5.
  • A storage function is included with the widget file to allow for saving sort (saveSort) and column widths (resizable) widgets. It is also available for any custom widget use. Added in v2.1.
  • Numerous widgets included in a separate file... more details below.
  • Access to widgets was made public (available via the API) in v2.4.

Pager updates:

  • Modified to allow setting custom output.
  • Multiple pager blocks are now allowed.
  • Added pagerArrows option which will apply a disabled class (via the cssDisabled option) to the arrows when on the first or last page
  • Added destory.pager method in v2.0.16.
  • Added removeRows option that when false only hides table rows to allow better access to dynamic cells (input values, checkboxes, etc) in v2.0.21.
  • Added enable.pager and disable.pager methods.
  • Removed positionFixed and offset options, replaced by fixedHeight in v2.1.
  • Added ajax methods to allow better interaction between the pager plugin and server side databases in v2.1.
  • Added {filteredRows} and {filteredPages} parameters to the output option in v2.4.
  • Added cssGoto option which should point to a page select dropdown in v2.4.
  • Added pagerInitialized and pageMoved events in v2.4.4.
  • Added a sort variable {sortList:col} to the ajax methods which can pass the current sort order to the server in v2.4.5.

Changes by option

Appearance

  • Blue theme - Arrows will now vertically align within the header cell, no matter the cell height (v2.0.25.2). Arrow images now use a URI (v2.1.17).
  • Green theme - Modified arrow icons (v2.1.18) and fixed issues with variable width tables & multiple lines of text within a header cell (v2.0.17).
  • UI theme - Added a widget to apply the appropriate classes (v2.0.17).
  • Updated all themes and added a bunch of new themes, thanks to thezoggy (v2.4).
  • Updated widthFixed option to use percentage widths instead of fixed pixel widths (v2.4).
  • Added an <i> element (copied from Twitter Bootstrap) to the header when the new cssIcon option was not an empty string (v2.4).
  • Added a cssProcessing option which when true would show an icon within the header to indicate when a sort or filter search was processing (v2.4).

Functionality

  • dateFormat - changed to accept "mmddyyyy", "ddmmyyy" or "yyyymmdd". Modified in v2.0.23.
  • usNumberFormat - set to false for German "1.234.567,89" or French "1 234 567,89". Added in v2.1.3.
  • delayInit - if false, the parsed table contents will not update until the first sort. Added in v2.3.

Sort Options

  • headers - modifed at various times to now allow setting sorter, string in digit column placement, empty cell placement, locked order, sortInitialOrder, disable filter widget, etc.

  • sortAppend - set column(s) sorted last (always applied). It wasn't working in v2.0.5, so fixed in v2.0.7.

  • sortInitialOrder - set sort direction on first click. No changes made to overall option, but it can now be set within the headers option for specific columns.

  • sortLocaleCompare - replaces equivalent character to better sort accented characters. Completely changed in v2.2.

  • textExtraction - text extraction method/function. Modified to work on a per column setting and pass the table and cellIndex to the function in v2.1.2.

  • ignoreCase - ignore case while sorting. Added in v2.2.

  • sortReset - a third click on the header will reset column to default - unsorted. Added in v2.0.27, improved in v2.1.1.

  • sortRestart - restart a sort to "sortInitialOrder" when clicking on previously unsorted columns. Added in v2.0.31, improved in v2.1.1.

  • emptyTo - sort empty cell to bottom, top, none, zero. Added as emptyToBottom in v2.1.11, then renamed in v2.1.16 and improved in v2.3 (can be set by jQuery data, metadata, headers option or class name).

  • stringTo - sort strings in numerical column as max, min, top, bottom, zero. Added in v2.1.16 and improved in v2.3 (can be set by jQuery data, metadata, headers option or class name).

  • textSorter - use custom text sorter. Added in v2.2.

  • selectorSort - allows you to target the header or any element within the header on which to trigger a sort (v2.4).

Widget options

  • Added initWidgets option that by default (true) all selected widgets (contained in the widgets option) will be applied after the table has initialized. Added in v2.3.5.
  • Multiple widgets added in a separate file jquery.tablesorter.widgets.js (added in v2.0.17). It includes:
    • uitheme widget - allows applying jQuery UI's themes to the table. Added in v2.0.17.
    • columns widget - adds css to the sorted primary, secondary, tertiary, etc columns to style them with different colors. Added in v2.0.17.
    • filter widget - adds a search input above each column to only show rows that match your search criteria. Added in v2.0.18.
    • stickyHeaders widget - makes the table header stick to the top of the page while scrolling down through the table. Added in v2.0.21.1.
    • resizable widget - allows resizing of the column widths. Changes are saved. Added in v2.0.23.2.
    • saveSort widget - saves the last sort and reapplies it when returning to that page. Added in v2.0.28.
  • Removed widgetZebra and other included widget options. Replaced by widgetOptions in v2.1.
  • Added a remove function to widgets which contains code needed to remove a particular widget from a table in v2.4.

Methods

  • addRows - use this method to add table rows. Modified to automatically resort the table using the current sort (v2.0.16), unless false is passed as a parameter (v2.1.19).
  • destroy - use this method to remove tablesorter from the table. Added in v2.3.2.
  • update - Update the stored tablesorter data and the table. Modified to automatically resort the table using the current sort (v2.0.14), unless false is passed as a parameter (v2.1.19).
  • updateCell - Update a table cell in the tablesorter data. Modified to automatically resort the table using the current sort (v2.0.14), unless false is passed as a parameter (v2.1.19).
  • refreshWidgets - A method which can refresh or reapply all currently selected widgets, and remove non-current widgets. Added in v2.4.
  • sortReset - An event that is triggered on the table to reset all sorts.

Callbacks

  • onRenderHeader - function called (not triggered) while building the table headers to allow additional styling. Modified in v2.0.9 to pass a column index.

Events

  • initialized - event called and triggered when tablesorter has completed its initialization on the table. Added in v2.2.
  • pagerChange - This event fires when the pager plugin begins to render the table on the currently selected page. Added in v2.0.7.
  • pagerComplete - This event fires when the pager plugin has completed its render of the table on the currently selected page. Added in v2.0.7.
  • sortBegin - This event fires immediately before tablesorter begins resorting the table. Added in v2.0.21.
  • filterInit, filterStart and filterEnd events added to the filter widget in v2.4.

CSS Class names

  • cssAsc - class applied to ascending sorted column. Value changed to "tablesorter-headerSortUp" in v2.1.7.

  • cssDesc - class applied to descending sorted column. Value changed to "tablesorter-headerSortDown" in v2.1.7.

  • cssHeader - class applied to all table headers. Value changed to "tablesorter-header" in v2.1.7.

  • cssInfoBlock - class added to a tbody that is not to be included in the sort. Value set to "tablesorter-infoOnly". Added in v2.2.

  • tableClass - adds "tablesorter" class automatically to the table. Added in v2.0.6.

Selectors

  • selectorHeaders - jQuery selector used to find the table head cells. Value change to "> thead th" in v2.3. Default changed to "> thead th, > thead td" in v2.4.
  • selectorRemove - class applied to table rows that are to be removed before updating the table contents. Value set to "tr.remove-me". Added in v2.1.

Other

  • parsers - all added parsers are stored in this variable. The parser format function will now pass the table, cell node and cell index for more flexibility. Modified in v2.0.23.
  • empties - contains information on how to sort empty table cells for each column. Added in v2.1.16.
  • strings - contains information on how to sort strings within numerical columns. Added in v2.1.16.

Not modified

  • appendCache - update a table that has had its data dynamically changed; used in conjunction with "update".
  • applyWidgetId - Apply the selected widget to the table, but the widget will not continue to be applied after each sort.
  • applyWidgets - Apply the set widgets to the table.
  • cancelSelection - prevent text selection in the header.
  • cssChildRow - class to apply to child rows (non-sorted rows attached to the parent row). Value set to "expand-child". Default value changed to "tablesorter-childRow" in v2.4.
  • debug - enable debug mode; report important information to the console log.
  • headerList - internal list of header cells.
  • sortEnd - This event fires when tablesorter has completed resorting the table.
  • sortForce - sets column(s) that are sorted first (always applied).
  • sortList - sets initial sort order; applied initially; updated when manually sorted.
  • sortMultiSortKey - key used to select additional columns.
  • sortStart - This event fires immediately after the tablesorter header has been clicked, initializing a resort.
  • sorton - Use this method to sort an initialized table in the desired order.
  • widgets - all added widgets are stored in this variable.
  • widthFixed option.

Removed

  • widgetZebra - set the css class names applied to odd and even rows for zebra striping. Replaced by widgetOptions.zebra in v2.1, but is still backwards compatible.
  • decimal - option is v2.0.5 that was not used by anything. It might have been intended to be used by the digit parser.

Wiki: Home | Change Log | Change summary

Clone this wiki locally