1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-18 22:36:41 +02:00
TableFilter/README.md

120 lines
3.5 KiB
Markdown
Raw Normal View History

2015-07-11 15:44:31 +02:00
[![Build Status](https://api.travis-ci.org/koalyptus/TableFilter.svg?branch=master)](https://travis-ci.org/koalyptus/TableFilter)
2015-07-11 15:39:25 +02:00
2015-06-06 17:19:40 +02:00
TableFilter
2015-06-06 16:16:41 +02:00
===========================
2014-07-20 13:32:13 +02:00
2015-07-10 01:21:11 +02:00
> A Javascript library making HTML tables filterable
2015-02-14 09:59:12 +01:00
2015-07-07 09:52:42 +02:00
TableFilter is a modernised version of the [HTML Table Filter generator](http://tablefilter.free.fr) javascript plugin.
This library adds to any html table a "filter by column" feature that enables
2015-06-09 10:46:08 +02:00
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.
2015-06-08 13:49:14 +02:00
2015-06-06 16:16:41 +02:00
##Features
* Convert a regular HTML table into an advanced grid component providing:
* Advanced columns filtering model
* Sorting and pagination facilities
2015-07-06 06:41:02 +02:00
* Complete selection model ([ezEditTable](http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123) extension)
* Extended keyboard navigation ([ezEditTable](http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123) extension)
* Inline cell or row editing ([ezEditTable](http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123) extension)
* Row insertion or deleting ([ezEditTable](http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123) extension)
2015-06-06 16:16:41 +02:00
* 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
2015-07-10 01:21:11 +02:00
##Getting started
Clone the repo using Git:
```shell
git clone --bare https://github.com/koalyptus/TableFilter.git
```
Alternatively you can [download](https://github.com/koalyptus/TableFilter/archive/master.zip) this repository.
2015-07-10 09:39:23 +02:00
##Setup
2015-07-07 15:08:08 +02:00
Copy the ``tablefilter`` directory under ``dist`` and place it at desired location in your project. Then include the main js file in your page:
2015-06-08 13:49:14 +02:00
```shell
2015-06-08 13:55:57 +02:00
<script src="path/to/my/scripts/tablefilter/tablefilter.js"></script>
2015-06-08 13:49:14 +02:00
```
2015-06-08 13:55:57 +02:00
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
2015-06-06 17:18:53 +02:00
```shell
2015-06-08 13:49:14 +02:00
<script>
2015-06-08 13:55:57 +02:00
var tf = new TableFilter('my-table-id', {
base_path: 'path/to/my/scripts/tablefilter/'
});
2015-06-08 13:49:14 +02:00
tf.init();
</script>
2015-06-06 17:18:53 +02:00
```
2015-07-01 09:39:29 +02:00
If the ``base_path`` property is not specified, it will default to ``/tablefilter`` directory:
```shell
your-page.html
2015-07-04 16:34:07 +02:00
|-- tablefilter
2015-07-01 09:39:29 +02:00
```
2015-06-06 17:18:53 +02:00
2015-06-06 16:36:49 +02:00
##Development
2015-06-08 14:10:17 +02:00
If you are not familiar with ``Grunt`` visit this page: [gruntjs.com/getting-started](http://gruntjs.com/getting-started). Once ``Grunt`` is sorted out you can follow the instructions below.
2015-06-06 16:16:41 +02:00
Start by installing any dependencies.
```shell
npm install
```
2015-06-06 16:36:49 +02:00
Use the Grunt ``dev`` task to launch a build / watch cycle and start the local
sever on port ``8080``:
```shell
grunt dev
```
2015-06-06 16:41:58 +02:00
Use the ``build`` task to generate a production build:
2015-06-06 16:36:49 +02:00
```shell
grunt build
```
The ``default`` Grunt task will create a production build and also run the
tests:
```shell
grunt
```
To run all the tests:
```shell
grunt test
```
2015-06-06 16:41:58 +02:00
and to run specific test(s):
2015-06-06 16:36:49 +02:00
```shell
grunt test-only:test.html
2015-06-06 16:41:58 +02:00
grunt test-only:test.html,test-sort.html
2015-06-06 16:36:49 +02:00
```
2015-06-06 16:16:41 +02:00
2015-07-07 14:45:49 +02:00
## Demos
Run the local webserver:
```shell
grunt server
```
then pick a demo from:
```shell
2015-07-07 15:22:37 +02:00
http://localhost:8080/demos/
2015-07-07 14:45:49 +02:00
```
2015-06-11 09:44:16 +02:00
## Documentation
2015-06-11 16:23:35 +02:00
Find the complete documentation in the [WIKI](https://github.com/koalyptus/TableFilter/wiki) section.
2015-06-11 09:44:16 +02:00
2015-06-06 17:02:31 +02:00
## Support
* GitHub for reporting bugs and feature requests.
2015-06-06 16:16:41 +02:00
2015-06-06 17:02:31 +02:00
## License
2015-06-15 10:16:06 +02:00
[MIT](LICENSE.md)
2015-06-13 11:03:33 +02:00
2015-06-26 10:11:16 +02:00
2015-06-13 11:03:33 +02:00
2015-07-06 10:08:37 +02:00