1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-02 22:53:17 +02:00
Go to file
2015-08-11 21:28:26 +10:00
demos Fixed single filter search 2015-08-11 21:28:26 +10:00
dist Fixed single filter search 2015-08-11 21:28:26 +10:00
libs Added selection grid demo, removed old demos 2015-07-11 20:38:36 +10:00
src Fixed single filter search 2015-08-11 21:28:26 +10:00
static Fixed single filter search 2015-08-11 21:28:26 +10:00
test Fixed single filter search 2015-08-11 21:28:26 +10:00
.gitignore Cleaned doc directory and updated doc folder 2015-08-06 15:56:16 +10:00
.jshintrc Added documentation generated with esdoc 2015-08-02 18:27:59 +10:00
.travis.yml Removed after_success step from travis 2015-08-06 16:19:55 +10:00
Gruntfile.js Set default stylus compression 2015-08-09 22:40:10 +10:00
LICENSE.md Updated LICENSE and README 2015-07-07 22:45:49 +10:00
package.json Initial commit 2015-08-03 17:50:15 +10:00
README.md Updated README 2015-08-06 16:24:34 +10:00
webpack.config.js Added jshint rules 2015-07-25 18:33:21 +10:00

TableFilter Build Status

A Javascript library making HTML tables filterable

TableFilter is a modernised version of the HTML Table Filter generator javascript plugin. This library adds to any html table a "filter by column" feature that enables users to filter and limit the data displayed within a long table. By default, the script automatically adds a filter grid bar at the top of the desired table.

Features

  • Convert a regular HTML table into an advanced grid component providing:
    • Advanced columns filtering model
    • Sorting and pagination facilities
    • Complete selection model (ezEditTable extension)
    • Extended keyboard navigation (ezEditTable extension)
    • Inline cell or row editing (ezEditTable extension)
    • Row insertion or deleting (ezEditTable extension)
    • And even more behaviors...
  • Attach to an existing HTML table
  • Integration with any server-side technology as this is a pure client-side solution
  • Callbacks for all events, and delegates for most actions
  • Exhaustive documentation and API
  • Valuable support provided under a Premium request

Getting started

Clone the repo using Git:

git clone --bare https://github.com/koalyptus/TableFilter.git

Alternatively you can download this repository.

Setup

Copy the tablefilter directory under dist and place it at desired location in your project. Then include the main js file in your page:

<script src="path/to/my/scripts/tablefilter/tablefilter.js"></script>

Place the following snippet just under the HTML table and always define a base_path property in the configuration object to reflect the path to the script

<script>
var tf = new TableFilter('my-table-id', {
    base_path: 'path/to/my/scripts/tablefilter/'
});
tf.init();
</script>

If the base_path property is not specified, it will default to /tablefilter directory:

your-page.html
 |— tablefilter

Development

This project requires node.js and Grunt to be installed:

  • install node.js
  • install Grunt from the command line using npm (comes with node.js):
npm install -g grunt-cli

Once Grunt is sorted out you can follow the instructions below. Start by installing any dependencies.

npm install

Use the Grunt dev task to launch a build / watch cycle and start the local sever on port 8080:

grunt dev

Use the build task to generate a production build:

grunt build

The default Grunt task will create a production build, run the tests and finally generate the demos:

grunt

To run all the tests:

grunt test

and to run specific test(s):

grunt test-only:test.html
grunt test-only:test.html,test-sort.html

Demos

Run the local webserver:

grunt server

then pick a demo from:

http://localhost:8080/demos/

Documentation

Run this task to generate the documentation in the doc directory:

grunt esdoc

Find the complete documentation in the WIKI section.

Support

  • GitHub for reporting bugs and feature requests.

License

MIT