annotate DataTables-1.9.4/media/src/model/model.defaults.js @ 9:7300ed4c1481 draft default tip

Uploaded
author saskia-hiltemann
date Mon, 04 Sep 2017 10:49:00 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 * Initialisation options that can be given to DataTables at initialisation
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 * time.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 DataTable.defaults = {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 * An array of data to use for the table, passed in at initialisation which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 * will be used in preference to any data which is already in the DOM. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 * particularly useful for constructing tables purely in Javascript, for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 * example with a custom Ajax call.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 * @default null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 * // Using a 2D array data source
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 * "aaData": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 * ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 * { "sTitle": "Engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 * { "sTitle": "Browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 * { "sTitle": "Platform" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 * { "sTitle": "Version" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 * { "sTitle": "Grade" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 * // Using an array of objects as a data source (mData)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 * "aaData": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 * "engine": "Trident",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 * "browser": "Internet Explorer 4.0",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 * "platform": "Win 95+",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 * "version": 4,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 * "grade": "X"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 * },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 * "engine": "Trident",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 * "browser": "Internet Explorer 5.0",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 * "platform": "Win 95+",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 * "version": 5,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 * "grade": "C"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 * ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 * { "sTitle": "Engine", "mData": "engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 * { "sTitle": "Browser", "mData": "browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 * { "sTitle": "Platform", "mData": "platform" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 * { "sTitle": "Version", "mData": "version" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 * { "sTitle": "Grade", "mData": "grade" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 "aaData": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 * If sorting is enabled, then DataTables will perform a first pass sort on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 * initialisation. You can define which column(s) the sort is performed upon,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 * and the sorting direction, with this variable. The aaSorting array should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 * contain an array for each column to be sorted initially containing the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 * column's index and a direction string ('asc' or 'desc').
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 * @default [[0,'asc']]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 * // Sort by 3rd column first, and then 4th column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 * "aaSorting": [[2,'asc'], [3,'desc']]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 * // No initial sorting
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 * "aaSorting": []
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 "aaSorting": [[0,'asc']],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 * This parameter is basically identical to the aaSorting parameter, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99 * cannot be overridden by user interaction with the table. What this means
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100 * is that you could have a column (visible or hidden) which the sorting will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 * always be forced on first - any sorting after that (from the user) will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 * then be performed as required. This can be useful for grouping rows
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 * together.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 * @default null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111 * "aaSortingFixed": [[0,'asc']]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
112 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
113 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
114 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115 "aaSortingFixed": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 * This parameter allows you to readily specify the entries in the length drop
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120 * down menu that DataTables shows when pagination is enabled. It can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 * either a 1D array of options which will be used for both the displayed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
122 * option and the value, or a 2D array which will use the array in the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
123 * position as the value, and the array in the second position as the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
124 * displayed options (useful for language strings such as 'All').
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
125 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
126 * @default [ 10, 25, 50, 100 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
127 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
128 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
129 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
130 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
131 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
132 * "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
133 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
134 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
135 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
136 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
137 * // Setting the default display length as well as length menu
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
138 * // This is likely to be wanted if you remove the '10' option which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
139 * // is the iDisplayLength default.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
140 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
141 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
142 * "iDisplayLength": 25,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
143 * "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
144 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
145 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
146 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
147 "aLengthMenu": [ 10, 25, 50, 100 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
148
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
149
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
150 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
151 * The aoColumns option in the initialisation parameter allows you to define
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
152 * details about the way individual columns behave. For a full list of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
153 * column options that can be set, please see
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
154 * {@link DataTable.defaults.columns}. Note that if you use aoColumns to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
155 * define your columns, you must have an entry in the array for every single
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
156 * column that you have in your table (these can be null if you don't which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
157 * to specify any options).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
158 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
159 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
160 "aoColumns": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
161
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
162 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
163 * Very similar to aoColumns, aoColumnDefs allows you to target a specific
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
164 * column, multiple columns, or all columns, using the aTargets property of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
165 * each object in the array. This allows great flexibility when creating
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
166 * tables, as the aoColumnDefs arrays can be of any length, targeting the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
167 * columns you specifically want. aoColumnDefs may use any of the column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
168 * options available: {@link DataTable.defaults.columns}, but it _must_
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
169 * have aTargets defined in each object in the array. Values in the aTargets
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
170 * array may be:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
171 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
172 * <li>a string - class name will be matched on the TH for the column</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
173 * <li>0 or a positive integer - column index counting from the left</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
174 * <li>a negative integer - column index counting from the right</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
175 * <li>the string "_all" - all columns (i.e. assign a default)</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
176 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
177 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
178 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
179 "aoColumnDefs": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
180
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
181
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
182 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
183 * Basically the same as oSearch, this parameter defines the individual column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
184 * filtering state at initialisation time. The array must be of the same size
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
185 * as the number of columns, and each element be an object with the parameters
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
186 * "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
187 * accepted and the default will be used.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
188 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
189 * @default []
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
190 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
191 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
192 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
193 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
194 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
195 * "aoSearchCols": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
196 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
197 * { "sSearch": "My filter" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
198 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
199 * { "sSearch": "^[0-9]", "bEscapeRegex": false }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
200 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
201 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
202 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
203 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
204 "aoSearchCols": [],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
205
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
206
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
207 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
208 * An array of CSS classes that should be applied to displayed rows. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
209 * array may be of any length, and DataTables will apply each class
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
210 * sequentially, looping when required.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
211 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
212 * @default null <i>Will take the values determined by the oClasses.sStripe*
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
213 * options</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
214 * @dtopt Option
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
215 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
216 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
217 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
218 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
219 * "asStripeClasses": [ 'strip1', 'strip2', 'strip3' ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
220 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
221 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
222 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
223 "asStripeClasses": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
224
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
225
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
226 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
227 * Enable or disable automatic column width calculation. This can be disabled
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
228 * as an optimisation (it takes some time to calculate the widths) if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
229 * tables widths are passed in using aoColumns.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
230 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
231 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
232 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
233 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
234 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
235 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
236 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
237 * "bAutoWidth": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
238 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
239 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
240 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
241 "bAutoWidth": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
242
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
243
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
244 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
245 * Deferred rendering can provide DataTables with a huge speed boost when you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
246 * are using an Ajax or JS data source for the table. This option, when set to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
247 * true, will cause DataTables to defer the creation of the table elements for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
248 * each row until they are needed for a draw - saving a significant amount of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
249 * time.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
250 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
251 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
252 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
253 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
254 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
255 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
256 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
257 * "sAjaxSource": "sources/arrays.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
258 * "bDeferRender": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
259 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
260 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
261 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
262 "bDeferRender": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
263
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
264
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
265 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
266 * Replace a DataTable which matches the given selector and replace it with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
267 * one which has the properties of the new initialisation object passed. If no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
268 * table matches the selector, then the new DataTable will be constructed as
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
269 * per normal.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
270 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
271 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
272 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
273 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
274 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
275 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
276 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
277 * "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
278 * "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
279 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
280 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
281 * // Some time later....
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
282 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
283 * "bFilter": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
284 * "bDestroy": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
285 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
286 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
287 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
288 "bDestroy": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
289
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
290
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
291 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
292 * Enable or disable filtering of data. Filtering in DataTables is "smart" in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
293 * that it allows the end user to input multiple words (space separated) and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
294 * will match a row containing those words, even if not in the order that was
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
295 * specified (this allow matching across multiple columns). Note that if you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
296 * wish to use filtering in DataTables this must remain 'true' - to remove the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
297 * default filtering input box and retain filtering abilities, please use
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
298 * {@link DataTable.defaults.sDom}.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
299 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
300 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
301 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
302 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
303 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
304 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
305 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
306 * "bFilter": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
307 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
308 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
309 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
310 "bFilter": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
311
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
312
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
313 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
314 * Enable or disable the table information display. This shows information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
315 * about the data that is currently visible on the page, including information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
316 * about filtered data if that action is being performed.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
317 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
318 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
319 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
320 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
321 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
322 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
323 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
324 * "bInfo": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
325 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
326 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
327 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
328 "bInfo": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
329
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
330
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
331 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
332 * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
333 * slightly different and additional mark-up from what DataTables has
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
334 * traditionally used).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
335 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
336 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
337 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
338 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
339 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
340 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
341 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
342 * "bJQueryUI": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
343 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
344 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
345 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
346 "bJQueryUI": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
347
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
348
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
349 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
350 * Allows the end user to select the size of a formatted page from a select
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
351 * menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
352 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
353 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
354 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
355 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
356 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
357 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
358 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
359 * "bLengthChange": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
360 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
361 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
362 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
363 "bLengthChange": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
364
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
365
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
366 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
367 * Enable or disable pagination.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
368 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
369 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
370 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
371 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
372 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
373 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
374 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
375 * "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
376 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
377 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
378 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
379 "bPaginate": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
380
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
381
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
382 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
383 * Enable or disable the display of a 'processing' indicator when the table is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
384 * being processed (e.g. a sort). This is particularly useful for tables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
385 * large amounts of data where it can take a noticeable amount of time to sort
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
386 * the entries.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
387 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
388 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
389 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
390 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
391 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
392 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
393 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
394 * "bProcessing": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
395 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
396 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
397 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
398 "bProcessing": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
399
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
400
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
401 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
402 * Retrieve the DataTables object for the given selector. Note that if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
403 * table has already been initialised, this parameter will cause DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
404 * to simply return the object that has already been set up - it will not take
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
405 * account of any changes you might have made to the initialisation object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
406 * passed to DataTables (setting this parameter to true is an acknowledgement
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
407 * that you understand this). bDestroy can be used to reinitialise a table if
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
408 * you need.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
409 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
410 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
411 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
412 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
413 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
414 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
415 * initTable();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
416 * tableActions();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
417 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
418 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
419 * function initTable ()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
420 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
421 * return $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
422 * "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
423 * "bPaginate": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
424 * "bRetrieve": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
425 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
426 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
427 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
428 * function tableActions ()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
429 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
430 * var oTable = initTable();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
431 * // perform API operations with oTable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
432 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
433 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
434 "bRetrieve": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
435
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
436
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
437 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
438 * Indicate if DataTables should be allowed to set the padding / margin
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
439 * etc for the scrolling header elements or not. Typically you will want
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
440 * this.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
441 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
442 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
443 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
444 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
445 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
446 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
447 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
448 * "bScrollAutoCss": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
449 * "sScrollY": "200px"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
450 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
451 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
452 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
453 "bScrollAutoCss": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
454
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
455
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
456 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
457 * When vertical (y) scrolling is enabled, DataTables will force the height of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
458 * the table's viewport to the given height at all times (useful for layout).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
459 * However, this can look odd when filtering data down to a small data set,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
460 * and the footer is left "floating" further down. This parameter (when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
461 * enabled) will cause DataTables to collapse the table's viewport down when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
462 * the result set will fit within the given Y height.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
463 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
464 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
465 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
466 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
467 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
468 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
469 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
470 * "sScrollY": "200",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
471 * "bScrollCollapse": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
472 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
473 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
474 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
475 "bScrollCollapse": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
476
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
477
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
478 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
479 * Enable infinite scrolling for DataTables (to be used in combination with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
480 * sScrollY). Infinite scrolling means that DataTables will continually load
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
481 * data as a user scrolls through a table, which is very useful for large
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
482 * dataset. This cannot be used with pagination, which is automatically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
483 * disabled. Note - the Scroller extra for DataTables is recommended in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
484 * in preference to this option.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
485 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
486 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
487 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
488 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
489 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
490 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
491 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
492 * "bScrollInfinite": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
493 * "bScrollCollapse": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
494 * "sScrollY": "200px"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
495 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
496 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
497 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
498 "bScrollInfinite": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
499
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
500
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
501 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
502 * Configure DataTables to use server-side processing. Note that the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
503 * sAjaxSource parameter must also be given in order to give DataTables a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
504 * source to obtain the required data for each draw.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
505 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
506 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
507 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
508 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
509 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
510 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
511 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
512 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
513 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
514 * "sAjaxSource": "xhr.php"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
515 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
516 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
517 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
518 "bServerSide": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
519
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
520
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
521 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
522 * Enable or disable sorting of columns. Sorting of individual columns can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
523 * disabled by the "bSortable" option for each column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
524 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
525 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
526 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
527 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
528 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
529 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
530 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
531 * "bSort": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
532 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
533 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
534 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
535 "bSort": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
536
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
537
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
538 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
539 * Allows control over whether DataTables should use the top (true) unique
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
540 * cell that is found for a single column, or the bottom (false - default).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
541 * This is useful when using complex headers.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
542 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
543 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
544 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
545 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
546 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
547 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
548 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
549 * "bSortCellsTop": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
550 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
551 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
552 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
553 "bSortCellsTop": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
554
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
555
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
556 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
557 * Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
558 * 'sorting_3' to the columns which are currently being sorted on. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
559 * presented as a feature switch as it can increase processing time (while
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
560 * classes are removed and added) so for large data sets you might want to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
561 * turn this off.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
562 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
563 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
564 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
565 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
566 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
567 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
568 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
569 * "bSortClasses": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
570 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
571 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
572 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
573 "bSortClasses": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
574
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
575
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
576 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
577 * Enable or disable state saving. When enabled a cookie will be used to save
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
578 * table display information such as pagination information, display length,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
579 * filtering and sorting. As such when the end user reloads the page the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
580 * display display will match what thy had previously set up.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
581 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
582 * @default false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
583 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
584 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
585 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
586 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
587 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
588 * "bStateSave": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
589 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
590 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
591 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
592 "bStateSave": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
593
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
594
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
595 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
596 * Customise the cookie and / or the parameters being stored when using
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
597 * DataTables with state saving enabled. This function is called whenever
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
598 * the cookie is modified, and it expects a fully formed cookie string to be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
599 * returned. Note that the data object passed in is a Javascript object which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
600 * must be converted to a string (JSON.stringify for example).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
601 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
602 * @param {string} sName Name of the cookie defined by DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
603 * @param {object} oData Data to be stored in the cookie
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
604 * @param {string} sExpires Cookie expires string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
605 * @param {string} sPath Path of the cookie to set
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
606 * @returns {string} Cookie formatted string (which should be encoded by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
607 * using encodeURIComponent())
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
608 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
609 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
610 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
611 * $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
612 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
613 * "fnCookieCallback": function (sName, oData, sExpires, sPath) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
614 * // Customise oData or sName or whatever else here
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
615 * return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
616 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
617 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
618 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
619 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
620 "fnCookieCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
621
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
622
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
623 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
624 * This function is called when a TR element is created (and all TD child
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
625 * elements have been inserted), or registered if using a DOM source, allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
626 * manipulation of the TR element (adding classes etc).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
627 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
628 * @param {node} nRow "TR" element for the current row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
629 * @param {array} aData Raw data array for this row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
630 * @param {int} iDataIndex The index of this row in aoData
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
631 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
632 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
633 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
634 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
635 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
636 * "fnCreatedRow": function( nRow, aData, iDataIndex ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
637 * // Bold the grade for all 'A' grade browsers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
638 * if ( aData[4] == "A" )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
639 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
640 * $('td:eq(4)', nRow).html( '<b>A</b>' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
641 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
642 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
643 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
644 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
645 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
646 "fnCreatedRow": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
647
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
648
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
649 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
650 * This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
651 * dynamically modify any aspect you want about the created DOM.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
652 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
653 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
654 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
655 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
656 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
657 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
658 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
659 * "fnDrawCallback": function( oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
660 * alert( 'DataTables has redrawn the table' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
661 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
662 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
663 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
664 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
665 "fnDrawCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
666
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
667
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
668 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
669 * Identical to fnHeaderCallback() but for the table footer this function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
670 * allows you to modify the table footer on every 'draw' even.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
671 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
672 * @param {node} nFoot "TR" element for the footer
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
673 * @param {array} aData Full table data (as derived from the original HTML)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
674 * @param {int} iStart Index for the current display starting point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
675 * display array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
676 * @param {int} iEnd Index for the current display ending point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
677 * display array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
678 * @param {array int} aiDisplay Index array to translate the visual position
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
679 * to the full data array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
680 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
681 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
682 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
683 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
684 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
685 * "fnFooterCallback": function( nFoot, aData, iStart, iEnd, aiDisplay ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
686 * nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
687 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
688 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
689 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
690 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
691 "fnFooterCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
692
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
693
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
694 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
695 * When rendering large numbers in the information element for the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
696 * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
697 * to have a comma separator for the 'thousands' units (e.g. 1 million is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
698 * rendered as "1,000,000") to help readability for the end user. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
699 * function will override the default method DataTables uses.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
700 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
701 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
702 * @param {int} iIn number to be formatted
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
703 * @returns {string} formatted string for DataTables to show the number
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
704 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
705 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
706 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
707 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
708 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
709 * "fnFormatNumber": function ( iIn ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
710 * if ( iIn &lt; 1000 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
711 * return iIn;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
712 * } else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
713 * var
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
714 * s=(iIn+""),
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
715 * a=s.split(""), out="",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
716 * iLen=s.length;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
717 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
718 * for ( var i=0 ; i&lt;iLen ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
719 * if ( i%3 === 0 &amp;&amp; i !== 0 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
720 * out = "'"+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
721 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
722 * out = a[iLen-i-1]+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
723 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
724 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
725 * return out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
726 * };
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
727 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
728 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
729 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
730 "fnFormatNumber": function ( iIn ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
731 if ( iIn < 1000 )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
732 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
733 // A small optimisation for what is likely to be the majority of use cases
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
734 return iIn;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
735 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
736
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
737 var s=(iIn+""), a=s.split(""), out="", iLen=s.length;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
738
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
739 for ( var i=0 ; i<iLen ; i++ )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
740 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
741 if ( i%3 === 0 && i !== 0 )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
742 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
743 out = this.oLanguage.sInfoThousands+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
744 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
745 out = a[iLen-i-1]+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
746 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
747 return out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
748 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
749
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
750
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
751 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
752 * This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
753 * dynamically modify the header row. This can be used to calculate and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
754 * display useful information about the table.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
755 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
756 * @param {node} nHead "TR" element for the header
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
757 * @param {array} aData Full table data (as derived from the original HTML)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
758 * @param {int} iStart Index for the current display starting point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
759 * display array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
760 * @param {int} iEnd Index for the current display ending point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
761 * display array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
762 * @param {array int} aiDisplay Index array to translate the visual position
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
763 * to the full data array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
764 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
765 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
766 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
767 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
768 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
769 * "fnHeaderCallback": function( nHead, aData, iStart, iEnd, aiDisplay ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
770 * nHead.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
771 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
772 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
773 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
774 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
775 "fnHeaderCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
776
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
777
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
778 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
779 * The information element can be used to convey information about the current
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
780 * state of the table. Although the internationalisation options presented by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
781 * DataTables are quite capable of dealing with most customisations, there may
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
782 * be times where you wish to customise the string further. This callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
783 * allows you to do exactly that.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
784 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
785 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
786 * @param {int} iStart Starting position in data for the draw
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
787 * @param {int} iEnd End position in data for the draw
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
788 * @param {int} iMax Total number of rows in the table (regardless of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
789 * filtering)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
790 * @param {int} iTotal Total number of rows in the data set, after filtering
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
791 * @param {string} sPre The string that DataTables has formatted using it's
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
792 * own rules
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
793 * @returns {string} The string to be displayed in the information element.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
794 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
795 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
796 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
797 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
798 * "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
799 * return iStart +" to "+ iEnd;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
800 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
801 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
802 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
803 "fnInfoCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
804
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
805
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
806 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
807 * Called when the table has been initialised. Normally DataTables will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
808 * initialise sequentially and there will be no need for this function,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
809 * however, this does not hold true when using external language information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
810 * since that is obtained using an async XHR call.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
811 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
812 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
813 * @param {object} json The JSON object request from the server - only
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
814 * present if client-side Ajax sourced data is used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
815 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
816 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
817 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
818 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
819 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
820 * "fnInitComplete": function(oSettings, json) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
821 * alert( 'DataTables has finished its initialisation.' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
822 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
823 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
824 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
825 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
826 "fnInitComplete": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
827
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
828
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
829 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
830 * Called at the very start of each table draw and can be used to cancel the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
831 * draw by returning false, any other return (including undefined) results in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
832 * the full draw occurring).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
833 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
834 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
835 * @returns {boolean} False will cancel the draw, anything else (including no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
836 * return) will allow it to complete.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
837 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
838 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
839 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
840 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
841 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
842 * "fnPreDrawCallback": function( oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
843 * if ( $('#test').val() == 1 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
844 * return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
845 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
846 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
847 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
848 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
849 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
850 "fnPreDrawCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
851
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
852
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
853 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
854 * This function allows you to 'post process' each row after it have been
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
855 * generated for each table draw, but before it is rendered on screen. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
856 * function might be used for setting the row class name etc.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
857 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
858 * @param {node} nRow "TR" element for the current row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
859 * @param {array} aData Raw data array for this row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
860 * @param {int} iDisplayIndex The display index for the current table draw
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
861 * @param {int} iDisplayIndexFull The index of the data in the full list of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
862 * rows (after filtering)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
863 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
864 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
865 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
866 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
867 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
868 * "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
869 * // Bold the grade for all 'A' grade browsers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
870 * if ( aData[4] == "A" )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
871 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
872 * $('td:eq(4)', nRow).html( '<b>A</b>' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
873 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
874 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
875 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
876 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
877 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
878 "fnRowCallback": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
879
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
880
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
881 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
882 * This parameter allows you to override the default function which obtains
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
883 * the data from the server ($.getJSON) so something more suitable for your
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
884 * application. For example you could use POST data, or pull information from
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
885 * a Gears or AIR database.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
886 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
887 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
888 * @param {string} sSource HTTP source to obtain the data from (sAjaxSource)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
889 * @param {array} aoData A key/value pair object containing the data to send
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
890 * to the server
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
891 * @param {function} fnCallback to be called on completion of the data get
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
892 * process that will draw the data on the page.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
893 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
894 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
895 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
896 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
897 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
898 * // POST data to server
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
899 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
900 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
901 * "bProcessing": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
902 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
903 * "sAjaxSource": "xhr.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
904 * "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
905 * oSettings.jqXHR = $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
906 * "dataType": 'json',
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
907 * "type": "POST",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
908 * "url": sSource,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
909 * "data": aoData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
910 * "success": fnCallback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
911 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
912 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
913 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
914 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
915 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
916 "fnServerData": function ( sUrl, aoData, fnCallback, oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
917 oSettings.jqXHR = $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
918 "url": sUrl,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
919 "data": aoData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
920 "success": function (json) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
921 if ( json.sError ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
922 oSettings.oApi._fnLog( oSettings, 0, json.sError );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
923 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
924
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
925 $(oSettings.oInstance).trigger('xhr', [oSettings, json]);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
926 fnCallback( json );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
927 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
928 "dataType": "json",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
929 "cache": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
930 "type": oSettings.sServerMethod,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
931 "error": function (xhr, error, thrown) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
932 if ( error == "parsererror" ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
933 oSettings.oApi._fnLog( oSettings, 0, "DataTables warning: JSON data from "+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
934 "server could not be parsed. This is caused by a JSON formatting error." );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
935 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
936 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
937 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
938 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
939
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
940
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
941 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
942 * It is often useful to send extra data to the server when making an Ajax
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
943 * request - for example custom filtering information, and this callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
944 * function makes it trivial to send extra information to the server. The
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
945 * passed in parameter is the data set that has been constructed by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
946 * DataTables, and you can add to this or modify it as you require.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
947 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
948 * @param {array} aoData Data array (array of objects which are name/value
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
949 * pairs) that has been constructed by DataTables and will be sent to the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
950 * server. In the case of Ajax sourced data with server-side processing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
951 * this will be an empty array, for server-side processing there will be a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
952 * significant number of parameters!
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
953 * @returns {undefined} Ensure that you modify the aoData array passed in,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
954 * as this is passed by reference.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
955 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
956 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
957 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
958 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
959 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
960 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
961 * "bProcessing": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
962 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
963 * "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
964 * "fnServerParams": function ( aoData ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
965 * aoData.push( { "name": "more_data", "value": "my_value" } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
966 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
967 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
968 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
969 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
970 "fnServerParams": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
971
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
972
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
973 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
974 * Load the table state. With this function you can define from where, and how, the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
975 * state of a table is loaded. By default DataTables will load from its state saving
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
976 * cookie, but you might wish to use local storage (HTML5) or a server-side database.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
977 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
978 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
979 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
980 * @return {object} The DataTables state object to be loaded
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
981 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
982 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
983 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
984 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
985 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
986 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
987 * "fnStateLoad": function (oSettings) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
988 * var o;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
989 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
990 * // Send an Ajax request to the server to get the data. Note that
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
991 * // this is a synchronous request.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
992 * $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
993 * "url": "/state_load",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
994 * "async": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
995 * "dataType": "json",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
996 * "success": function (json) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
997 * o = json;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
998 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
999 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1000 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1001 * return o;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1002 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1003 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1004 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1005 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1006 "fnStateLoad": function ( oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1007 var sData = this.oApi._fnReadCookie( oSettings.sCookiePrefix+oSettings.sInstance );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1008 var oData;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1009
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1010 try {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1011 oData = (typeof $.parseJSON === 'function') ?
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1012 $.parseJSON(sData) : eval( '('+sData+')' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1013 } catch (e) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1014 oData = null;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1015 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1016
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1017 return oData;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1018 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1019
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1020
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1021 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1022 * Callback which allows modification of the saved state prior to loading that state.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1023 * This callback is called when the table is loading state from the stored data, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1024 * prior to the settings object being modified by the saved state. Note that for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1025 * plug-in authors, you should use the 'stateLoadParams' event to load parameters for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1026 * a plug-in.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1027 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1028 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1029 * @param {object} oData The state object that is to be loaded
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1030 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1031 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1032 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1033 * // Remove a saved filter, so filtering is never loaded
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1034 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1035 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1036 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1037 * "fnStateLoadParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1038 * oData.oSearch.sSearch = "";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1039 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1040 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1041 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1042 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1043 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1044 * // Disallow state loading by returning false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1045 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1046 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1047 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1048 * "fnStateLoadParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1049 * return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1050 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1051 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1052 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1053 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1054 "fnStateLoadParams": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1055
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1056
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1057 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1058 * Callback that is called when the state has been loaded from the state saving method
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1059 * and the DataTables settings object has been modified as a result of the loaded state.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1060 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1061 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1062 * @param {object} oData The state object that was loaded
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1063 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1064 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1065 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1066 * // Show an alert with the filtering value that was saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1067 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1068 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1069 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1070 * "fnStateLoaded": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1071 * alert( 'Saved filter was: '+oData.oSearch.sSearch );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1072 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1073 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1074 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1075 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1076 "fnStateLoaded": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1077
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1078
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1079 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1080 * Save the table state. This function allows you to define where and how the state
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1081 * information for the table is stored - by default it will use a cookie, but you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1082 * might want to use local storage (HTML5) or a server-side database.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1083 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1084 * @member
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1085 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1086 * @param {object} oData The state object to be saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1087 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1088 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1089 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1090 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1091 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1092 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1093 * "fnStateSave": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1094 * // Send an Ajax request to the server with the state object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1095 * $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1096 * "url": "/state_save",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1097 * "data": oData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1098 * "dataType": "json",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1099 * "method": "POST"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1100 * "success": function () {}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1101 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1102 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1103 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1104 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1105 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1106 "fnStateSave": function ( oSettings, oData ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1107 this.oApi._fnCreateCookie(
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1108 oSettings.sCookiePrefix+oSettings.sInstance,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1109 this.oApi._fnJsonString(oData),
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1110 oSettings.iCookieDuration,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1111 oSettings.sCookiePrefix,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1112 oSettings.fnCookieCallback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1113 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1114 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1115
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1116
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1117 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1118 * Callback which allows modification of the state to be saved. Called when the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1119 * has changed state a new state save is required. This method allows modification of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1120 * the state saving object prior to actually doing the save, including addition or
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1121 * other state properties or modification. Note that for plug-in authors, you should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1122 * use the 'stateSaveParams' event to save parameters for a plug-in.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1123 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1124 * @param {object} oSettings DataTables settings object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1125 * @param {object} oData The state object to be saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1126 * @dtopt Callbacks
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1127 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1128 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1129 * // Remove a saved filter, so filtering is never saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1130 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1131 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1132 * "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1133 * "fnStateSaveParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1134 * oData.oSearch.sSearch = "";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1135 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1136 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1137 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1138 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1139 "fnStateSaveParams": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1140
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1141
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1142 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1143 * Duration of the cookie which is used for storing session information. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1144 * value is given in seconds.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1145 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1146 * @default 7200 <i>(2 hours)</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1147 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1148 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1149 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1150 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1151 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1152 * "iCookieDuration": 60*60*24; // 1 day
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1153 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1154 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1155 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1156 "iCookieDuration": 7200,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1157
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1158
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1159 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1160 * When enabled DataTables will not make a request to the server for the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1161 * page draw - rather it will use the data already on the page (no sorting etc
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1162 * will be applied to it), thus saving on an XHR at load time. iDeferLoading
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1163 * is used to indicate that deferred loading is required, but it is also used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1164 * to tell DataTables how many records there are in the full table (allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1165 * the information element and pagination to be displayed correctly). In the case
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1166 * where a filtering is applied to the table on initial load, this can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1167 * indicated by giving the parameter as an array, where the first element is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1168 * the number of records available after filtering and the second element is the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1169 * number of records without filtering (allowing the table information element
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1170 * to be shown correctly).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1171 * @type int | array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1172 * @default null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1173 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1174 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1175 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1176 * // 57 records available in the table, no filtering applied
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1177 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1178 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1179 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1180 * "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1181 * "iDeferLoading": 57
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1182 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1183 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1184 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1185 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1186 * // 57 records after filtering, 100 without filtering (an initial filter applied)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1187 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1188 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1189 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1190 * "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1191 * "iDeferLoading": [ 57, 100 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1192 * "oSearch": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1193 * "sSearch": "my_filter"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1194 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1195 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1196 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1197 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1198 "iDeferLoading": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1199
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1200
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1201 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1202 * Number of rows to display on a single page when using pagination. If
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1203 * feature enabled (bLengthChange) then the end user will be able to override
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1204 * this to a custom setting using a pop-up menu.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1205 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1206 * @default 10
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1207 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1208 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1209 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1210 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1211 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1212 * "iDisplayLength": 50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1213 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1214 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1215 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1216 "iDisplayLength": 10,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1217
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1218
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1219 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1220 * Define the starting point for data display when using DataTables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1221 * pagination. Note that this parameter is the number of records, rather than
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1222 * the page number, so if you have 10 records per page and want to start on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1223 * the third page, it should be "20".
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1224 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1225 * @default 0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1226 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1227 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1228 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1229 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1230 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1231 * "iDisplayStart": 20
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1232 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1233 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1234 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1235 "iDisplayStart": 0,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1236
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1237
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1238 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1239 * The scroll gap is the amount of scrolling that is left to go before
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1240 * DataTables will load the next 'page' of data automatically. You typically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1241 * want a gap which is big enough that the scrolling will be smooth for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1242 * user, while not so large that it will load more data than need.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1243 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1244 * @default 100
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1245 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1246 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1247 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1248 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1249 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1250 * "bScrollInfinite": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1251 * "bScrollCollapse": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1252 * "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1253 * "iScrollLoadGap": 50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1254 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1255 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1256 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1257 "iScrollLoadGap": 100,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1258
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1259
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1260 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1261 * By default DataTables allows keyboard navigation of the table (sorting, paging,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1262 * and filtering) by adding a tabindex attribute to the required elements. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1263 * allows you to tab through the controls and press the enter key to activate them.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1264 * The tabindex is default 0, meaning that the tab follows the flow of the document.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1265 * You can overrule this using this parameter if you wish. Use a value of -1 to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1266 * disable built-in keyboard navigation.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1267 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1268 * @default 0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1269 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1270 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1271 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1272 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1273 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1274 * "iTabIndex": 1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1275 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1276 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1277 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1278 "iTabIndex": 0,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1279
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1280
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1281 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1282 * All strings that DataTables uses in the user interface that it creates
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1283 * are defined in this object, allowing you to modified them individually or
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1284 * completely replace them all as required.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1285 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1286 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1287 "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1288 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1289 * Strings that are used for WAI-ARIA labels and controls only (these are not
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1290 * actually visible on the page, but will be read by screenreaders, and thus
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1291 * must be internationalised as well).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1292 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1293 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1294 "oAria": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1295 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1296 * ARIA label that is added to the table headers when the column may be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1297 * sorted ascending by activing the column (click or return when focused).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1298 * Note that the column header is prefixed to this string.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1299 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1300 * @default : activate to sort column ascending
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1301 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1302 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1303 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1304 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1305 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1306 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1307 * "oAria": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1308 * "sSortAscending": " - click/return to sort ascending"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1309 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1310 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1311 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1312 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1313 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1314 "sSortAscending": ": activate to sort column ascending",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1315
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1316 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1317 * ARIA label that is added to the table headers when the column may be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1318 * sorted descending by activing the column (click or return when focused).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1319 * Note that the column header is prefixed to this string.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1320 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1321 * @default : activate to sort column ascending
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1322 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1323 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1324 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1325 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1326 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1327 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1328 * "oAria": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1329 * "sSortDescending": " - click/return to sort descending"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1330 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1331 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1332 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1333 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1334 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1335 "sSortDescending": ": activate to sort column descending"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1336 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1337
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1338 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1339 * Pagination string used by DataTables for the two built-in pagination
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1340 * control types ("two_button" and "full_numbers")
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1341 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1342 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1343 "oPaginate": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1344 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1345 * Text to use when using the 'full_numbers' type of pagination for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1346 * button to take the user to the first page.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1347 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1348 * @default First
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1349 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1350 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1351 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1352 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1353 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1354 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1355 * "oPaginate": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1356 * "sFirst": "First page"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1357 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1358 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1359 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1360 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1361 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1362 "sFirst": "First",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1363
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1364
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1365 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1366 * Text to use when using the 'full_numbers' type of pagination for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1367 * button to take the user to the last page.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1368 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1369 * @default Last
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1370 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1371 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1372 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1373 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1374 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1375 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1376 * "oPaginate": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1377 * "sLast": "Last page"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1378 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1379 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1380 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1381 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1382 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1383 "sLast": "Last",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1384
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1385
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1386 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1387 * Text to use for the 'next' pagination button (to take the user to the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1388 * next page).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1389 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1390 * @default Next
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1391 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1392 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1393 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1394 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1395 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1396 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1397 * "oPaginate": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1398 * "sNext": "Next page"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1399 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1400 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1401 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1402 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1403 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1404 "sNext": "Next",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1405
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1406
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1407 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1408 * Text to use for the 'previous' pagination button (to take the user to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1409 * the previous page).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1410 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1411 * @default Previous
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1412 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1413 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1414 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1415 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1416 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1417 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1418 * "oPaginate": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1419 * "sPrevious": "Previous page"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1420 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1421 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1422 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1423 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1424 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1425 "sPrevious": "Previous"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1426 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1427
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1428 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1429 * This string is shown in preference to sZeroRecords when the table is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1430 * empty of data (regardless of filtering). Note that this is an optional
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1431 * parameter - if it is not given, the value of sZeroRecords will be used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1432 * instead (either the default or given value).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1433 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1434 * @default No data available in table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1435 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1436 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1437 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1438 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1439 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1440 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1441 * "sEmptyTable": "No data available in table"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1442 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1443 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1444 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1445 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1446 "sEmptyTable": "No data available in table",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1447
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1448
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1449 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1450 * This string gives information to the end user about the information that
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1451 * is current on display on the page. The _START_, _END_ and _TOTAL_
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1452 * variables are all dynamically replaced as the table display updates, and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1453 * can be freely moved or removed as the language requirements change.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1454 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1455 * @default Showing _START_ to _END_ of _TOTAL_ entries
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1456 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1457 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1458 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1459 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1460 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1461 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1462 * "sInfo": "Got a total of _TOTAL_ entries to show (_START_ to _END_)"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1463 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1464 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1465 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1466 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1467 "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1468
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1469
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1470 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1471 * Display information string for when the table is empty. Typically the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1472 * format of this string should match sInfo.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1473 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1474 * @default Showing 0 to 0 of 0 entries
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1475 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1476 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1477 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1478 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1479 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1480 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1481 * "sInfoEmpty": "No entries to show"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1482 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1483 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1484 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1485 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1486 "sInfoEmpty": "Showing 0 to 0 of 0 entries",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1487
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1488
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1489 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1490 * When a user filters the information in a table, this string is appended
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1491 * to the information (sInfo) to give an idea of how strong the filtering
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1492 * is. The variable _MAX_ is dynamically updated.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1493 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1494 * @default (filtered from _MAX_ total entries)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1495 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1496 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1497 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1498 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1499 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1500 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1501 * "sInfoFiltered": " - filtering from _MAX_ records"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1502 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1503 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1504 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1505 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1506 "sInfoFiltered": "(filtered from _MAX_ total entries)",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1507
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1508
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1509 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1510 * If can be useful to append extra information to the info string at times,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1511 * and this variable does exactly that. This information will be appended to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1512 * the sInfo (sInfoEmpty and sInfoFiltered in whatever combination they are
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1513 * being used) at all times.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1514 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1515 * @default <i>Empty string</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1516 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1517 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1518 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1519 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1520 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1521 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1522 * "sInfoPostFix": "All records shown are derived from real information."
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1523 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1524 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1525 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1526 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1527 "sInfoPostFix": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1528
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1529
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1530 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1531 * DataTables has a build in number formatter (fnFormatNumber) which is used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1532 * to format large numbers that are used in the table information. By
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1533 * default a comma is used, but this can be trivially changed to any
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1534 * character you wish with this parameter.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1535 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1536 * @default ,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1537 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1538 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1539 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1540 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1541 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1542 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1543 * "sInfoThousands": "'"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1544 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1545 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1546 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1547 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1548 "sInfoThousands": ",",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1549
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1550
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1551 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1552 * Detail the action that will be taken when the drop down menu for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1553 * pagination length option is changed. The '_MENU_' variable is replaced
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1554 * with a default select list of 10, 25, 50 and 100, and can be replaced
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1555 * with a custom select box if required.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1556 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1557 * @default Show _MENU_ entries
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1558 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1559 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1560 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1561 * // Language change only
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1562 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1563 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1564 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1565 * "sLengthMenu": "Display _MENU_ records"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1566 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1567 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1568 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1569 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1570 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1571 * // Language and options change
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1572 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1573 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1574 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1575 * "sLengthMenu": 'Display <select>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1576 * '<option value="10">10</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1577 * '<option value="20">20</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1578 * '<option value="30">30</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1579 * '<option value="40">40</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1580 * '<option value="50">50</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1581 * '<option value="-1">All</option>'+
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1582 * '</select> records'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1583 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1584 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1585 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1586 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1587 "sLengthMenu": "Show _MENU_ entries",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1588
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1589
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1590 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1591 * When using Ajax sourced data and during the first draw when DataTables is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1592 * gathering the data, this message is shown in an empty row in the table to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1593 * indicate to the end user the the data is being loaded. Note that this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1594 * parameter is not used when loading data by server-side processing, just
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1595 * Ajax sourced data with client-side processing.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1596 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1597 * @default Loading...
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1598 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1599 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1600 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1601 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1602 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1603 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1604 * "sLoadingRecords": "Please wait - loading..."
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1605 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1606 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1607 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1608 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1609 "sLoadingRecords": "Loading...",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1610
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1611
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1612 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1613 * Text which is displayed when the table is processing a user action
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1614 * (usually a sort command or similar).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1615 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1616 * @default Processing...
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1617 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1618 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1619 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1620 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1621 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1622 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1623 * "sProcessing": "DataTables is currently busy"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1624 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1625 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1626 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1627 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1628 "sProcessing": "Processing...",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1629
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1630
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1631 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1632 * Details the actions that will be taken when the user types into the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1633 * filtering input text box. The variable "_INPUT_", if used in the string,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1634 * is replaced with the HTML text box for the filtering input allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1635 * control over where it appears in the string. If "_INPUT_" is not given
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1636 * then the input box is appended to the string automatically.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1637 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1638 * @default Search:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1639 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1640 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1641 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1642 * // Input text box will be appended at the end automatically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1643 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1644 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1645 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1646 * "sSearch": "Filter records:"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1647 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1648 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1649 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1650 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1651 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1652 * // Specify where the filter should appear
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1653 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1654 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1655 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1656 * "sSearch": "Apply filter _INPUT_ to table"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1657 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1658 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1659 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1660 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1661 "sSearch": "Search:",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1662
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1663
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1664 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1665 * All of the language information can be stored in a file on the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1666 * server-side, which DataTables will look up if this parameter is passed.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1667 * It must store the URL of the language file, which is in a JSON format,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1668 * and the object has the same properties as the oLanguage object in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1669 * initialiser object (i.e. the above parameters). Please refer to one of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1670 * the example language files to see how this works in action.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1671 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1672 * @default <i>Empty string - i.e. disabled</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1673 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1674 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1675 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1676 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1677 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1678 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1679 * "sUrl": "http://www.sprymedia.co.uk/dataTables/lang.txt"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1680 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1681 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1682 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1683 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1684 "sUrl": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1685
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1686
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1687 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1688 * Text shown inside the table records when the is no information to be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1689 * displayed after filtering. sEmptyTable is shown when there is simply no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1690 * information in the table at all (regardless of filtering).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1691 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1692 * @default No matching records found
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1693 * @dtopt Language
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1694 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1695 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1696 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1697 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1698 * "oLanguage": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1699 * "sZeroRecords": "No records to display"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1700 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1701 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1702 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1703 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1704 "sZeroRecords": "No matching records found"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1705 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1706
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1707
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1708 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1709 * This parameter allows you to have define the global filtering state at
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1710 * initialisation time. As an object the "sSearch" parameter must be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1711 * defined, but all other parameters are optional. When "bRegex" is true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1712 * the search string will be treated as a regular expression, when false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1713 * (default) it will be treated as a straight string. When "bSmart"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1714 * DataTables will use it's smart filtering methods (to word match at
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1715 * any point in the data), when false this will not be done.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1716 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1717 * @extends DataTable.models.oSearch
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1718 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1719 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1720 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1721 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1722 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1723 * "oSearch": {"sSearch": "Initial search"}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1724 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1725 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1726 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1727 "oSearch": $.extend( {}, DataTable.models.oSearch ),
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1728
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1729
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1730 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1731 * By default DataTables will look for the property 'aaData' when obtaining
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1732 * data from an Ajax source or for server-side processing - this parameter
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1733 * allows that property to be changed. You can use Javascript dotted object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1734 * notation to get a data source for multiple levels of nesting.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1735 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1736 * @default aaData
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1737 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1738 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1739 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1740 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1741 * // Get data from { "data": [...] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1742 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1743 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1744 * "sAjaxSource": "sources/data.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1745 * "sAjaxDataProp": "data"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1746 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1747 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1748 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1749 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1750 * // Get data from { "data": { "inner": [...] } }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1751 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1752 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1753 * "sAjaxSource": "sources/data.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1754 * "sAjaxDataProp": "data.inner"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1755 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1756 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1757 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1758 "sAjaxDataProp": "aaData",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1759
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1760
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1761 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1762 * You can instruct DataTables to load data from an external source using this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1763 * parameter (use aData if you want to pass data in you already have). Simply
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1764 * provide a url a JSON object can be obtained from. This object must include
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1765 * the parameter 'aaData' which is the data source for the table.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1766 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1767 * @default null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1768 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1769 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1770 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1771 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1772 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1773 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1774 * "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1775 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1776 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1777 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1778 "sAjaxSource": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1779
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1780
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1781 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1782 * This parameter can be used to override the default prefix that DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1783 * assigns to a cookie when state saving is enabled.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1784 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1785 * @default SpryMedia_DataTables_
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1786 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1787 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1788 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1789 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1790 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1791 * "sCookiePrefix": "my_datatable_",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1792 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1793 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1794 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1795 "sCookiePrefix": "SpryMedia_DataTables_",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1796
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1797
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1798 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1799 * This initialisation variable allows you to specify exactly where in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1800 * DOM you want DataTables to inject the various controls it adds to the page
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1801 * (for example you might want the pagination controls at the top of the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1802 * table). DIV elements (with or without a custom class) can also be added to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1803 * aid styling. The follow syntax is used:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1804 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1805 * <li>The following options are allowed:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1806 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1807 * <li>'l' - Length changing</li
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1808 * <li>'f' - Filtering input</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1809 * <li>'t' - The table!</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1810 * <li>'i' - Information</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1811 * <li>'p' - Pagination</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1812 * <li>'r' - pRocessing</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1813 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1814 * </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1815 * <li>The following constants are allowed:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1816 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1817 * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1818 * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1819 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1820 * </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1821 * <li>The following syntax is expected:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1822 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1823 * <li>'&lt;' and '&gt;' - div elements</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1824 * <li>'&lt;"class" and '&gt;' - div with a class</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1825 * <li>'&lt;"#id" and '&gt;' - div with an ID</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1826 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1827 * </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1828 * <li>Examples:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1829 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1830 * <li>'&lt;"wrapper"flipt&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1831 * <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1832 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1833 * </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1834 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1835 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1836 * @default lfrtip <i>(when bJQueryUI is false)</i> <b>or</b>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1837 * <"H"lfr>t<"F"ip> <i>(when bJQueryUI is true)</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1838 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1839 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1840 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1841 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1842 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1843 * "sDom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1844 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1845 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1846 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1847 "sDom": "lfrtip",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1848
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1849
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1850 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1851 * DataTables features two different built-in pagination interaction methods
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1852 * ('two_button' or 'full_numbers') which present different page controls to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1853 * the end user. Further methods can be added using the API (see below).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1854 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1855 * @default two_button
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1856 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1857 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1858 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1859 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1860 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1861 * "sPaginationType": "full_numbers"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1862 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1863 * } )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1864 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1865 "sPaginationType": "two_button",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1866
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1867
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1868 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1869 * Enable horizontal scrolling. When a table is too wide to fit into a certain
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1870 * layout, or you have a large number of columns in the table, you can enable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1871 * x-scrolling to show the table in a viewport, which can be scrolled. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1872 * property can be any CSS unit, or a number (in which case it will be treated
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1873 * as a pixel measurement).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1874 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1875 * @default <i>blank string - i.e. disabled</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1876 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1877 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1878 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1879 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1880 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1881 * "sScrollX": "100%",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1882 * "bScrollCollapse": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1883 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1884 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1885 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1886 "sScrollX": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1887
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1888
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1889 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1890 * This property can be used to force a DataTable to use more width than it
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1891 * might otherwise do when x-scrolling is enabled. For example if you have a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1892 * table which requires to be well spaced, this parameter is useful for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1893 * "over-sizing" the table, and thus forcing scrolling. This property can by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1894 * any CSS unit, or a number (in which case it will be treated as a pixel
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1895 * measurement).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1896 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1897 * @default <i>blank string - i.e. disabled</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1898 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1899 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1900 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1901 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1902 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1903 * "sScrollX": "100%",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1904 * "sScrollXInner": "110%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1905 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1906 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1907 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1908 "sScrollXInner": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1909
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1910
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1911 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1912 * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1913 * to the given height, and enable scrolling for any data which overflows the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1914 * current viewport. This can be used as an alternative to paging to display
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1915 * a lot of data in a small area (although paging and scrolling can both be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1916 * enabled at the same time). This property can be any CSS unit, or a number
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1917 * (in which case it will be treated as a pixel measurement).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1918 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1919 * @default <i>blank string - i.e. disabled</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1920 * @dtopt Features
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1921 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1922 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1923 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1924 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1925 * "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1926 * "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1927 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1928 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1929 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1930 "sScrollY": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1931
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1932
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1933 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1934 * Set the HTTP method that is used to make the Ajax call for server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1935 * processing or Ajax sourced data.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1936 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1937 * @default GET
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1938 * @dtopt Options
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1939 * @dtopt Server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1940 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1941 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1942 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1943 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1944 * "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1945 * "sAjaxSource": "scripts/post.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1946 * "sServerMethod": "POST"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1947 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1948 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1949 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1950 "sServerMethod": "GET"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1951 };
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1952