annotate DataTables-1.9.4/media/src/model/model.defaults.columns.js @ 2:e8755431a0cd draft

fixed missing dependencies
author saskia-hiltemann
date Tue, 30 Sep 2014 09:47:14 -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 * Column options that can be given to DataTables at initialisation time.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 * @namespace
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 DataTable.defaults.columns = {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 * Allows a column's sorting to take multiple columns into account when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 * doing a sort. For example first name / last name columns make sense to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 * do a multi-column sort over the two columns.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 * @default null <i>Takes the value of the column index automatically</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 * { "aDataSort": [ 0, 1 ], "aTargets": [ 0 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 * { "aDataSort": [ 1, 0 ], "aTargets": [ 1 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 * { "aDataSort": [ 2, 3, 4 ], "aTargets": [ 2 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 * { "aDataSort": [ 0, 1 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 * { "aDataSort": [ 1, 0 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 * { "aDataSort": [ 2, 3, 4 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 "aDataSort": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 * You can control the default sorting direction, and even alter the behaviour
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 * of the sort handler (i.e. only allow ascending sorting etc) using this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 * parameter.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 * @type array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 * @default [ 'asc', 'desc' ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 * { "asSorting": [ "asc" ], "aTargets": [ 1 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 * { "asSorting": [ "desc", "asc", "asc" ], "aTargets": [ 2 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 * { "asSorting": [ "desc" ], "aTargets": [ 3 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 * ]
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 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 * { "asSorting": [ "asc" ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 * { "asSorting": [ "desc", "asc", "asc" ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 * { "asSorting": [ "desc" ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 "asSorting": [ 'asc', 'desc' ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 * Enable or disable filtering on the data in this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 * { "bSearchable": false, "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 * ] } );
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 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 * { "bSearchable": false },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 * ] } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 "bSearchable": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111
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 * Enable or disable sorting on this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
122 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
123 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
124 * { "bSortable": false, "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
125 * ] } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
126 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
127 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
128 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
129 * // Using aoColumns
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 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
133 * { "bSortable": false },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
134 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
135 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
136 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
137 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
138 * ] } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
139 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
140 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
141 "bSortable": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
142
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
143
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
144 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
145 * <code>Deprecated</code> When using fnRender() for a column, you may wish
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
146 * to use the original data (before rendering) for sorting and filtering
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
147 * (the default is to used the rendered data that the user can see). This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
148 * may be useful for dates etc.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
149 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
150 * Please note that this option has now been deprecated and will be removed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
151 * in the next version of DataTables. Please use mRender / mData rather than
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
152 * fnRender.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
153 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
154 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
155 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
156 * @deprecated
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
157 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
158 "bUseRendered": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
159
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
160
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
161 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
162 * Enable or disable the display of this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
163 * @type boolean
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
164 * @default true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
165 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
166 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
167 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
168 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
169 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
170 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
171 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
172 * { "bVisible": false, "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
173 * ] } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
174 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
175 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
176 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
177 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
178 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
179 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
180 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
181 * { "bVisible": false },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
182 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
183 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
184 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
185 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
186 * ] } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
187 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
188 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
189 "bVisible": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
190
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
191
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
192 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
193 * Developer definable function that is called whenever a cell is created (Ajax source,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
194 * etc) or processed for input (DOM source). This can be used as a compliment to mRender
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
195 * allowing you to modify the DOM element (add background colour for example) when the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
196 * element is available.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
197 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
198 * @param {element} nTd The TD node that has been created
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
199 * @param {*} sData The Data for the cell
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
200 * @param {array|object} oData The data for the whole row
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
201 * @param {int} iRow The row index for the aoData data store
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
202 * @param {int} iCol The column index for aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
203 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
204 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
205 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
206 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
207 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
208 * "aoColumnDefs": [ {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
209 * "aTargets": [3],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
210 * "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
211 * if ( sData == "1.7" ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
212 * $(nTd).css('color', 'blue')
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
213 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
214 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
215 * } ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
216 * });
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
217 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
218 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
219 "fnCreatedCell": null,
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 * <code>Deprecated</code> Custom display function that will be called for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
224 * display of each cell in this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
225 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
226 * Please note that this option has now been deprecated and will be removed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
227 * in the next version of DataTables. Please use mRender / mData rather than
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
228 * fnRender.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
229 * @type function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
230 * @param {object} o Object with the following parameters:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
231 * @param {int} o.iDataRow The row in aoData
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
232 * @param {int} o.iDataColumn The column in question
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
233 * @param {array} o.aData The data for the row in question
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
234 * @param {object} o.oSettings The settings object for this DataTables instance
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
235 * @param {object} o.mDataProp The data property used for this column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
236 * @param {*} val The current cell value
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
237 * @returns {string} The string you which to use in the display
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
238 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
239 * @deprecated
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
240 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
241 "fnRender": null,
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 * The column index (starting from 0!) that you wish a sort to be performed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
246 * upon when this column is selected for sorting. This can be used for sorting
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
247 * on hidden columns for example.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
248 * @type int
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
249 * @default -1 <i>Use automatically calculated column index</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
250 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
251 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
252 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
253 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
254 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
255 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
256 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
257 * { "iDataSort": 1, "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
258 * ]
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 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
263 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
264 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
265 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
266 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
267 * { "iDataSort": 1 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
268 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
269 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
270 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
271 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
272 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
273 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
274 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
275 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
276 "iDataSort": -1,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
277
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
278
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
279 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
280 * This parameter has been replaced by mData in DataTables to ensure naming
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
281 * consistency. mDataProp can still be used, as there is backwards compatibility
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
282 * in DataTables for this option, but it is strongly recommended that you use
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
283 * mData in preference to mDataProp.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
284 * @name DataTable.defaults.columns.mDataProp
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 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
289 * This property can be used to read data from any JSON data source property,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
290 * including deeply nested objects / properties. mData can be given in a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
291 * number of different ways which effect its behaviour:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
292 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
293 * <li>integer - treated as an array index for the data source. This is the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
294 * default that DataTables uses (incrementally increased for each column).</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
295 * <li>string - read an object property from the data source. Note that you can
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
296 * use Javascript dotted notation to read deep properties / arrays from the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
297 * data source.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
298 * <li>null - the sDefaultContent option will be used for the cell (null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
299 * by default, so you will need to specify the default content you want -
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
300 * typically an empty string). This can be useful on generated columns such
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
301 * as edit / delete action columns.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
302 * <li>function - the function given will be executed whenever DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
303 * needs to set or get the data for a cell in the column. The function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
304 * takes three parameters:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
305 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
306 * <li>{array|object} The data source for the row</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
307 * <li>{string} The type call data requested - this will be 'set' when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
308 * setting data or 'filter', 'display', 'type', 'sort' or undefined when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
309 * gathering data. Note that when <i>undefined</i> is given for the type
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
310 * DataTables expects to get the raw data for the object back</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
311 * <li>{*} Data to set when the second parameter is 'set'.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
312 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
313 * The return value from the function is not required when 'set' is the type
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
314 * of call, but otherwise the return is what will be used for the data
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
315 * requested.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
316 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
317 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
318 * Note that prior to DataTables 1.9.2 mData was called mDataProp. The name change
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
319 * reflects the flexibility of this property and is consistent with the naming of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
320 * mRender. If 'mDataProp' is given, then it will still be used by DataTables, as
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
321 * it automatically maps the old name to the new if required.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
322 * @type string|int|function|null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
323 * @default null <i>Use automatically calculated column index</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
324 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
325 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
326 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
327 * // Read table data from objects
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
328 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
329 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
330 * "sAjaxSource": "sources/deep.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
331 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
332 * { "mData": "engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
333 * { "mData": "browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
334 * { "mData": "platform.inner" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
335 * { "mData": "platform.details.0" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
336 * { "mData": "platform.details.1" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
337 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
338 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
339 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
340 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
341 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
342 * // Using mData as a function to provide different information for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
343 * // sorting, filtering and display. In this case, currency (price)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
344 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
345 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
346 * "aoColumnDefs": [ {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
347 * "aTargets": [ 0 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
348 * "mData": function ( source, type, val ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
349 * if (type === 'set') {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
350 * source.price = val;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
351 * // Store the computed dislay and filter values for efficiency
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
352 * source.price_display = val=="" ? "" : "$"+numberFormat(val);
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
353 * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
354 * return;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
355 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
356 * else if (type === 'display') {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
357 * return source.price_display;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
358 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
359 * else if (type === 'filter') {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
360 * return source.price_filter;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
361 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
362 * // 'sort', 'type' and undefined all just use the integer
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
363 * return source.price;
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 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
368 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
369 "mData": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
370
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
371
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
372 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
373 * This property is the rendering partner to mData and it is suggested that
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
374 * when you want to manipulate data for display (including filtering, sorting etc)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
375 * but not altering the underlying data for the table, use this property. mData
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
376 * can actually do everything this property can and more, but this parameter is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
377 * easier to use since there is no 'set' option. Like mData is can be given
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
378 * in a number of different ways to effect its behaviour, with the addition of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
379 * supporting array syntax for easy outputting of arrays (including arrays of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
380 * objects):
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
381 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
382 * <li>integer - treated as an array index for the data source. This is the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
383 * default that DataTables uses (incrementally increased for each column).</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
384 * <li>string - read an object property from the data source. Note that you can
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
385 * use Javascript dotted notation to read deep properties / arrays from the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
386 * data source and also array brackets to indicate that the data reader should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
387 * loop over the data source array. When characters are given between the array
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
388 * brackets, these characters are used to join the data source array together.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
389 * For example: "accounts[, ].name" would result in a comma separated list with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
390 * the 'name' value from the 'accounts' array of objects.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
391 * <li>function - the function given will be executed whenever DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
392 * needs to set or get the data for a cell in the column. The function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
393 * takes three parameters:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
394 * <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
395 * <li>{array|object} The data source for the row (based on mData)</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
396 * <li>{string} The type call data requested - this will be 'filter', 'display',
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
397 * 'type' or 'sort'.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
398 * <li>{array|object} The full data source for the row (not based on mData)</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
399 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
400 * The return value from the function is what will be used for the data
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
401 * requested.</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
402 * </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
403 * @type string|int|function|null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
404 * @default null <i>Use mData</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
405 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
406 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
407 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
408 * // Create a comma separated list from an array of objects
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
409 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
410 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
411 * "sAjaxSource": "sources/deep.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
412 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
413 * { "mData": "engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
414 * { "mData": "browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
415 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
416 * "mData": "platform",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
417 * "mRender": "[, ].name"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
418 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
419 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
420 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
421 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
422 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
423 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
424 * // Use as a function to create a link from the data source
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
425 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
426 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
427 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
428 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
429 * "aTargets": [ 0 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
430 * "mData": "download_link",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
431 * "mRender": function ( data, type, full ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
432 * return '<a href="'+data+'">Download</a>';
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
433 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
434 * ]
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 "mRender": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
439
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
440
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
441 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
442 * Change the cell type created for the column - either TD cells or TH cells. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
443 * can be useful as TH cells have semantic meaning in the table body, allowing them
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
444 * to act as a header for a row (you may wish to add scope='row' to the TH elements).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
445 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
446 * @default td
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
447 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
448 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
449 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
450 * // Make the first column use TH cells
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
451 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
452 * var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
453 * "aoColumnDefs": [ {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
454 * "aTargets": [ 0 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
455 * "sCellType": "th"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
456 * } ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
457 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
458 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
459 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
460 "sCellType": "td",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
461
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
462
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
463 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
464 * Class to give to each cell in this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
465 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
466 * @default <i>Empty string</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
467 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
468 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
469 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
470 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
471 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
472 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
473 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
474 * { "sClass": "my_class", "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
475 * ]
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 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
480 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
481 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
482 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
483 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
484 * { "sClass": "my_class" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
485 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
486 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
487 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
488 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
489 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
490 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
491 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
492 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
493 "sClass": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
494
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
495 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
496 * When DataTables calculates the column widths to assign to each column,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
497 * it finds the longest string in each column and then constructs a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
498 * temporary table and reads the widths from that. The problem with this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
499 * is that "mmm" is much wider then "iiii", but the latter is a longer
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
500 * string - thus the calculation can go wrong (doing it properly and putting
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
501 * it into an DOM object and measuring that is horribly(!) slow). Thus as
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
502 * a "work around" we provide this option. It will append its value to the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
503 * text that is found to be the longest string for the column - i.e. padding.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
504 * Generally you shouldn't need this, and it is not documented on the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
505 * general DataTables.net documentation
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
506 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
507 * @default <i>Empty string<i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
508 * @dtopt Columns
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 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
512 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
513 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
514 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
515 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
516 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
517 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
518 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
519 * "sContentPadding": "mmm"
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 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
523 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
524 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
525 "sContentPadding": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
526
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
527
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
528 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
529 * Allows a default value to be given for a column's data, and will be used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
530 * whenever a null data source is encountered (this can be because mData
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
531 * is set to null, or because the data source itself is null).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
532 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
533 * @default null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
534 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
535 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
536 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
537 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
538 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
539 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
540 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
541 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
542 * "mData": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
543 * "sDefaultContent": "Edit",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
544 * "aTargets": [ -1 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
545 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
546 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
547 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
548 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
549 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
550 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
551 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
552 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
553 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
554 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
555 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
556 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
557 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
558 * {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
559 * "mData": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
560 * "sDefaultContent": "Edit"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
561 * }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
562 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
563 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
564 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
565 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
566 "sDefaultContent": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
567
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
568
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
569 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
570 * This parameter is only used in DataTables' server-side processing. It can
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
571 * be exceptionally useful to know what columns are being displayed on the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
572 * client side, and to map these to database fields. When defined, the names
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
573 * also allow DataTables to reorder information from the server if it comes
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
574 * back in an unexpected order (i.e. if you switch your columns around on the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
575 * client-side, your server-side code does not also need updating).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
576 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
577 * @default <i>Empty string</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
578 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
579 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
580 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
581 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
582 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
583 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
584 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
585 * { "sName": "engine", "aTargets": [ 0 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
586 * { "sName": "browser", "aTargets": [ 1 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
587 * { "sName": "platform", "aTargets": [ 2 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
588 * { "sName": "version", "aTargets": [ 3 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
589 * { "sName": "grade", "aTargets": [ 4 ] }
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 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
593 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
594 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
595 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
596 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
597 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
598 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
599 * { "sName": "engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
600 * { "sName": "browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
601 * { "sName": "platform" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
602 * { "sName": "version" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
603 * { "sName": "grade" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
604 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
605 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
606 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
607 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
608 "sName": "",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
609
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
610
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
611 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
612 * Defines a data source type for the sorting which can be used to read
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
613 * real-time information from the table (updating the internally cached
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
614 * version) prior to sorting. This allows sorting to occur on user editable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
615 * elements such as form inputs.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
616 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
617 * @default std
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
618 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
619 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
620 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
621 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
622 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
623 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
624 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
625 * { "sSortDataType": "dom-text", "aTargets": [ 2, 3 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
626 * { "sType": "numeric", "aTargets": [ 3 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
627 * { "sSortDataType": "dom-select", "aTargets": [ 4 ] },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
628 * { "sSortDataType": "dom-checkbox", "aTargets": [ 5 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
629 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
630 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
631 * } );
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 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
635 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
636 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
637 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
638 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
639 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
640 * { "sSortDataType": "dom-text" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
641 * { "sSortDataType": "dom-text", "sType": "numeric" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
642 * { "sSortDataType": "dom-select" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
643 * { "sSortDataType": "dom-checkbox" }
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 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
647 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
648 "sSortDataType": "std",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
649
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
650
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
651 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
652 * The title of this column.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
653 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
654 * @default null <i>Derived from the 'TH' value for this column in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
655 * original HTML table.</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
656 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
657 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
658 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
659 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
660 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
661 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
662 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
663 * { "sTitle": "My column title", "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
664 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
665 * } );
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 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
669 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
670 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
671 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
672 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
673 * { "sTitle": "My column title" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
674 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
675 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
676 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
677 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
678 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
679 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
680 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
681 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
682 "sTitle": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
683
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
684
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
685 /**
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
686 * The type allows you to specify how the data for this column will be sorted.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
687 * Four types (string, numeric, date and html (which will strip HTML tags
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
688 * before sorting)) are currently available. Note that only date formats
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
689 * understood by Javascript's Date() object will be accepted as type date. For
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
690 * example: "Mar 26, 2008 5:03 PM". May take the values: 'string', 'numeric',
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
691 * 'date' or 'html' (by default). Further types can be adding through
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
692 * plug-ins.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
693 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
694 * @default null <i>Auto-detected from raw data</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
695 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
696 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
697 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
698 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
699 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
700 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
701 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
702 * { "sType": "html", "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
703 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
704 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
705 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
706 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
707 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
708 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
709 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
710 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
711 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
712 * { "sType": "html" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
713 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
714 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
715 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
716 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
717 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
718 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
719 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
720 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
721 "sType": null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
722
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 * Defining the width of the column, this parameter may take any CSS value
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
726 * (3em, 20px etc). DataTables apples 'smart' widths to columns which have not
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
727 * been given a specific width through this interface ensuring that the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
728 * remains readable.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
729 * @type string
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
730 * @default null <i>Automatic</i>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
731 * @dtopt Columns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
732 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
733 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
734 * // Using aoColumnDefs
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
735 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
736 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
737 * "aoColumnDefs": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
738 * { "sWidth": "20%", "aTargets": [ 0 ] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
739 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
740 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
741 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
742 *
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
743 * @example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
744 * // Using aoColumns
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
745 * $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
746 * $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
747 * "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
748 * { "sWidth": "20%" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
749 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
750 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
751 * null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
752 * null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
753 * ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
754 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
755 * } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
756 */
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
757 "sWidth": null
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
758 };
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
759