app/views/layouts/_sort_date.js.erb
$("table").tablesorter({
// this will apply the bootstrap theme if "uitheme" widget is included
// the widgetOptions.uitheme is no longer required to be set
theme : "bootstrap",
widthFixed: true,
sortList: [[0,0]],
headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon!
debug: true,
dateFormat : '<%= I18n.t(:tablesorter_date_format) %>',
// widget code contained in the jquery.tablesorter.widgets.js file
// use the zebra stripe widget if you plan on hiding any rows (filter widget)
widgets: [ 'uitheme', 'zebra', 'filter'],
widgetOptions : {
zebra : ["even", "odd"],
// reset filters button
filter_reset : ".reset"
}
})