Simple integration of jquery-tablesorter into the asset pipeline.
Current tablesorter version: 2.7.3 (1/10/2013), documentation
Any issue associate with the js/css files, please report to Mottie's fork.
Add this line to your application's Gemfile:
gem 'jquery-tablesorter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jquery-tablesorter
Rails 3.1 and higher
In your application.js
//= require jquery-tablesorter
This will require all jquery-tablesorter files (exclude addons).
Or you can include single file with:
//= require jquery-tablesorter/jquery.metadata
//= require jquery-tablesorter/jquery.tablesorter
//= require jquery-tablesorter/jquery.tablesorter.widgets
//= require jquery-tablesorter/addons/pager/jquery.tablesorter.pager
In your application.css
/*
*= require jquery-tablesorter/<theme name>
*/
Avaliable theme names:
- theme.black-ice
- theme.blue
- theme.bootstrap
- theme.dark
- theme.default
- theme.dropbox
- theme.green
- theme.grey
- theme.ice
- theme.jui
pager theme:
/*
*= require jquery-tablesorter/addons/pager/jquery.tablesorter.pager
*/
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Update
tablesorter
submodule - Run
rake jquery_tablesorter:update
- Run
rake jquery_tablesorter:sanitize_image_paths
- Update
README.md
andCHANGELOG.md