11# jquery-datatables-rails
22
33This gem packages the jQuery [ DataTables] ( http://datatables.net/ ) plugin for easy use with the Rails 3.1+ asset pipleine.
4+ It provides all the basic DataTables files, and a few of the extras.
45
56# Important
67
7- The current gem is released without updated plugins.
8- If you encounter any errors, please fork the repository, update the plugin files and send a pull-request.
8+ ** The current gem is released without updated plugins.**
9+ ** Take care of using the gem from master repository, there are general changes. [ CHANGELOG.md ] ( CHANGELOG.md ) **
910
10- It provides all the basic DataTables files, and a few of the extras .
11+ If you encounter any errors, please fork the repository, update the plugin files and send a pull-request .
1112
1213## General Installation
1314
14- 1 . Add to your Gemfile:
15+ ** This is README is valid only for 2.1.10.0.1 version**
16+
17+ 1 - Add to your Gemfile:
1518
1619``` ruby
1720gem ' jquery-datatables-rails' , ' ~> 2.1.10.0.1'
1821```
1922
20- 1 . Install the gem:
23+ 2 - Install the gem:
2124
2225``` bash
2326bundle install
2427```
2528
26- 1 . Add the JavaScript to ` application.js ` :
29+ 3 - Add the JavaScript to ` application.js ` :
2730
2831``` javascript
2932// = require dataTables/jquery.dataTables
3033```
3134
32- 1 . Add the stylesheets to ` application.css ` :
35+ 4 - Add the stylesheets to ` application.css ` :
3336
3437``` css
3538* = require dataTables/jquery.dataTables
3639```
3740
3841## Twitter Bootstrap 2 Installation
3942
40- 1. Complete steps 1-3 of the General Installation
41- 1. Add some more JavaScript to `application.js`:
43+ 1 - Complete steps 1-3 of the General Installation
44+ 2 - Add some more JavaScript to `application.js`:
4245
4346```javascript
4447//= require dataTables/bootstrap/2/jquery.dataTables.bootstrap
4548```
4649
47- 1. Add this (and only this) stylesheet to `application.css`:
50+ 3 - Add this (and only this) stylesheet to `application.css`:
4851
4952```css
5053* = require dataTables/bootstrap/2/jquery.dataTables.bootstrap
5154```
5255
53- 1. Initialize your datatables using one of these options:
56+ 4 - Initialize your datatables using one of these options:
5457
5558```javascript
5659// For fluid containers
@@ -68,20 +71,20 @@ $('.datatable').dataTable({
6871
6972## Twitter Bootstrap 3 Installation
7073
71- 1 . Complete steps 1-3 of the General Installation
72- 1 . Add some more JavaScript to ` application.js ` :
74+ 1 - Complete steps 1-3 of the General Installation
75+ 2 - Add some more JavaScript to ` application.js ` :
7376
7477``` javascript
7578// = require dataTables/bootstrap/3/jquery.dataTables.bootstrap
7679```
7780
78- 1 . Add this (and only this) stylesheet to ` application.css ` :
81+ 3 - Add this (and only this) stylesheet to ` application.css ` :
7982
8083``` css
8184* = require dataTables/bootstrap/3jquery.dataTables.bootstrap3
8285```
8386
84- 1. Initialize your datatables using these option :
87+ 4 - Initialize your datatables using these option :
8588
8689```javascript
8790$('.datatable' ).dataTable( {
@@ -92,21 +95,21 @@ $('.datatable').dataTable({
9295
9396## Zurb Foundation Installation
9497
95- 1 . Complete steps 1-3 of the General Installation
98+ 1 - Complete steps 1-3 of the General Installation
9699
97- 1 . Add some more JavaScript to ` application.js ` :
100+ 2 - Add some more JavaScript to ` application.js ` :
98101
99102``` javascript
100103// = require dataTables/jquery.dataTables.foundation
101104```
102105
103- 1 . Add this (and only this) stylesheet to ` application.css ` :
106+ 3 - Add this (and only this) stylesheet to ` application.css ` :
104107
105108``` css
106109* = require dataTables/jquery.dataTables.foundation
107110```
108111
109- 1. Initialize your datatables using these option :
112+ 4 - Initialize your datatables using these option :
110113
111114```javascript
112115$('.datatable' ).dataTable( {
@@ -116,28 +119,28 @@ $('.datatable').dataTable({
116119
117120## Responsive Installation
118121
119- 1 . Complete steps 1-3 of the General Installation
120- 1 . Add the lodash gem to your application:
122+ 1 - Complete steps 1-3 of the General Installation
123+ 2 - Add the lodash gem to your application:
121124
122125``` ruby
123126gem ' lodash-rails'
124127```
125128
126- 1 . Add some more JavaScript to ` application.js ` :
129+ 3 - Add some more JavaScript to ` application.js ` :
127130
128131``` javascript
129132// = require dataTables/bootstrap/3/jquery.dataTables.bootstrap
130133// = require dataTables/extras/dataTables.responsive
131134```
132135
133- 1 . Add this (and only this) stylesheet to ` application.css ` :
136+ 4 - Add this (and only this) stylesheet to ` application.css ` :
134137
135138``` css
136139* = require dataTables/bootstrap/3/jquery.dataTables.bootstrap
137140* = require dataTables/extras/dataTables.responsive
138141```
139142
140- 1. Initialize your datatables using:
143+ 5 - Initialize your datatables using:
141144
142145```coffeescript
143146responsiveHelper = undefined
@@ -163,7 +166,7 @@ tableElement.dataTable
163166 return
164167```
165168
166- 1. To use see the author of responsive files and follow the instructions as described on [datatables-responsive ]
169+ 6 - To use see the author of responsive files and follow the instructions as described on [datatables-responsive ]
167170
168171## Plugins
169172
@@ -183,7 +186,7 @@ These files can be found in the [assets directory][assets].
183186
184187## Extras
185188
186- Only the official extras are available:
189+ Official extras are available:
187190
188191* AutoFill
189192* ColReorder
@@ -194,21 +197,26 @@ Only the official extras are available:
194197* Scroller
195198* TableTools
196199
197- To add an extra into your application, add its JS file to `application.js` using the following pattern :
200+ Unofficial extra is available:
201+ * Responsive
202+
203+
204+
205+ 1 - To add an extra into your application, add its JS file to `application.js` using the following pattern :
198206
199207```javascript
200208//= require dataTables/extras/[ExtraName ]
201209```
202210
203- Additionally, you may need to add any associated CSS files. For instance the TableTools extra requires
211+ 2 - Additionally, you may need to add any associated CSS files. For instance the TableTools extra requires
204212you to add the following two lines to your `application.css` file:
205213
206214```css
207215* = require dataTables/extras/dataTables.tableTools
208216* = require dataTables/extras/TableTools_JUI
209217```
210218
211- TableTools also requires this to be included in 'application.js':
219+ 3 - TableTools also requires this to be included in 'application.js':
212220
213221```javascript
214222//= require dataTables/extras/ZeroClipboard.js
0 commit comments