1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-17 05:46:39 +02:00
TableFilter/README.md

93 lines
2.5 KiB
Markdown
Raw Normal View History

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-02-14 09:59:12 +01:00
Filter HTML tables data easily
2015-07-01 09:29:26 +02:00
TableFilter is a modernised version of the [HTML Table Filter generator](http://tablefilter.free.fr) plugin.
2015-06-09 10:46:08 +02:00
This script 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.
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
* Complete selection model (addon)
* Extended keyboard navigation (addon)
* Inline cell or row editing (addon)
* Row insertion or deleting (addon)
* 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-06-06 17:18:53 +02:00
##Setup
2015-06-08 13:49:14 +02:00
Copy the ``tablefilter`` directory under ``dist`` and place it at desired location in your project. Then include the bundle js file in your page:
```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-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-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