wiki:TableSorterPlugin

Sort tables

Description

This plugin allows you to sort tables on your Trac wiki or ticket pages. It uses the tablesorter jQuery plugin for turning HTML tables into a sortable table without requiring a page refresh. The HTML-code of the table must be specified with the THEAD and TBODY tags for this to work.

This plugin is a wrapper around the third-party Javascript library jquery.tablesorter, that is dual licensed under the MIT and GPL licenses.

Bugs/Feature Requests

Existing bugs and feature requests for TableSorterPlugin are here.

If you have any issues, create a new ticket.

defect

0 / 1

enhancement

0 / 2

task

1 / 1

Download

Download the zipped source from here.

Source

You can check out TableSorterPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

A screenshot with a table with sortable headings would look as follows:

Example screenshot

The tablesorter plugin requires a THEAD tag, which is not added to normal wiki tables, so use WikiHtml instead. The class tablesorter is also required:

{{{#!html
<table id="myTable" class="tablesorter"> 
<thead> 
<tr> 
    <th>Last Name</th> 
    <th>First Name</th> 
    <th>Email</th> 
    <th>Due</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
    <td>Smith</td> 
    <td>John</td> 
    <td>jsmith@gmail.com</td> 
    <td>$50.00</td> 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>fbach@yahoo.com</td> 
    <td>$50.00</td> 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>jdoe@hotmail.com</td> 
    <td>$100.00</td> 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>tconway@earthlink.net</td> 
    <td>$50.00</td> 
</tr> 
</tbody> 
</table> 
}}}

Recent Changes

14480 by psuter on 2015-03-13 07:58:52
TableSorterPlugin: Plugin code is BSD licensed.

Any bundled third-party libraries remain unchanged, e.g. jquery.tablesorter remains dual licensed under the MIT and GPL licenses.

11394 by psuter on 2012-03-17 08:59:57
TableSorterPlugin: Initial hack
11393 by psuter on 2012-03-17 08:46:56
New hack TableSorterPlugin, created by psuter
(more)

Author/Contributors

Author: psuter
Maintainer: psuter
Contributors:

Last modified 6 weeks ago Last modified on Aug 19, 2016, 8:18:22 AM

Attachments (2)

Download all attachments as: .zip