Mercurial > repos > saskia-hiltemann > ireport
comparison DataTables-1.9.4/media/src/model/model.column.js @ 0:ac5f9272033b draft
first upload
author | saskia-hiltemann |
---|---|
date | Tue, 01 Jul 2014 11:42:23 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ac5f9272033b |
---|---|
1 | |
2 | |
3 | |
4 /** | |
5 * Template object for the column information object in DataTables. This object | |
6 * is held in the settings aoColumns array and contains all the information that | |
7 * DataTables needs about each individual column. | |
8 * | |
9 * Note that this object is related to {@link DataTable.defaults.columns} | |
10 * but this one is the internal data store for DataTables's cache of columns. | |
11 * It should NOT be manipulated outside of DataTables. Any configuration should | |
12 * be done through the initialisation options. | |
13 * @namespace | |
14 */ | |
15 DataTable.models.oColumn = { | |
16 /** | |
17 * A list of the columns that sorting should occur on when this column | |
18 * is sorted. That this property is an array allows multi-column sorting | |
19 * to be defined for a column (for example first name / last name columns | |
20 * would benefit from this). The values are integers pointing to the | |
21 * columns to be sorted on (typically it will be a single integer pointing | |
22 * at itself, but that doesn't need to be the case). | |
23 * @type array | |
24 */ | |
25 "aDataSort": null, | |
26 | |
27 /** | |
28 * Define the sorting directions that are applied to the column, in sequence | |
29 * as the column is repeatedly sorted upon - i.e. the first value is used | |
30 * as the sorting direction when the column if first sorted (clicked on). | |
31 * Sort it again (click again) and it will move on to the next index. | |
32 * Repeat until loop. | |
33 * @type array | |
34 */ | |
35 "asSorting": null, | |
36 | |
37 /** | |
38 * Flag to indicate if the column is searchable, and thus should be included | |
39 * in the filtering or not. | |
40 * @type boolean | |
41 */ | |
42 "bSearchable": null, | |
43 | |
44 /** | |
45 * Flag to indicate if the column is sortable or not. | |
46 * @type boolean | |
47 */ | |
48 "bSortable": null, | |
49 | |
50 /** | |
51 * <code>Deprecated</code> When using fnRender, you have two options for what | |
52 * to do with the data, and this property serves as the switch. Firstly, you | |
53 * can have the sorting and filtering use the rendered value (true - default), | |
54 * or you can have the sorting and filtering us the original value (false). | |
55 * | |
56 * Please note that this option has now been deprecated and will be removed | |
57 * in the next version of DataTables. Please use mRender / mData rather than | |
58 * fnRender. | |
59 * @type boolean | |
60 * @deprecated | |
61 */ | |
62 "bUseRendered": null, | |
63 | |
64 /** | |
65 * Flag to indicate if the column is currently visible in the table or not | |
66 * @type boolean | |
67 */ | |
68 "bVisible": null, | |
69 | |
70 /** | |
71 * Flag to indicate to the type detection method if the automatic type | |
72 * detection should be used, or if a column type (sType) has been specified | |
73 * @type boolean | |
74 * @default true | |
75 * @private | |
76 */ | |
77 "_bAutoType": true, | |
78 | |
79 /** | |
80 * Developer definable function that is called whenever a cell is created (Ajax source, | |
81 * etc) or processed for input (DOM source). This can be used as a compliment to mRender | |
82 * allowing you to modify the DOM element (add background colour for example) when the | |
83 * element is available. | |
84 * @type function | |
85 * @param {element} nTd The TD node that has been created | |
86 * @param {*} sData The Data for the cell | |
87 * @param {array|object} oData The data for the whole row | |
88 * @param {int} iRow The row index for the aoData data store | |
89 * @default null | |
90 */ | |
91 "fnCreatedCell": null, | |
92 | |
93 /** | |
94 * Function to get data from a cell in a column. You should <b>never</b> | |
95 * access data directly through _aData internally in DataTables - always use | |
96 * the method attached to this property. It allows mData to function as | |
97 * required. This function is automatically assigned by the column | |
98 * initialisation method | |
99 * @type function | |
100 * @param {array|object} oData The data array/object for the array | |
101 * (i.e. aoData[]._aData) | |
102 * @param {string} sSpecific The specific data type you want to get - | |
103 * 'display', 'type' 'filter' 'sort' | |
104 * @returns {*} The data for the cell from the given row's data | |
105 * @default null | |
106 */ | |
107 "fnGetData": null, | |
108 | |
109 /** | |
110 * <code>Deprecated</code> Custom display function that will be called for the | |
111 * display of each cell in this column. | |
112 * | |
113 * Please note that this option has now been deprecated and will be removed | |
114 * in the next version of DataTables. Please use mRender / mData rather than | |
115 * fnRender. | |
116 * @type function | |
117 * @param {object} o Object with the following parameters: | |
118 * @param {int} o.iDataRow The row in aoData | |
119 * @param {int} o.iDataColumn The column in question | |
120 * @param {array} o.aData The data for the row in question | |
121 * @param {object} o.oSettings The settings object for this DataTables instance | |
122 * @returns {string} The string you which to use in the display | |
123 * @default null | |
124 * @deprecated | |
125 */ | |
126 "fnRender": null, | |
127 | |
128 /** | |
129 * Function to set data for a cell in the column. You should <b>never</b> | |
130 * set the data directly to _aData internally in DataTables - always use | |
131 * this method. It allows mData to function as required. This function | |
132 * is automatically assigned by the column initialisation method | |
133 * @type function | |
134 * @param {array|object} oData The data array/object for the array | |
135 * (i.e. aoData[]._aData) | |
136 * @param {*} sValue Value to set | |
137 * @default null | |
138 */ | |
139 "fnSetData": null, | |
140 | |
141 /** | |
142 * Property to read the value for the cells in the column from the data | |
143 * source array / object. If null, then the default content is used, if a | |
144 * function is given then the return from the function is used. | |
145 * @type function|int|string|null | |
146 * @default null | |
147 */ | |
148 "mData": null, | |
149 | |
150 /** | |
151 * Partner property to mData which is used (only when defined) to get | |
152 * the data - i.e. it is basically the same as mData, but without the | |
153 * 'set' option, and also the data fed to it is the result from mData. | |
154 * This is the rendering method to match the data method of mData. | |
155 * @type function|int|string|null | |
156 * @default null | |
157 */ | |
158 "mRender": null, | |
159 | |
160 /** | |
161 * Unique header TH/TD element for this column - this is what the sorting | |
162 * listener is attached to (if sorting is enabled.) | |
163 * @type node | |
164 * @default null | |
165 */ | |
166 "nTh": null, | |
167 | |
168 /** | |
169 * Unique footer TH/TD element for this column (if there is one). Not used | |
170 * in DataTables as such, but can be used for plug-ins to reference the | |
171 * footer for each column. | |
172 * @type node | |
173 * @default null | |
174 */ | |
175 "nTf": null, | |
176 | |
177 /** | |
178 * The class to apply to all TD elements in the table's TBODY for the column | |
179 * @type string | |
180 * @default null | |
181 */ | |
182 "sClass": null, | |
183 | |
184 /** | |
185 * When DataTables calculates the column widths to assign to each column, | |
186 * it finds the longest string in each column and then constructs a | |
187 * temporary table and reads the widths from that. The problem with this | |
188 * is that "mmm" is much wider then "iiii", but the latter is a longer | |
189 * string - thus the calculation can go wrong (doing it properly and putting | |
190 * it into an DOM object and measuring that is horribly(!) slow). Thus as | |
191 * a "work around" we provide this option. It will append its value to the | |
192 * text that is found to be the longest string for the column - i.e. padding. | |
193 * @type string | |
194 */ | |
195 "sContentPadding": null, | |
196 | |
197 /** | |
198 * Allows a default value to be given for a column's data, and will be used | |
199 * whenever a null data source is encountered (this can be because mData | |
200 * is set to null, or because the data source itself is null). | |
201 * @type string | |
202 * @default null | |
203 */ | |
204 "sDefaultContent": null, | |
205 | |
206 /** | |
207 * Name for the column, allowing reference to the column by name as well as | |
208 * by index (needs a lookup to work by name). | |
209 * @type string | |
210 */ | |
211 "sName": null, | |
212 | |
213 /** | |
214 * Custom sorting data type - defines which of the available plug-ins in | |
215 * afnSortData the custom sorting will use - if any is defined. | |
216 * @type string | |
217 * @default std | |
218 */ | |
219 "sSortDataType": 'std', | |
220 | |
221 /** | |
222 * Class to be applied to the header element when sorting on this column | |
223 * @type string | |
224 * @default null | |
225 */ | |
226 "sSortingClass": null, | |
227 | |
228 /** | |
229 * Class to be applied to the header element when sorting on this column - | |
230 * when jQuery UI theming is used. | |
231 * @type string | |
232 * @default null | |
233 */ | |
234 "sSortingClassJUI": null, | |
235 | |
236 /** | |
237 * Title of the column - what is seen in the TH element (nTh). | |
238 * @type string | |
239 */ | |
240 "sTitle": null, | |
241 | |
242 /** | |
243 * Column sorting and filtering type | |
244 * @type string | |
245 * @default null | |
246 */ | |
247 "sType": null, | |
248 | |
249 /** | |
250 * Width of the column | |
251 * @type string | |
252 * @default null | |
253 */ | |
254 "sWidth": null, | |
255 | |
256 /** | |
257 * Width of the column when it was first "encountered" | |
258 * @type string | |
259 * @default null | |
260 */ | |
261 "sWidthOrig": null | |
262 }; | |
263 |