corrade-http-templates – Blame information for rev 2

Subversion Repositories:
Rev:
Rev Author Line No. Line
2 eva 1 /*! DataTables 1.10.7
2 * ©2008-2014 SpryMedia Ltd - datatables.net/license
3 */
4  
5 /**
6 * @summary DataTables
7 * @description Paginate, search and order HTML tables
8 * @version 1.10.7
9 * @file jquery.dataTables.js
10 * @author SpryMedia Ltd (www.sprymedia.co.uk)
11 * @contact www.sprymedia.co.uk/contact
12 * @copyright Copyright 2008-2014 SpryMedia Ltd.
13 *
14 * This source file is free software, available under the following license:
15 * MIT license - http://datatables.net/license
16 *
17 * This source file is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
20 *
21 * For details please refer to: http://www.datatables.net
22 */
23  
24 /*jslint evil: true, undef: true, browser: true */
25 /*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnScrollBarWidth,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/
26  
27 (/** @lends <global> */function( window, document, undefined ) {
28  
29 (function( factory ) {
30 "use strict";
31  
32 if ( typeof define === 'function' && define.amd ) {
33 // Define as an AMD module if possible
34 define( 'datatables', ['jquery'], factory );
35 }
36 else if ( typeof exports === 'object' ) {
37 // Node/CommonJS
38 module.exports = factory( require( 'jquery' ) );
39 }
40 else if ( jQuery && !jQuery.fn.dataTable ) {
41 // Define using browser globals otherwise
42 // Prevent multiple instantiations if the script is loaded twice
43 factory( jQuery );
44 }
45 }
46 (/** @lends <global> */function( $ ) {
47 "use strict";
48  
49 /**
50 * DataTables is a plug-in for the jQuery Javascript library. It is a highly
51 * flexible tool, based upon the foundations of progressive enhancement,
52 * which will add advanced interaction controls to any HTML table. For a
53 * full list of features please refer to
54 * [DataTables.net](href="http://datatables.net).
55 *
56 * Note that the `DataTable` object is not a global variable but is aliased
57 * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
58 * be accessed.
59 *
60 * @class
61 * @param {object} [init={}] Configuration object for DataTables. Options
62 * are defined by {@link DataTable.defaults}
63 * @requires jQuery 1.7+
64 *
65 * @example
66 * // Basic initialisation
67 * $(document).ready( function {
68 * $('#example').dataTable();
69 * } );
70 *
71 * @example
72 * // Initialisation with configuration options - in this case, disable
73 * // pagination and sorting.
74 * $(document).ready( function {
75 * $('#example').dataTable( {
76 * "paginate": false,
77 * "sort": false
78 * } );
79 * } );
80 */
81 var DataTable;
82  
83  
84 /*
85 * It is useful to have variables which are scoped locally so only the
86 * DataTables functions can access them and they don't leak into global space.
87 * At the same time these functions are often useful over multiple files in the
88 * core and API, so we list, or at least document, all variables which are used
89 * by DataTables as private variables here. This also ensures that there is no
90 * clashing of variable names and that they can easily referenced for reuse.
91 */
92  
93  
94 // Defined else where
95 // _selector_run
96 // _selector_opts
97 // _selector_first
98 // _selector_row_indexes
99  
100 var _ext; // DataTable.ext
101 var _Api; // DataTable.Api
102 var _api_register; // DataTable.Api.register
103 var _api_registerPlural; // DataTable.Api.registerPlural
104  
105 var _re_dic = {};
106 var _re_new_lines = /[\r\n]/g;
107 var _re_html = /<.*?>/g;
108 <.*?> var _re_date_start = /^[\w\+\-]/;
109 <.*?> var _re_date_end = /[\w\+\-]$/;
110  
111 <.*?> // Escape regular expression special characters
112 <.*?> var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
113  
114 <.*?> // http://en.wikipedia.org/wiki/Foreign_exchange_market
115 <.*?> // - \u20BD - Russian ruble.
116 <.*?> // - \u20a9 - South Korean Won
117 <.*?> // - \u20BA - Turkish Lira
118 <.*?> // - \u20B9 - Indian Rupee
119 <.*?> // - R - Brazil (R$) and South Africa
120 <.*?> // - fr - Swiss Franc
121 <.*?> // - kr - Swedish krona, Norwegian krone and Danish krone
122 <.*?> // - \u2009 is thin space and \u202F is narrow no-break space, both used in many
123 <.*?> // standards as thousands separators.
124 <.*?> var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi;
125  
126  
127 <.*?> var _empty = function ( d ) {
128 <.*?> return !d || d === true || d === '-' ? true : false;
129 <.*?> };
130  
131  
132 <.*?> var _intVal = function ( s ) {
133 <.*?> var integer = parseInt( s, 10 );
134 <.*?> return !isNaN(integer) && isFinite(s) ? integer : null;
135 <.*?> };
136  
137 <.*?> // Convert from a formatted number with characters other than `.` as the
138 <.*?> // decimal place, to a Javascript number
139 <.*?> var _numToDecimal = function ( num, decimalPoint ) {
140 <.*?> // Cache created regular expressions for speed as this function is called often
141 <.*?> if ( ! _re_dic[ decimalPoint ] ) {
142 <.*?> _re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );
143 <.*?> }
144 <.*?> return typeof num === 'string' && decimalPoint !== '.' ?
145 <.*?> num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :
146 <.*?> num;
147 <.*?> };
148  
149  
150 <.*?> var _isNumber = function ( d, decimalPoint, formatted ) {
151 <.*?> var strType = typeof d === 'string';
152  
153 <.*?> // If empty return immediately so there must be a number if it is a
154 <.*?> // formatted string (this stops the string "k", or "kr", etc being detected
155 <.*?> // as a formatted number for currency
156 <.*?> if ( _empty( d ) ) {
157 <.*?> return true;
158 <.*?> }
159  
160 <.*?> if ( decimalPoint && strType ) {
161 <.*?> d = _numToDecimal( d, decimalPoint );
162 <.*?> }
163  
164 <.*?> if ( formatted && strType ) {
165 <.*?> d = d.replace( _re_formatted_numeric, '' );
166 <.*?> }
167  
168 <.*?> return !isNaN( parseFloat(d) ) && isFinite( d );
169 <.*?> };
170  
171  
172 <.*?> // A string without HTML in it can be considered to be HTML still
173 <.*?> var _isHtml = function ( d ) {
174 <.*?> return _empty( d ) || typeof d === 'string';
175 <.*?> };
176  
177  
178 <.*?> var _htmlNumeric = function ( d, decimalPoint, formatted ) {
179 <.*?> if ( _empty( d ) ) {
180 <.*?> return true;
181 <.*?> }
182  
183 <.*?> var html = _isHtml( d );
184 <.*?> return ! html ?
185 <.*?> null :
186 <.*?> _isNumber( _stripHtml( d ), decimalPoint, formatted ) ?
187 <.*?> true :
188 <.*?> null;
189 <.*?> };
190  
191  
192 <.*?> var _pluck = function ( a, prop, prop2 ) {
193 <.*?> var out = [];
194 <.*?> var i=0, ien=a.length;
195  
196 <.*?> // Could have the test in the loop for slightly smaller code, but speed
197 <.*?> // is essential here
198 <.*?> if ( prop2 !== undefined ) {
199 <.*?> for ( ; i<ien ; i++ ) {
200 <.*?> if ( a[i] && a[i][ prop ] ) {
201 <.*?> out.push( a[i][ prop ][ prop2 ] );
202 <.*?> }
203 <.*?> }
204 <.*?> }
205 <.*?> else {
206 <.*?> for ( ; i<ien ; i++ ) {
207 <.*?> if ( a[i] ) {
208 <.*?> out.push( a[i][ prop ] );
209 <.*?> }
210 <.*?> }
211 <.*?> }
212  
213 <.*?> return out;
214 <.*?> };
215  
216  
217 <.*?> // Basically the same as _pluck, but rather than looping over `a` we use `order`
218 <.*?> // as the indexes to pick from `a`
219 <.*?> var _pluck_order = function ( a, order, prop, prop2 )
220 <.*?> {
221 <.*?> var out = [];
222 <.*?> var i=0, ien=order.length;
223  
224 <.*?> // Could have the test in the loop for slightly smaller code, but speed
225 <.*?> // is essential here
226 <.*?> if ( prop2 !== undefined ) {
227 <.*?> for ( ; i<ien ; i++ ) {
228 <.*?> if ( a[ order[i] ][ prop ] ) {
229 <.*?> out.push( a[ order[i] ][ prop ][ prop2 ] );
230 <.*?> }
231 <.*?> }
232 <.*?> }
233 <.*?> else {
234 <.*?> for ( ; i<ien ; i++ ) {
235 <.*?> out.push( a[ order[i] ][ prop ] );
236 <.*?> }
237 <.*?> }
238  
239 <.*?> return out;
240 <.*?> };
241  
242  
243 <.*?> var _range = function ( len, start )
244 <.*?> {
245 <.*?> var out = [];
246 <.*?> var end;
247  
248 <.*?> if ( start === undefined ) {
249 <.*?> start = 0;
250 <.*?> end = len;
251 <.*?> }
252 <.*?> else {
253 <.*?> end = start;
254 <.*?> start = len;
255 <.*?> }
256  
257 <.*?> for ( var i=start ; i<end ; i++ ) {
258 <.*?> out.push( i );
259 <.*?> }
260  
261 <.*?> return out;
262 <.*?> };
263  
264  
265 <.*?> var _removeEmpty = function ( a )
266 <.*?> {
267 <.*?> var out = [];
268  
269 <.*?> for ( var i=0, ien=a.length ; i<ien ; i++ ) {
270 <.*?> if ( a[i] ) { // careful - will remove all falsy values!
271 <.*?> out.push( a[i] );
272 <.*?> }
273 <.*?> }
274  
275 <.*?> return out;
276 <.*?> };
277  
278  
279 <.*?> var _stripHtml = function ( d ) {
280 <.*?> return d.replace( _re_html, '' );
281 <.*?> };
282  
283  
284 <.*?> /**
285 <.*?> * Find the unique elements in a source array.
286 <.*?> *
287 <.*?> * @param {array} src Source array
288 <.*?> * @return {array} Array of unique items
289 <.*?> * @ignore
290 <.*?> */
291 <.*?> var _unique = function ( src )
292 <.*?> {
293 <.*?> // A faster unique method is to use object keys to identify used values,
294 <.*?> // but this doesn't work with arrays or objects, which we must also
295 <.*?> // consider. See jsperf.com/compare-array-unique-versions/4 for more
296 <.*?> // information.
297 <.*?> var
298 <.*?> out = [],
299 <.*?> val,
300 <.*?> i, ien=src.length,
301 <.*?> j, k=0;
302  
303 <.*?> again: for ( i=0 ; i<ien ; i++ ) {
304 <.*?> val = src[i];
305  
306 <.*?> for ( j=0 ; j<k ; j++ ) {
307 <.*?> if ( out[j] === val ) {
308 <.*?> continue again;
309 <.*?> }
310 <.*?> }
311  
312 <.*?> out.push( val );
313 <.*?> k++;
314 <.*?> }
315  
316 <.*?> return out;
317 <.*?> };
318  
319  
320  
321 <.*?> /**
322 <.*?> * Create a mapping object that allows camel case parameters to be looked up
323 <.*?> * for their Hungarian counterparts. The mapping is stored in a private
324 <.*?> * parameter called `_hungarianMap` which can be accessed on the source object.
325 <.*?> * @param {object} o
326 <.*?> * @memberof DataTable#oApi
327 <.*?> */
328 <.*?> function _fnHungarianMap ( o )
329 <.*?> {
330 <.*?> var
331 <.*?> hungarian = 'a aa ai ao as b fn i m o s ',
332 <.*?> match,
333 <.*?> newKey,
334 <.*?> map = {};
335  
336 <.*?> $.each( o, function (key, val) {
337 <.*?> match = key.match(/^([^A-Z]+?)([A-Z])/);
338  
339 <.*?> if ( match && hungarian.indexOf(match[1]+' ') !== -1 )
340 <.*?> {
341 <.*?> newKey = key.replace( match[0], match[2].toLowerCase() );
342 <.*?> map[ newKey ] = key;
343  
344 <.*?> if ( match[1] === 'o' )
345 <.*?> {
346 <.*?> _fnHungarianMap( o[key] );
347 <.*?> }
348 <.*?> }
349 <.*?> } );
350  
351 <.*?> o._hungarianMap = map;
352 <.*?> }
353  
354  
355 <.*?> /**
356 <.*?> * Convert from camel case parameters to Hungarian, based on a Hungarian map
357 <.*?> * created by _fnHungarianMap.
358 <.*?> * @param {object} src The model object which holds all parameters that can be
359 <.*?> * mapped.
360 <.*?> * @param {object} user The object to convert from camel case to Hungarian.
361 <.*?> * @param {boolean} force When set to `true`, properties which already have a
362 <.*?> * Hungarian value in the `user` object will be overwritten. Otherwise they
363 <.*?> * won't be.
364 <.*?> * @memberof DataTable#oApi
365 <.*?> */
366 <.*?> function _fnCamelToHungarian ( src, user, force )
367 <.*?> {
368 <.*?> if ( ! src._hungarianMap ) {
369 <.*?> _fnHungarianMap( src );
370 <.*?> }
371  
372 <.*?> var hungarianKey;
373  
374 <.*?> $.each( user, function (key, val) {
375 <.*?> hungarianKey = src._hungarianMap[ key ];
376  
377 <.*?> if ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )
378 <.*?> {
379 <.*?> // For objects, we need to buzz down into the object to copy parameters
380 <.*?> if ( hungarianKey.charAt(0) === 'o' )
381 <.*?> {
382 <.*?> // Copy the camelCase options over to the hungarian
383 <.*?> if ( ! user[ hungarianKey ] ) {
384 <.*?> user[ hungarianKey ] = {};
385 <.*?> }
386 <.*?> $.extend( true, user[hungarianKey], user[key] );
387  
388 <.*?> _fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );
389 <.*?> }
390 <.*?> else {
391 <.*?> user[hungarianKey] = user[ key ];
392 <.*?> }
393 <.*?> }
394 <.*?> } );
395 <.*?> }
396  
397  
398 <.*?> /**
399 <.*?> * Language compatibility - when certain options are given, and others aren't, we
400 <.*?> * need to duplicate the values over, in order to provide backwards compatibility
401 <.*?> * with older language files.
402 <.*?> * @param {object} oSettings dataTables settings object
403 <.*?> * @memberof DataTable#oApi
404 <.*?> */
405 <.*?> function _fnLanguageCompat( lang )
406 <.*?> {
407 <.*?> var defaults = DataTable.defaults.oLanguage;
408 <.*?> var zeroRecords = lang.sZeroRecords;
409  
410 <.*?> /* Backwards compatibility - if there is no sEmptyTable given, then use the same as
411 <.*?> * sZeroRecords - assuming that is given.
412 <.*?> */
413 <.*?> if ( ! lang.sEmptyTable && zeroRecords &&
414 <.*?> defaults.sEmptyTable === "No data available in table" )
415 <.*?> {
416 <.*?> _fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
417 <.*?> }
418  
419 <.*?> /* Likewise with loading records */
420 <.*?> if ( ! lang.sLoadingRecords && zeroRecords &&
421 <.*?> defaults.sLoadingRecords === "Loading..." )
422 <.*?> {
423 <.*?> _fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
424 <.*?> }
425  
426 <.*?> // Old parameter name of the thousands separator mapped onto the new
427 <.*?> if ( lang.sInfoThousands ) {
428 <.*?> lang.sThousands = lang.sInfoThousands;
429 <.*?> }
430  
431 <.*?> var decimal = lang.sDecimal;
432 <.*?> if ( decimal ) {
433 <.*?> _addNumericSort( decimal );
434 <.*?> }
435 <.*?> }
436  
437  
438 <.*?> /**
439 <.*?> * Map one parameter onto another
440 <.*?> * @param {object} o Object to map
441 <.*?> * @param {*} knew The new parameter name
442 <.*?> * @param {*} old The old parameter name
443 <.*?> */
444 <.*?> var _fnCompatMap = function ( o, knew, old ) {
445 <.*?> if ( o[ knew ] !== undefined ) {
446 <.*?> o[ old ] = o[ knew ];
447 <.*?> }
448 <.*?> };
449  
450  
451 <.*?> /**
452 <.*?> * Provide backwards compatibility for the main DT options. Note that the new
453 <.*?> * options are mapped onto the old parameters, so this is an external interface
454 <.*?> * change only.
455 <.*?> * @param {object} init Object to map
456 <.*?> */
457 <.*?> function _fnCompatOpts ( init )
458 <.*?> {
459 <.*?> _fnCompatMap( init, 'ordering', 'bSort' );
460 <.*?> _fnCompatMap( init, 'orderMulti', 'bSortMulti' );
461 <.*?> _fnCompatMap( init, 'orderClasses', 'bSortClasses' );
462 <.*?> _fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );
463 <.*?> _fnCompatMap( init, 'order', 'aaSorting' );
464 <.*?> _fnCompatMap( init, 'orderFixed', 'aaSortingFixed' );
465 <.*?> _fnCompatMap( init, 'paging', 'bPaginate' );
466 <.*?> _fnCompatMap( init, 'pagingType', 'sPaginationType' );
467 <.*?> _fnCompatMap( init, 'pageLength', 'iDisplayLength' );
468 <.*?> _fnCompatMap( init, 'searching', 'bFilter' );
469  
470 <.*?> // Column search objects are in an array, so it needs to be converted
471 <.*?> // element by element
472 <.*?> var searchCols = init.aoSearchCols;
473  
474 <.*?> if ( searchCols ) {
475 <.*?> for ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {
476 <.*?> if ( searchCols[i] ) {
477 <.*?> _fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );
478 <.*?> }
479 <.*?> }
480 <.*?> }
481 <.*?> }
482  
483  
484 <.*?> /**
485 <.*?> * Provide backwards compatibility for column options. Note that the new options
486 <.*?> * are mapped onto the old parameters, so this is an external interface change
487 <.*?> * only.
488 <.*?> * @param {object} init Object to map
489 <.*?> */
490 <.*?> function _fnCompatCols ( init )
491 <.*?> {
492 <.*?> _fnCompatMap( init, 'orderable', 'bSortable' );
493 <.*?> _fnCompatMap( init, 'orderData', 'aDataSort' );
494 <.*?> _fnCompatMap( init, 'orderSequence', 'asSorting' );
495 <.*?> _fnCompatMap( init, 'orderDataType', 'sortDataType' );
496  
497 <.*?> // orderData can be given as an integer
498 <.*?> var dataSort = init.aDataSort;
499 <.*?> if ( dataSort && ! $.isArray( dataSort ) ) {
500 <.*?> init.aDataSort = [ dataSort ];
501 <.*?> }
502 <.*?> }
503  
504  
505 <.*?> /**
506 <.*?> * Browser feature detection for capabilities, quirks
507 <.*?> * @param {object} settings dataTables settings object
508 <.*?> * @memberof DataTable#oApi
509 <.*?> */
510 <.*?> function _fnBrowserDetect( settings )
511 <.*?> {
512 <.*?> var browser = settings.oBrowser;
513  
514 <.*?> // Scrolling feature / quirks detection
515 <.*?> var n = $('<div/>')
516 <.*?> .css( {
517 <.*?> position: 'absolute',
518 <.*?> top: 0,
519 <.*?> left: 0,
520 <.*?> height: 1,
521 <.*?> width: 1,
522 <.*?> overflow: 'hidden'
523 <.*?> } )
524 <.*?> .append(
525 <.*?> $('<div/>')
526 <.*?> .css( {
527 <.*?> position: 'absolute',
528 <.*?> top: 1,
529 <.*?> left: 1,
530 <.*?> width: 100,
531 <.*?> overflow: 'scroll'
532 <.*?> } )
533 <.*?> .append(
534 <.*?> $('<div class="test"/>')
535 <.*?> .css( {
536 <.*?> width: '100%',
537 <.*?> height: 10
538 <.*?> } )
539 <.*?> )
540 <.*?> )
541 <.*?> .appendTo( 'body' );
542  
543 <.*?> var test = n.find('.test');
544  
545 <.*?> // IE6/7 will oversize a width 100% element inside a scrolling element, to
546 <.*?> // include the width of the scrollbar, while other browsers ensure the inner
547 <.*?> // element is contained without forcing scrolling
548 <.*?> browser.bScrollOversize = test[0].offsetWidth === 100;
549  
550 <.*?> // In rtl text layout, some browsers (most, but not all) will place the
551 <.*?> // scrollbar on the left, rather than the right.
552 <.*?> browser.bScrollbarLeft = Math.round( test.offset().left ) !== 1;
553  
554 <.*?> n.remove();
555 <.*?> }
556  
557  
558 <.*?> /**
559 <.*?> * Array.prototype reduce[Right] method, used for browsers which don't support
560 <.*?> * JS 1.6. Done this way to reduce code size, since we iterate either way
561 <.*?> * @param {object} settings dataTables settings object
562 <.*?> * @memberof DataTable#oApi
563 <.*?> */
564 <.*?> function _fnReduce ( that, fn, init, start, end, inc )
565 <.*?> {
566 <.*?> var
567 <.*?> i = start,
568 <.*?> value,
569 <.*?> isSet = false;
570  
571 <.*?> if ( init !== undefined ) {
572 <.*?> value = init;
573 <.*?> isSet = true;
574 <.*?> }
575  
576 <.*?> while ( i !== end ) {
577 <.*?> if ( ! that.hasOwnProperty(i) ) {
578 <.*?> continue;
579 <.*?> }
580  
581 <.*?> value = isSet ?
582 <.*?> fn( value, that[i], i, that ) :
583 <.*?> that[i];
584  
585 <.*?> isSet = true;
586 <.*?> i += inc;
587 <.*?> }
588  
589 <.*?> return value;
590 <.*?> }
591  
592 <.*?> /**
593 <.*?> * Add a column to the list used for the table with default values
594 <.*?> * @param {object} oSettings dataTables settings object
595 <.*?> * @param {node} nTh The th element for this column
596 <.*?> * @memberof DataTable#oApi
597 <.*?> */
598 <.*?> function _fnAddColumn( oSettings, nTh )
599 <.*?> {
600 <.*?> // Add column to aoColumns array
601 <.*?> var oDefaults = DataTable.defaults.column;
602 <.*?> var iCol = oSettings.aoColumns.length;
603 <.*?> var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
604 <.*?> "nTh": nTh ? nTh : document.createElement('th'),
605 <.*?> "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
606 <.*?> "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
607 <.*?> "mData": oDefaults.mData ? oDefaults.mData : iCol,
608 <.*?> idx: iCol
609 <.*?> } );
610 <.*?> oSettings.aoColumns.push( oCol );
611  
612 <.*?> // Add search object for column specific search. Note that the `searchCols[ iCol ]`
613 <.*?> // passed into extend can be undefined. This allows the user to give a default
614 <.*?> // with only some of the parameters defined, and also not give a default
615 <.*?> var searchCols = oSettings.aoPreSearchCols;
616 <.*?> searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );
617  
618 <.*?> // Use the default column options function to initialise classes etc
619 <.*?> _fnColumnOptions( oSettings, iCol, $(nTh).data() );
620 <.*?> }
621  
622  
623 <.*?> /**
624 <.*?> * Apply options for a column
625 <.*?> * @param {object} oSettings dataTables settings object
626 <.*?> * @param {int} iCol column index to consider
627 <.*?> * @param {object} oOptions object with sType, bVisible and bSearchable etc
628 <.*?> * @memberof DataTable#oApi
629 <.*?> */
630 <.*?> function _fnColumnOptions( oSettings, iCol, oOptions )
631 <.*?> {
632 <.*?> var oCol = oSettings.aoColumns[ iCol ];
633 <.*?> var oClasses = oSettings.oClasses;
634 <.*?> var th = $(oCol.nTh);
635  
636 <.*?> // Try to get width information from the DOM. We can't get it from CSS
637 <.*?> // as we'd need to parse the CSS stylesheet. `width` option can override
638 <.*?> if ( ! oCol.sWidthOrig ) {
639 <.*?> // Width attribute
640 <.*?> oCol.sWidthOrig = th.attr('width') || null;
641  
642 <.*?> // Style attribute
643 <.*?> var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/);
644 <.*?> if ( t ) {
645 <.*?> oCol.sWidthOrig = t[1];
646 <.*?> }
647 <.*?> }
648  
649 <.*?> /* User specified column options */
650 <.*?> if ( oOptions !== undefined && oOptions !== null )
651 <.*?> {
652 <.*?> // Backwards compatibility
653 <.*?> _fnCompatCols( oOptions );
654  
655 <.*?> // Map camel case parameters to their Hungarian counterparts
656 <.*?> _fnCamelToHungarian( DataTable.defaults.column, oOptions );
657  
658 <.*?> /* Backwards compatibility for mDataProp */
659 <.*?> if ( oOptions.mDataProp !== undefined && !oOptions.mData )
660 <.*?> {
661 <.*?> oOptions.mData = oOptions.mDataProp;
662 <.*?> }
663  
664 <.*?> if ( oOptions.sType )
665 <.*?> {
666 <.*?> oCol._sManualType = oOptions.sType;
667 <.*?> }
668  
669 <.*?> // `class` is a reserved word in Javascript, so we need to provide
670 <.*?> // the ability to use a valid name for the camel case input
671 <.*?> if ( oOptions.className && ! oOptions.sClass )
672 <.*?> {
673 <.*?> oOptions.sClass = oOptions.className;
674 <.*?> }
675  
676 <.*?> $.extend( oCol, oOptions );
677 <.*?> _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
678  
679 <.*?> /* iDataSort to be applied (backwards compatibility), but aDataSort will take
680 <.*?> * priority if defined
681 <.*?> */
682 <.*?> if ( oOptions.iDataSort !== undefined )
683 <.*?> {
684 <.*?> oCol.aDataSort = [ oOptions.iDataSort ];
685 <.*?> }
686 <.*?> _fnMap( oCol, oOptions, "aDataSort" );
687 <.*?> }
688  
689 <.*?> /* Cache the data get and set functions for speed */
690 <.*?> var mDataSrc = oCol.mData;
691 <.*?> var mData = _fnGetObjectDataFn( mDataSrc );
692 <.*?> var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
693  
694 <.*?> var attrTest = function( src ) {
695 <.*?> return typeof src === 'string' && src.indexOf('@') !== -1;
696 <.*?> };
697 <.*?> oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (
698 <.*?> attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)
699 <.*?> );
700  
701 <.*?> oCol.fnGetData = function (rowData, type, meta) {
702 <.*?> var innerData = mData( rowData, type, undefined, meta );
703  
704 <.*?> return mRender && type ?
705 <.*?> mRender( innerData, type, rowData, meta ) :
706 <.*?> innerData;
707 <.*?> };
708 <.*?> oCol.fnSetData = function ( rowData, val, meta ) {
709 <.*?> return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );
710 <.*?> };
711  
712 <.*?> // Indicate if DataTables should read DOM data as an object or array
713 <.*?> // Used in _fnGetRowElements
714 <.*?> if ( typeof mDataSrc !== 'number' ) {
715 <.*?> oSettings._rowReadObject = true;
716 <.*?> }
717  
718 <.*?> /* Feature sorting overrides column specific when off */
719 <.*?> if ( !oSettings.oFeatures.bSort )
720 <.*?> {
721 <.*?> oCol.bSortable = false;
722 <.*?> th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called
723 <.*?> }
724  
725 <.*?> /* Check that the class assignment is correct for sorting */
726 <.*?> var bAsc = $.inArray('asc', oCol.asSorting) !== -1;
727 <.*?> var bDesc = $.inArray('desc', oCol.asSorting) !== -1;
728 <.*?> if ( !oCol.bSortable || (!bAsc && !bDesc) )
729 <.*?> {
730 <.*?> oCol.sSortingClass = oClasses.sSortableNone;
731 <.*?> oCol.sSortingClassJUI = "";
732 <.*?> }
733 <.*?> else if ( bAsc && !bDesc )
734 <.*?> {
735 <.*?> oCol.sSortingClass = oClasses.sSortableAsc;
736 <.*?> oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed;
737 <.*?> }
738 <.*?> else if ( !bAsc && bDesc )
739 <.*?> {
740 <.*?> oCol.sSortingClass = oClasses.sSortableDesc;
741 <.*?> oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed;
742 <.*?> }
743 <.*?> else
744 <.*?> {
745 <.*?> oCol.sSortingClass = oClasses.sSortable;
746 <.*?> oCol.sSortingClassJUI = oClasses.sSortJUI;
747 <.*?> }
748 <.*?> }
749  
750  
751 <.*?> /**
752 <.*?> * Adjust the table column widths for new data. Note: you would probably want to
753 <.*?> * do a redraw after calling this function!
754 <.*?> * @param {object} settings dataTables settings object
755 <.*?> * @memberof DataTable#oApi
756 <.*?> */
757 <.*?> function _fnAdjustColumnSizing ( settings )
758 <.*?> {
759 <.*?> /* Not interested in doing column width calculation if auto-width is disabled */
760 <.*?> if ( settings.oFeatures.bAutoWidth !== false )
761 <.*?> {
762 <.*?> var columns = settings.aoColumns;
763  
764 <.*?> _fnCalculateColumnWidths( settings );
765 <.*?> for ( var i=0 , iLen=columns.length ; i<iLen ; i++ )
766 <.*?> {
767 <.*?> columns[i].nTh.style.width = columns[i].sWidth;
768 <.*?> }
769 <.*?> }
770  
771 <.*?> var scroll = settings.oScroll;
772 <.*?> if ( scroll.sY !== '' || scroll.sX !== '')
773 <.*?> {
774 <.*?> _fnScrollDraw( settings );
775 <.*?> }
776  
777 <.*?> _fnCallbackFire( settings, null, 'column-sizing', [settings] );
778 <.*?> }
779  
780  
781 <.*?> /**
782 <.*?> * Covert the index of a visible column to the index in the data array (take account
783 <.*?> * of hidden columns)
784 <.*?> * @param {object} oSettings dataTables settings object
785 <.*?> * @param {int} iMatch Visible column index to lookup
786 <.*?> * @returns {int} i the data index
787 <.*?> * @memberof DataTable#oApi
788 <.*?> */
789 <.*?> function _fnVisibleToColumnIndex( oSettings, iMatch )
790 <.*?> {
791 <.*?> var aiVis = _fnGetColumns( oSettings, 'bVisible' );
792  
793 <.*?> return typeof aiVis[iMatch] === 'number' ?
794 <.*?> aiVis[iMatch] :
795 <.*?> null;
796 <.*?> }
797  
798  
799 <.*?> /**
800 <.*?> * Covert the index of an index in the data array and convert it to the visible
801 <.*?> * column index (take account of hidden columns)
802 <.*?> * @param {int} iMatch Column index to lookup
803 <.*?> * @param {object} oSettings dataTables settings object
804 <.*?> * @returns {int} i the data index
805 <.*?> * @memberof DataTable#oApi
806 <.*?> */
807 <.*?> function _fnColumnIndexToVisible( oSettings, iMatch )
808 <.*?> {
809 <.*?> var aiVis = _fnGetColumns( oSettings, 'bVisible' );
810 <.*?> var iPos = $.inArray( iMatch, aiVis );
811  
812 <.*?> return iPos !== -1 ? iPos : null;
813 <.*?> }
814  
815  
816 <.*?> /**
817 <.*?> * Get the number of visible columns
818 <.*?> * @param {object} oSettings dataTables settings object
819 <.*?> * @returns {int} i the number of visible columns
820 <.*?> * @memberof DataTable#oApi
821 <.*?> */
822 <.*?> function _fnVisbleColumns( oSettings )
823 <.*?> {
824 <.*?> return _fnGetColumns( oSettings, 'bVisible' ).length;
825 <.*?> }
826  
827  
828 <.*?> /**
829 <.*?> * Get an array of column indexes that match a given property
830 <.*?> * @param {object} oSettings dataTables settings object
831 <.*?> * @param {string} sParam Parameter in aoColumns to look for - typically
832 <.*?> * bVisible or bSearchable
833 <.*?> * @returns {array} Array of indexes with matched properties
834 <.*?> * @memberof DataTable#oApi
835 <.*?> */
836 <.*?> function _fnGetColumns( oSettings, sParam )
837 <.*?> {
838 <.*?> var a = [];
839  
840 <.*?> $.map( oSettings.aoColumns, function(val, i) {
841 <.*?> if ( val[sParam] ) {
842 <.*?> a.push( i );
843 <.*?> }
844 <.*?> } );
845  
846 <.*?> return a;
847 <.*?> }
848  
849  
850 <.*?> /**
851 <.*?> * Calculate the 'type' of a column
852 <.*?> * @param {object} settings dataTables settings object
853 <.*?> * @memberof DataTable#oApi
854 <.*?> */
855 <.*?> function _fnColumnTypes ( settings )
856 <.*?> {
857 <.*?> var columns = settings.aoColumns;
858 <.*?> var data = settings.aoData;
859 <.*?> var types = DataTable.ext.type.detect;
860 <.*?> var i, ien, j, jen, k, ken;
861 <.*?> var col, cell, detectedType, cache;
862  
863 <.*?> // For each column, spin over the
864 <.*?> for ( i=0, ien=columns.length ; i<ien ; i++ ) {
865 <.*?> col = columns[i];
866 <.*?> cache = [];
867  
868 <.*?> if ( ! col.sType && col._sManualType ) {
869 <.*?> col.sType = col._sManualType;
870 <.*?> }
871 <.*?> else if ( ! col.sType ) {
872 <.*?> for ( j=0, jen=types.length ; j<jen ; j++ ) {
873 <.*?> for ( k=0, ken=data.length ; k<ken ; k++ ) {
874 <.*?> // Use a cache array so we only need to get the type data
875 <.*?> // from the formatter once (when using multiple detectors)
876 <.*?> if ( cache[k] === undefined ) {
877 <.*?> cache[k] = _fnGetCellData( settings, k, i, 'type' );
878 <.*?> }
879  
880 <.*?> detectedType = types[j]( cache[k], settings );
881  
882 <.*?> // If null, then this type can't apply to this column, so
883 <.*?> // rather than testing all cells, break out. There is an
884 <.*?> // exception for the last type which is `html`. We need to
885 <.*?> // scan all rows since it is possible to mix string and HTML
886 <.*?> // types
887 <.*?> if ( ! detectedType && j !== types.length-1 ) {
888 <.*?> break;
889 <.*?> }
890  
891 <.*?> // Only a single match is needed for html type since it is
892 <.*?> // bottom of the pile and very similar to string
893 <.*?> if ( detectedType === 'html' ) {
894 <.*?> break;
895 <.*?> }
896 <.*?> }
897  
898 <.*?> // Type is valid for all data points in the column - use this
899 <.*?> // type
900 <.*?> if ( detectedType ) {
901 <.*?> col.sType = detectedType;
902 <.*?> break;
903 <.*?> }
904 <.*?> }
905  
906 <.*?> // Fall back - if no type was detected, always use string
907 <.*?> if ( ! col.sType ) {
908 <.*?> col.sType = 'string';
909 <.*?> }
910 <.*?> }
911 <.*?> }
912 <.*?> }
913  
914  
915 <.*?> /**
916 <.*?> * Take the column definitions and static columns arrays and calculate how
917 <.*?> * they relate to column indexes. The callback function will then apply the
918 <.*?> * definition found for a column to a suitable configuration object.
919 <.*?> * @param {object} oSettings dataTables settings object
920 <.*?> * @param {array} aoColDefs The aoColumnDefs array that is to be applied
921 <.*?> * @param {array} aoCols The aoColumns array that defines columns individually
922 <.*?> * @param {function} fn Callback function - takes two parameters, the calculated
923 <.*?> * column index and the definition for that column.
924 <.*?> * @memberof DataTable#oApi
925 <.*?> */
926 <.*?> function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
927 <.*?> {
928 <.*?> var i, iLen, j, jLen, k, kLen, def;
929 <.*?> var columns = oSettings.aoColumns;
930  
931 <.*?> // Column definitions with aTargets
932 <.*?> if ( aoColDefs )
933 <.*?> {
934 <.*?> /* Loop over the definitions array - loop in reverse so first instance has priority */
935 <.*?> for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
936 <.*?> {
937 <.*?> def = aoColDefs[i];
938  
939 <.*?> /* Each definition can target multiple columns, as it is an array */
940 <.*?> var aTargets = def.targets !== undefined ?
941 <.*?> def.targets :
942 <.*?> def.aTargets;
943  
944 <.*?> if ( ! $.isArray( aTargets ) )
945 <.*?> {
946 <.*?> aTargets = [ aTargets ];
947 <.*?> }
948  
949 <.*?> for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
950 <.*?> {
951 <.*?> if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
952 <.*?> {
953 <.*?> /* Add columns that we don't yet know about */
954 <.*?> while( columns.length <= aTargets[j] )
955 <.*?> {
956 <.*?> _fnAddColumn( oSettings );
957 <.*?> }
958  
959 <.*?> /* Integer, basic index */
960 <.*?> fn( aTargets[j], def );
961 <.*?> }
962 <.*?> else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
963 <.*?> {
964 <.*?> /* Negative integer, right to left column counting */
965 <.*?> fn( columns.length+aTargets[j], def );
966 <.*?> }
967 <.*?> else if ( typeof aTargets[j] === 'string' )
968 <.*?> {
969 <.*?> /* Class name matching on TH element */
970 <.*?> for ( k=0, kLen=columns.length ; k<kLen ; k++ )
971 <.*?> {
972 <.*?> if ( aTargets[j] == "_all" ||
973 <.*?> $(columns[k].nTh).hasClass( aTargets[j] ) )
974 <.*?> {
975 <.*?> fn( k, def );
976 <.*?> }
977 <.*?> }
978 <.*?> }
979 <.*?> }
980 <.*?> }
981 <.*?> }
982  
983 <.*?> // Statically defined columns array
984 <.*?> if ( aoCols )
985 <.*?> {
986 <.*?> for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
987 <.*?> {
988 <.*?> fn( i, aoCols[i] );
989 <.*?> }
990 <.*?> }
991 <.*?> }
992  
993 <.*?> /**
994 <.*?> * Add a data array to the table, creating DOM node etc. This is the parallel to
995 <.*?> * _fnGatherData, but for adding rows from a Javascript source, rather than a
996 <.*?> * DOM source.
997 <.*?> * @param {object} oSettings dataTables settings object
998 <.*?> * @param {array} aData data array to be added
999 <.*?> * @param {node} [nTr] TR element to add to the table - optional. If not given,
1000 <.*?> * DataTables will create a row automatically
1001 <.*?> * @param {array} [anTds] Array of TD|TH elements for the row - must be given
1002 <.*?> * if nTr is.
1003 <.*?> * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed
1004 <.*?> * @memberof DataTable#oApi
1005 <.*?> */
1006 <.*?> function _fnAddData ( oSettings, aDataIn, nTr, anTds )
1007 <.*?> {
1008 <.*?> /* Create the object for storing information about this new row */
1009 <.*?> var iRow = oSettings.aoData.length;
1010 <.*?> var oData = $.extend( true, {}, DataTable.models.oRow, {
1011 <.*?> src: nTr ? 'dom' : 'data'
1012 <.*?> } );
1013  
1014 <.*?> oData._aData = aDataIn;
1015 <.*?> oSettings.aoData.push( oData );
1016  
1017 <.*?> /* Create the cells */
1018 <.*?> var nTd, sThisType;
1019 <.*?> var columns = oSettings.aoColumns;
1020 <.*?> for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
1021 <.*?> {
1022 <.*?> // When working with a row, the data source object must be populated. In
1023 <.*?> // all other cases, the data source object is already populated, so we
1024 <.*?> // don't overwrite it, which might break bindings etc
1025 <.*?> if ( nTr ) {
1026 <.*?> _fnSetCellData( oSettings, iRow, i, _fnGetCellData( oSettings, iRow, i ) );
1027 <.*?> }
1028 <.*?> columns[i].sType = null;
1029 <.*?> }
1030  
1031 <.*?> /* Add to the display array */
1032 <.*?> oSettings.aiDisplayMaster.push( iRow );
1033  
1034 <.*?> /* Create the DOM information, or register it if already present */
1035 <.*?> if ( nTr || ! oSettings.oFeatures.bDeferRender )
1036 <.*?> {
1037 <.*?> _fnCreateTr( oSettings, iRow, nTr, anTds );
1038 <.*?> }
1039  
1040 <.*?> return iRow;
1041 <.*?> }
1042  
1043  
1044 <.*?> /**
1045 <.*?> * Add one or more TR elements to the table. Generally we'd expect to
1046 <.*?> * use this for reading data from a DOM sourced table, but it could be
1047 <.*?> * used for an TR element. Note that if a TR is given, it is used (i.e.
1048 <.*?> * it is not cloned).
1049 <.*?> * @param {object} settings dataTables settings object
1050 <.*?> * @param {array|node|jQuery} trs The TR element(s) to add to the table
1051 <.*?> * @returns {array} Array of indexes for the added rows
1052 <.*?> * @memberof DataTable#oApi
1053 <.*?> */
1054 <.*?> function _fnAddTr( settings, trs )
1055 <.*?> {
1056 <.*?> var row;
1057  
1058 <.*?> // Allow an individual node to be passed in
1059 <.*?> if ( ! (trs instanceof $) ) {
1060 <.*?> trs = $(trs);
1061 <.*?> }
1062  
1063 <.*?> return trs.map( function (i, el) {
1064 <.*?> row = _fnGetRowElements( settings, el );
1065 <.*?> return _fnAddData( settings, row.data, el, row.cells );
1066 <.*?> } );
1067 <.*?> }
1068  
1069  
1070 <.*?> /**
1071 <.*?> * Take a TR element and convert it to an index in aoData
1072 <.*?> * @param {object} oSettings dataTables settings object
1073 <.*?> * @param {node} n the TR element to find
1074 <.*?> * @returns {int} index if the node is found, null if not
1075 <.*?> * @memberof DataTable#oApi
1076 <.*?> */
1077 <.*?> function _fnNodeToDataIndex( oSettings, n )
1078 <.*?> {
1079 <.*?> return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;
1080 <.*?> }
1081  
1082  
1083 <.*?> /**
1084 <.*?> * Take a TD element and convert it into a column data index (not the visible index)
1085 <.*?> * @param {object} oSettings dataTables settings object
1086 <.*?> * @param {int} iRow The row number the TD/TH can be found in
1087 <.*?> * @param {node} n The TD/TH element to find
1088 <.*?> * @returns {int} index if the node is found, -1 if not
1089 <.*?> * @memberof DataTable#oApi
1090 <.*?> */
1091 <.*?> function _fnNodeToColumnIndex( oSettings, iRow, n )
1092 <.*?> {
1093 <.*?> return $.inArray( n, oSettings.aoData[ iRow ].anCells );
1094 <.*?> }
1095  
1096  
1097 <.*?> /**
1098 <.*?> * Get the data for a given cell from the internal cache, taking into account data mapping
1099 <.*?> * @param {object} settings dataTables settings object
1100 <.*?> * @param {int} rowIdx aoData row id
1101 <.*?> * @param {int} colIdx Column index
1102 <.*?> * @param {string} type data get type ('display', 'type' 'filter' 'sort')
1103 <.*?> * @returns {*} Cell data
1104 <.*?> * @memberof DataTable#oApi
1105 <.*?> */
1106 <.*?> function _fnGetCellData( settings, rowIdx, colIdx, type )
1107 <.*?> {
1108 <.*?> var draw = settings.iDraw;
1109 <.*?> var col = settings.aoColumns[colIdx];
1110 <.*?> var rowData = settings.aoData[rowIdx]._aData;
1111 <.*?> var defaultContent = col.sDefaultContent;
1112 <.*?> var cellData = col.fnGetData( rowData, type, {
1113 <.*?> settings: settings,
1114 <.*?> row: rowIdx,
1115 <.*?> col: colIdx
1116 <.*?> } );
1117  
1118 <.*?> if ( cellData === undefined ) {
1119 <.*?> if ( settings.iDrawError != draw && defaultContent === null ) {
1120 <.*?> _fnLog( settings, 0, "Requested unknown parameter "+
1121 <.*?> (typeof col.mData=='function' ? '{function}' : "'"+col.mData+"'")+
1122 <.*?> " for row "+rowIdx, 4 );
1123 <.*?> settings.iDrawError = draw;
1124 <.*?> }
1125 <.*?> return defaultContent;
1126 <.*?> }
1127  
1128 <.*?> /* When the data source is null, we can use default column data */
1129 <.*?> if ( (cellData === rowData || cellData === null) && defaultContent !== null ) {
1130 <.*?> cellData = defaultContent;
1131 <.*?> }
1132 <.*?> else if ( typeof cellData === 'function' ) {
1133 <.*?> // If the data source is a function, then we run it and use the return,
1134 <.*?> // executing in the scope of the data object (for instances)
1135 <.*?> return cellData.call( rowData );
1136 <.*?> }
1137  
1138 <.*?> if ( cellData === null && type == 'display' ) {
1139 <.*?> return '';
1140 <.*?> }
1141 <.*?> return cellData;
1142 <.*?> }
1143  
1144  
1145 <.*?> /**
1146 <.*?> * Set the value for a specific cell, into the internal data cache
1147 <.*?> * @param {object} settings dataTables settings object
1148 <.*?> * @param {int} rowIdx aoData row id
1149 <.*?> * @param {int} colIdx Column index
1150 <.*?> * @param {*} val Value to set
1151 <.*?> * @memberof DataTable#oApi
1152 <.*?> */
1153 <.*?> function _fnSetCellData( settings, rowIdx, colIdx, val )
1154 <.*?> {
1155 <.*?> var col = settings.aoColumns[colIdx];
1156 <.*?> var rowData = settings.aoData[rowIdx]._aData;
1157  
1158 <.*?> col.fnSetData( rowData, val, {
1159 <.*?> settings: settings,
1160 <.*?> row: rowIdx,
1161 <.*?> col: colIdx
1162 <.*?> } );
1163 <.*?> }
1164  
1165  
1166 <.*?> // Private variable that is used to match action syntax in the data property object
1167 <.*?> var __reArray = /\[.*?\]$/;
1168 <.*?> var __reFn = /\(\)$/;
1169  
1170 <.*?> /**
1171 <.*?> * Split string on periods, taking into account escaped periods
1172 <.*?> * @param {string} str String to split
1173 <.*?> * @return {array} Split string
1174 <.*?> */
1175 <.*?> function _fnSplitObjNotation( str )
1176 <.*?> {
1177 <.*?> return $.map( str.match(/(\\.|[^\.])+/g), function ( s ) {
1178 <.*?> return s.replace(/\\./g, '.');
1179 <.*?> } );
1180 <.*?> }
1181  
1182  
1183 <.*?> /**
1184 <.*?> * Return a function that can be used to get data from a source object, taking
1185 <.*?> * into account the ability to use nested objects as a source
1186 <.*?> * @param {string|int|function} mSource The data source for the object
1187 <.*?> * @returns {function} Data get function
1188 <.*?> * @memberof DataTable#oApi
1189 <.*?> */
1190 <.*?> function _fnGetObjectDataFn( mSource )
1191 <.*?> {
1192 <.*?> if ( $.isPlainObject( mSource ) )
1193 <.*?> {
1194 <.*?> /* Build an object of get functions, and wrap them in a single call */
1195 <.*?> var o = {};
1196 <.*?> $.each( mSource, function (key, val) {
1197 <.*?> if ( val ) {
1198 <.*?> o[key] = _fnGetObjectDataFn( val );
1199 <.*?> }
1200 <.*?> } );
1201  
1202 <.*?> return function (data, type, row, meta) {
1203 <.*?> var t = o[type] || o._;
1204 <.*?> return t !== undefined ?
1205 <.*?> t(data, type, row, meta) :
1206 <.*?> data;
1207 <.*?> };
1208 <.*?> }
1209 <.*?> else if ( mSource === null )
1210 <.*?> {
1211 <.*?> /* Give an empty string for rendering / sorting etc */
1212 <.*?> return function (data) { // type, row and meta also passed, but not used
1213 <.*?> return data;
1214 <.*?> };
1215 <.*?> }
1216 <.*?> else if ( typeof mSource === 'function' )
1217 <.*?> {
1218 <.*?> return function (data, type, row, meta) {
1219 <.*?> return mSource( data, type, row, meta );
1220 <.*?> };
1221 <.*?> }
1222 <.*?> else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
1223 <.*?> mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
1224 <.*?> {
1225 <.*?> /* If there is a . in the source string then the data source is in a
1226 <.*?> * nested object so we loop over the data for each level to get the next
1227 <.*?> * level down. On each loop we test for undefined, and if found immediately
1228 <.*?> * return. This allows entire objects to be missing and sDefaultContent to
1229 <.*?> * be used if defined, rather than throwing an error
1230 <.*?> */
1231 <.*?> var fetchData = function (data, type, src) {
1232 <.*?> var arrayNotation, funcNotation, out, innerSrc;
1233  
1234 <.*?> if ( src !== "" )
1235 <.*?> {
1236 <.*?> var a = _fnSplitObjNotation( src );
1237  
1238 <.*?> for ( var i=0, iLen=a.length ; i<iLen ; i++ )
1239 <.*?> {
1240 <.*?> // Check if we are dealing with special notation
1241 <.*?> arrayNotation = a[i].match(__reArray);
1242 <.*?> funcNotation = a[i].match(__reFn);
1243  
1244 <.*?> if ( arrayNotation )
1245 <.*?> {
1246 <.*?> // Array notation
1247 <.*?> a[i] = a[i].replace(__reArray, '');
1248  
1249 <.*?> // Condition allows simply [] to be passed in
1250 <.*?> if ( a[i] !== "" ) {
1251 <.*?> data = data[ a[i] ];
1252 <.*?> }
1253 <.*?> out = [];
1254  
1255 <.*?> // Get the remainder of the nested object to get
1256 <.*?> a.splice( 0, i+1 );
1257 <.*?> innerSrc = a.join('.');
1258  
1259 <.*?> // Traverse each entry in the array getting the properties requested
1260 <.*?> for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
1261 <.*?> out.push( fetchData( data[j], type, innerSrc ) );
1262 <.*?> }
1263  
1264 <.*?> // If a string is given in between the array notation indicators, that
1265 <.*?> // is used to join the strings together, otherwise an array is returned
1266 <.*?> var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
1267 <.*?> data = (join==="") ? out : out.join(join);
1268  
1269 <.*?> // The inner call to fetchData has already traversed through the remainder
1270 <.*?> // of the source requested, so we exit from the loop
1271 <.*?> break;
1272 <.*?> }
1273 <.*?> else if ( funcNotation )
1274 <.*?> {
1275 <.*?> // Function call
1276 <.*?> a[i] = a[i].replace(__reFn, '');
1277 <.*?> data = data[ a[i] ]();
1278 <.*?> continue;
1279 <.*?> }
1280  
1281 <.*?> if ( data === null || data[ a[i] ] === undefined )
1282 <.*?> {
1283 <.*?> return undefined;
1284 <.*?> }
1285 <.*?> data = data[ a[i] ];
1286 <.*?> }
1287 <.*?> }
1288  
1289 <.*?> return data;
1290 <.*?> };
1291  
1292 <.*?> return function (data, type) { // row and meta also passed, but not used
1293 <.*?> return fetchData( data, type, mSource );
1294 <.*?> };
1295 <.*?> }
1296 <.*?> else
1297 <.*?> {
1298 <.*?> /* Array or flat object mapping */
1299 <.*?> return function (data, type) { // row and meta also passed, but not used
1300 <.*?> return data[mSource];
1301 <.*?> };
1302 <.*?> }
1303 <.*?> }
1304  
1305  
1306 <.*?> /**
1307 <.*?> * Return a function that can be used to set data from a source object, taking
1308 <.*?> * into account the ability to use nested objects as a source
1309 <.*?> * @param {string|int|function} mSource The data source for the object
1310 <.*?> * @returns {function} Data set function
1311 <.*?> * @memberof DataTable#oApi
1312 <.*?> */
1313 <.*?> function _fnSetObjectDataFn( mSource )
1314 <.*?> {
1315 <.*?> if ( $.isPlainObject( mSource ) )
1316 <.*?> {
1317 <.*?> /* Unlike get, only the underscore (global) option is used for for
1318 <.*?> * setting data since we don't know the type here. This is why an object
1319 <.*?> * option is not documented for `mData` (which is read/write), but it is
1320 <.*?> * for `mRender` which is read only.
1321 <.*?> */
1322 <.*?> return _fnSetObjectDataFn( mSource._ );
1323 <.*?> }
1324 <.*?> else if ( mSource === null )
1325 <.*?> {
1326 <.*?> /* Nothing to do when the data source is null */
1327 <.*?> return function () {};
1328 <.*?> }
1329 <.*?> else if ( typeof mSource === 'function' )
1330 <.*?> {
1331 <.*?> return function (data, val, meta) {
1332 <.*?> mSource( data, 'set', val, meta );
1333 <.*?> };
1334 <.*?> }
1335 <.*?> else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
1336 <.*?> mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
1337 <.*?> {
1338 <.*?> /* Like the get, we need to get data from a nested object */
1339 <.*?> var setData = function (data, val, src) {
1340 <.*?> var a = _fnSplitObjNotation( src ), b;
1341 <.*?> var aLast = a[a.length-1];
1342 <.*?> var arrayNotation, funcNotation, o, innerSrc;
1343  
1344 <.*?> for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
1345 <.*?> {
1346 <.*?> // Check if we are dealing with an array notation request
1347 <.*?> arrayNotation = a[i].match(__reArray);
1348 <.*?> funcNotation = a[i].match(__reFn);
1349  
1350 <.*?> if ( arrayNotation )
1351 <.*?> {
1352 <.*?> a[i] = a[i].replace(__reArray, '');
1353 <.*?> data[ a[i] ] = [];
1354  
1355 <.*?> // Get the remainder of the nested object to set so we can recurse
1356 <.*?> b = a.slice();
1357 <.*?> b.splice( 0, i+1 );
1358 <.*?> innerSrc = b.join('.');
1359  
1360 <.*?> // Traverse each entry in the array setting the properties requested
1361 <.*?> for ( var j=0, jLen=val.length ; j<jLen ; j++ )
1362 <.*?> {
1363 <.*?> o = {};
1364 <.*?> setData( o, val[j], innerSrc );
1365 <.*?> data[ a[i] ].push( o );
1366 <.*?> }
1367  
1368 <.*?> // The inner call to setData has already traversed through the remainder
1369 <.*?> // of the source and has set the data, thus we can exit here
1370 <.*?> return;
1371 <.*?> }
1372 <.*?> else if ( funcNotation )
1373 <.*?> {
1374 <.*?> // Function call
1375 <.*?> a[i] = a[i].replace(__reFn, '');
1376 <.*?> data = data[ a[i] ]( val );
1377 <.*?> }
1378  
1379 <.*?> // If the nested object doesn't currently exist - since we are
1380 <.*?> // trying to set the value - create it
1381 <.*?> if ( data[ a[i] ] === null || data[ a[i] ] === undefined )
1382 <.*?> {
1383 <.*?> data[ a[i] ] = {};
1384 <.*?> }
1385 <.*?> data = data[ a[i] ];
1386 <.*?> }
1387  
1388 <.*?> // Last item in the input - i.e, the actual set
1389 <.*?> if ( aLast.match(__reFn ) )
1390 <.*?> {
1391 <.*?> // Function call
1392 <.*?> data = data[ aLast.replace(__reFn, '') ]( val );
1393 <.*?> }
1394 <.*?> else
1395 <.*?> {
1396 <.*?> // If array notation is used, we just want to strip it and use the property name
1397 <.*?> // and assign the value. If it isn't used, then we get the result we want anyway
1398 <.*?> data[ aLast.replace(__reArray, '') ] = val;
1399 <.*?> }
1400 <.*?> };
1401  
1402 <.*?> return function (data, val) { // meta is also passed in, but not used
1403 <.*?> return setData( data, val, mSource );
1404 <.*?> };
1405 <.*?> }
1406 <.*?> else
1407 <.*?> {
1408 <.*?> /* Array or flat object mapping */
1409 <.*?> return function (data, val) { // meta is also passed in, but not used
1410 <.*?> data[mSource] = val;
1411 <.*?> };
1412 <.*?> }
1413 <.*?> }
1414  
1415  
1416 <.*?> /**
1417 <.*?> * Return an array with the full table data
1418 <.*?> * @param {object} oSettings dataTables settings object
1419 <.*?> * @returns array {array} aData Master data array
1420 <.*?> * @memberof DataTable#oApi
1421 <.*?> */
1422 <.*?> function _fnGetDataMaster ( settings )
1423 <.*?> {
1424 <.*?> return _pluck( settings.aoData, '_aData' );
1425 <.*?> }
1426  
1427  
1428 <.*?> /**
1429 <.*?> * Nuke the table
1430 <.*?> * @param {object} oSettings dataTables settings object
1431 <.*?> * @memberof DataTable#oApi
1432 <.*?> */
1433 <.*?> function _fnClearTable( settings )
1434 <.*?> {
1435 <.*?> settings.aoData.length = 0;
1436 <.*?> settings.aiDisplayMaster.length = 0;
1437 <.*?> settings.aiDisplay.length = 0;
1438 <.*?> }
1439  
1440  
1441 <.*?> /**
1442 <.*?> * Take an array of integers (index array) and remove a target integer (value - not
1443 <.*?> * the key!)
1444 <.*?> * @param {array} a Index array to target
1445 <.*?> * @param {int} iTarget value to find
1446 <.*?> * @memberof DataTable#oApi
1447 <.*?> */
1448 <.*?> function _fnDeleteIndex( a, iTarget, splice )
1449 <.*?> {
1450 <.*?> var iTargetIndex = -1;
1451  
1452 <.*?> for ( var i=0, iLen=a.length ; i<iLen ; i++ )
1453 <.*?> {
1454 <.*?> if ( a[i] == iTarget )
1455 <.*?> {
1456 <.*?> iTargetIndex = i;
1457 <.*?> }
1458 <.*?> else if ( a[i] > iTarget )
1459 <.*?> {
1460 <.*?> a[i]--;
1461 <.*?> }
1462 <.*?> }
1463  
1464 <.*?> if ( iTargetIndex != -1 && splice === undefined )
1465 <.*?> {
1466 <.*?> a.splice( iTargetIndex, 1 );
1467 <.*?> }
1468 <.*?> }
1469  
1470  
1471 <.*?> /**
1472 <.*?> * Mark cached data as invalid such that a re-read of the data will occur when
1473 <.*?> * the cached data is next requested. Also update from the data source object.
1474 <.*?> *
1475 <.*?> * @param {object} settings DataTables settings object
1476 <.*?> * @param {int} rowIdx Row index to invalidate
1477 <.*?> * @param {string} [src] Source to invalidate from: undefined, 'auto', 'dom'
1478 <.*?> * or 'data'
1479 <.*?> * @param {int} [colIdx] Column index to invalidate. If undefined the whole
1480 <.*?> * row will be invalidated
1481 <.*?> * @memberof DataTable#oApi
1482 <.*?> *
1483 <.*?> * @todo For the modularisation of v1.11 this will need to become a callback, so
1484 <.*?> * the sort and filter methods can subscribe to it. That will required
1485 <.*?> * initialisation options for sorting, which is why it is not already baked in
1486 <.*?> */
1487 <.*?> function _fnInvalidate( settings, rowIdx, src, colIdx )
1488 <.*?> {
1489 <.*?> var row = settings.aoData[ rowIdx ];
1490 <.*?> var i, ien;
1491 <.*?> var cellWrite = function ( cell, col ) {
1492 <.*?> // This is very frustrating, but in IE if you just write directly
1493 <.*?> // to innerHTML, and elements that are overwritten are GC'ed,
1494 <.*?> // even if there is a reference to them elsewhere
1495 <.*?> while ( cell.childNodes.length ) {
1496 <.*?> cell.removeChild( cell.firstChild );
1497 <.*?> }
1498  
1499 <.*?> cell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' );
1500 <.*?> };
1501  
1502 <.*?> // Are we reading last data from DOM or the data object?
1503 <.*?> if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {
1504 <.*?> // Read the data from the DOM
1505 <.*?> row._aData = _fnGetRowElements(
1506 <.*?> settings, row, colIdx, colIdx === undefined ? undefined : row._aData
1507 <.*?> )
1508 <.*?> .data;
1509 <.*?> }
1510 <.*?> else {
1511 <.*?> // Reading from data object, update the DOM
1512 <.*?> var cells = row.anCells;
1513  
1514 <.*?> if ( cells ) {
1515 <.*?> if ( colIdx !== undefined ) {
1516 <.*?> cellWrite( cells[colIdx], colIdx );
1517 <.*?> }
1518 <.*?> else {
1519 <.*?> for ( i=0, ien=cells.length ; i<ien ; i++ ) {
1520 <.*?> cellWrite( cells[i], i );
1521 <.*?> }
1522 <.*?> }
1523 <.*?> }
1524 <.*?> }
1525  
1526 <.*?> // For both row and cell invalidation, the cached data for sorting and
1527 <.*?> // filtering is nulled out
1528 <.*?> row._aSortData = null;
1529 <.*?> row._aFilterData = null;
1530  
1531 <.*?> // Invalidate the type for a specific column (if given) or all columns since
1532 <.*?> // the data might have changed
1533 <.*?> var cols = settings.aoColumns;
1534 <.*?> if ( colIdx !== undefined ) {
1535 <.*?> cols[ colIdx ].sType = null;
1536 <.*?> }
1537 <.*?> else {
1538 <.*?> for ( i=0, ien=cols.length ; i<ien ; i++ ) {
1539 <.*?> cols[i].sType = null;
1540 <.*?> }
1541  
1542 <.*?> // Update DataTables special `DT_*` attributes for the row
1543 <.*?> _fnRowAttributes( row );
1544 <.*?> }
1545 <.*?> }
1546  
1547  
1548 <.*?> /**
1549 <.*?> * Build a data source object from an HTML row, reading the contents of the
1550 <.*?> * cells that are in the row.
1551 <.*?> *
1552 <.*?> * @param {object} settings DataTables settings object
1553 <.*?> * @param {node|object} TR element from which to read data or existing row
1554 <.*?> * object from which to re-read the data from the cells
1555 <.*?> * @param {int} [colIdx] Optional column index
1556 <.*?> * @param {array|object} [d] Data source object. If `colIdx` is given then this
1557 <.*?> * parameter should also be given and will be used to write the data into.
1558 <.*?> * Only the column in question will be written
1559 <.*?> * @returns {object} Object with two parameters: `data` the data read, in
1560 <.*?> * document order, and `cells` and array of nodes (they can be useful to the
1561 <.*?> * caller, so rather than needing a second traversal to get them, just return
1562 <.*?> * them from here).
1563 <.*?> * @memberof DataTable#oApi
1564 <.*?> */
1565 <.*?> function _fnGetRowElements( settings, row, colIdx, d )
1566 <.*?> {
1567 <.*?> var
1568 <.*?> tds = [],
1569 <.*?> td = row.firstChild,
1570 <.*?> name, col, o, i=0, contents,
1571 <.*?> columns = settings.aoColumns,
1572 <.*?> objectRead = settings._rowReadObject;
1573  
1574 <.*?> // Allow the data object to be passed in, or construct
1575 <.*?> d = d || objectRead ? {} : [];
1576  
1577 <.*?> var attr = function ( str, td ) {
1578 <.*?> if ( typeof str === 'string' ) {
1579 <.*?> var idx = str.indexOf('@');
1580  
1581 <.*?> if ( idx !== -1 ) {
1582 <.*?> var attr = str.substring( idx+1 );
1583 <.*?> var setter = _fnSetObjectDataFn( str );
1584 <.*?> setter( d, td.getAttribute( attr ) );
1585 <.*?> }
1586 <.*?> }
1587 <.*?> };
1588  
1589 <.*?> // Read data from a cell and store into the data object
1590 <.*?> var cellProcess = function ( cell ) {
1591 <.*?> if ( colIdx === undefined || colIdx === i ) {
1592 <.*?> col = columns[i];
1593 <.*?> contents = $.trim(cell.innerHTML);
1594  
1595 <.*?> if ( col && col._bAttrSrc ) {
1596 <.*?> var setter = _fnSetObjectDataFn( col.mData._ );
1597 <.*?> setter( d, contents );
1598  
1599 <.*?> attr( col.mData.sort, cell );
1600 <.*?> attr( col.mData.type, cell );
1601 <.*?> attr( col.mData.filter, cell );
1602 <.*?> }
1603 <.*?> else {
1604 <.*?> // Depending on the `data` option for the columns the data can
1605 <.*?> // be read to either an object or an array.
1606 <.*?> if ( objectRead ) {
1607 <.*?> if ( ! col._setter ) {
1608 <.*?> // Cache the setter function
1609 <.*?> col._setter = _fnSetObjectDataFn( col.mData );
1610 <.*?> }
1611 <.*?> col._setter( d, contents );
1612 <.*?> }
1613 <.*?> else {
1614 <.*?> d[i] = contents;
1615 <.*?> }
1616 <.*?> }
1617 <.*?> }
1618  
1619 <.*?> i++;
1620 <.*?> };
1621  
1622 <.*?> if ( td ) {
1623 <.*?> // `tr` element was passed in
1624 <.*?> while ( td ) {
1625 <.*?> name = td.nodeName.toUpperCase();
1626  
1627 <.*?> if ( name == "TD" || name == "TH" ) {
1628 <.*?> cellProcess( td );
1629 <.*?> tds.push( td );
1630 <.*?> }
1631  
1632 <.*?> td = td.nextSibling;
1633 <.*?> }
1634 <.*?> }
1635 <.*?> else {
1636 <.*?> // Existing row object passed in
1637 <.*?> tds = row.anCells;
1638  
1639 <.*?> for ( var j=0, jen=tds.length ; j<jen ; j++ ) {
1640 <.*?> cellProcess( tds[j] );
1641 <.*?> }
1642 <.*?> }
1643  
1644 <.*?> return {
1645 <.*?> data: d,
1646 <.*?> cells: tds
1647 <.*?> };
1648 <.*?> }
1649 <.*?> /**
1650 <.*?> * Create a new TR element (and it's TD children) for a row
1651 <.*?> * @param {object} oSettings dataTables settings object
1652 <.*?> * @param {int} iRow Row to consider
1653 <.*?> * @param {node} [nTrIn] TR element to add to the table - optional. If not given,
1654 <.*?> * DataTables will create a row automatically
1655 <.*?> * @param {array} [anTds] Array of TD|TH elements for the row - must be given
1656 <.*?> * if nTr is.
1657 <.*?> * @memberof DataTable#oApi
1658 <.*?> */
1659 <.*?> function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
1660 <.*?> {
1661 <.*?> var
1662 <.*?> row = oSettings.aoData[iRow],
1663 <.*?> rowData = row._aData,
1664 <.*?> cells = [],
1665 <.*?> nTr, nTd, oCol,
1666 <.*?> i, iLen;
1667  
1668 <.*?> if ( row.nTr === null )
1669 <.*?> {
1670 <.*?> nTr = nTrIn || document.createElement('tr');
1671  
1672 <.*?> row.nTr = nTr;
1673 <.*?> row.anCells = cells;
1674  
1675 <.*?> /* Use a private property on the node to allow reserve mapping from the node
1676 <.*?> * to the aoData array for fast look up
1677 <.*?> */
1678 <.*?> nTr._DT_RowIndex = iRow;
1679  
1680 <.*?> /* Special parameters can be given by the data source to be used on the row */
1681 <.*?> _fnRowAttributes( row );
1682  
1683 <.*?> /* Process each column */
1684 <.*?> for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
1685 <.*?> {
1686 <.*?> oCol = oSettings.aoColumns[i];
1687  
1688 <.*?> nTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType );
1689 <.*?> cells.push( nTd );
1690  
1691 <.*?> // Need to create the HTML if new, or if a rendering function is defined
1692 <.*?> if ( !nTrIn || oCol.mRender || oCol.mData !== i )
1693 <.*?> {
1694 <.*?> nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
1695 <.*?> }
1696  
1697 <.*?> /* Add user defined class */
1698 <.*?> if ( oCol.sClass )
1699 <.*?> {
1700 <.*?> nTd.className += ' '+oCol.sClass;
1701 <.*?> }
1702  
1703 <.*?> // Visibility - add or remove as required
1704 <.*?> if ( oCol.bVisible && ! nTrIn )
1705 <.*?> {
1706 <.*?> nTr.appendChild( nTd );
1707 <.*?> }
1708 <.*?> else if ( ! oCol.bVisible && nTrIn )
1709 <.*?> {
1710 <.*?> nTd.parentNode.removeChild( nTd );
1711 <.*?> }
1712  
1713 <.*?> if ( oCol.fnCreatedCell )
1714 <.*?> {
1715 <.*?> oCol.fnCreatedCell.call( oSettings.oInstance,
1716 <.*?> nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i
1717 <.*?> );
1718 <.*?> }
1719 <.*?> }
1720  
1721 <.*?> _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] );
1722 <.*?> }
1723  
1724 <.*?> // Remove once webkit bug 131819 and Chromium bug 365619 have been resolved
1725 <.*?> // and deployed
1726 <.*?> row.nTr.setAttribute( 'role', 'row' );
1727 <.*?> }
1728  
1729  
1730 <.*?> /**
1731 <.*?> * Add attributes to a row based on the special `DT_*` parameters in a data
1732 <.*?> * source object.
1733 <.*?> * @param {object} DataTables row object for the row to be modified
1734 <.*?> * @memberof DataTable#oApi
1735 <.*?> */
1736 <.*?> function _fnRowAttributes( row )
1737 <.*?> {
1738 <.*?> var tr = row.nTr;
1739 <.*?> var data = row._aData;
1740  
1741 <.*?> if ( tr ) {
1742 <.*?> if ( data.DT_RowId ) {
1743 <.*?> tr.id = data.DT_RowId;
1744 <.*?> }
1745  
1746 <.*?> if ( data.DT_RowClass ) {
1747 <.*?> // Remove any classes added by DT_RowClass before
1748 <.*?> var a = data.DT_RowClass.split(' ');
1749 <.*?> row.__rowc = row.__rowc ?
1750 <.*?> _unique( row.__rowc.concat( a ) ) :
1751 <.*?> a;
1752  
1753 <.*?> $(tr)
1754 <.*?> .removeClass( row.__rowc.join(' ') )
1755 <.*?> .addClass( data.DT_RowClass );
1756 <.*?> }
1757  
1758 <.*?> if ( data.DT_RowAttr ) {
1759 <.*?> $(tr).attr( data.DT_RowAttr );
1760 <.*?> }
1761  
1762 <.*?> if ( data.DT_RowData ) {
1763 <.*?> $(tr).data( data.DT_RowData );
1764 <.*?> }
1765 <.*?> }
1766 <.*?> }
1767  
1768  
1769 <.*?> /**
1770 <.*?> * Create the HTML header for the table
1771 <.*?> * @param {object} oSettings dataTables settings object
1772 <.*?> * @memberof DataTable#oApi
1773 <.*?> */
1774 <.*?> function _fnBuildHead( oSettings )
1775 <.*?> {
1776 <.*?> var i, ien, cell, row, column;
1777 <.*?> var thead = oSettings.nTHead;
1778 <.*?> var tfoot = oSettings.nTFoot;
1779 <.*?> var createHeader = $('th, td', thead).length === 0;
1780 <.*?> var classes = oSettings.oClasses;
1781 <.*?> var columns = oSettings.aoColumns;
1782  
1783 <.*?> if ( createHeader ) {
1784 <.*?> row = $('<tr/>').appendTo( thead );
1785 <.*?> }
1786  
1787 <.*?> for ( i=0, ien=columns.length ; i<ien ; i++ ) {
1788 <.*?> column = columns[i];
1789 <.*?> cell = $( column.nTh ).addClass( column.sClass );
1790  
1791 <.*?> if ( createHeader ) {
1792 <.*?> cell.appendTo( row );
1793 <.*?> }
1794  
1795 <.*?> // 1.11 move into sorting
1796 <.*?> if ( oSettings.oFeatures.bSort ) {
1797 <.*?> cell.addClass( column.sSortingClass );
1798  
1799 <.*?> if ( column.bSortable !== false ) {
1800 <.*?> cell
1801 <.*?> .attr( 'tabindex', oSettings.iTabIndex )
1802 <.*?> .attr( 'aria-controls', oSettings.sTableId );
1803  
1804 <.*?> _fnSortAttachListener( oSettings, column.nTh, i );
1805 <.*?> }
1806 <.*?> }
1807  
1808 <.*?> if ( column.sTitle != cell.html() ) {
1809 <.*?> cell.html( column.sTitle );
1810 <.*?> }
1811  
1812 <.*?> _fnRenderer( oSettings, 'header' )(
1813 <.*?> oSettings, cell, column, classes
1814 <.*?> );
1815 <.*?> }
1816  
1817 <.*?> if ( createHeader ) {
1818 <.*?> _fnDetectHeader( oSettings.aoHeader, thead );
1819 <.*?> }
1820  
1821 <.*?> /* ARIA role for the rows */
1822 <.*?> $(thead).find('>tr').attr('role', 'row');
1823  
1824 <.*?> /* Deal with the footer - add classes if required */
1825 <.*?> $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
1826 <.*?> $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
1827  
1828 <.*?> // Cache the footer cells. Note that we only take the cells from the first
1829 <.*?> // row in the footer. If there is more than one row the user wants to
1830 <.*?> // interact with, they need to use the table().foot() method. Note also this
1831 <.*?> // allows cells to be used for multiple columns using colspan
1832 <.*?> if ( tfoot !== null ) {
1833 <.*?> var cells = oSettings.aoFooter[0];
1834  
1835 <.*?> for ( i=0, ien=cells.length ; i<ien ; i++ ) {
1836 <.*?> column = columns[i];
1837 <.*?> column.nTf = cells[i].cell;
1838  
1839 <.*?> if ( column.sClass ) {
1840 <.*?> $(column.nTf).addClass( column.sClass );
1841 <.*?> }
1842 <.*?> }
1843 <.*?> }
1844 <.*?> }
1845  
1846  
1847 <.*?> /**
1848 <.*?> * Draw the header (or footer) element based on the column visibility states. The
1849 <.*?> * methodology here is to use the layout array from _fnDetectHeader, modified for
1850 <.*?> * the instantaneous column visibility, to construct the new layout. The grid is
1851 <.*?> * traversed over cell at a time in a rows x columns grid fashion, although each
1852 <.*?> * cell insert can cover multiple elements in the grid - which is tracks using the
1853 <.*?> * aApplied array. Cell inserts in the grid will only occur where there isn't
1854 <.*?> * already a cell in that position.
1855 <.*?> * @param {object} oSettings dataTables settings object
1856 <.*?> * @param array {objects} aoSource Layout array from _fnDetectHeader
1857 <.*?> * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,
1858 <.*?> * @memberof DataTable#oApi
1859 <.*?> */
1860 <.*?> function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
1861 <.*?> {
1862 <.*?> var i, iLen, j, jLen, k, kLen, n, nLocalTr;
1863 <.*?> var aoLocal = [];
1864 <.*?> var aApplied = [];
1865 <.*?> var iColumns = oSettings.aoColumns.length;
1866 <.*?> var iRowspan, iColspan;
1867  
1868 <.*?> if ( ! aoSource )
1869 <.*?> {
1870 <.*?> return;
1871 <.*?> }
1872  
1873 <.*?> if ( bIncludeHidden === undefined )
1874 <.*?> {
1875 <.*?> bIncludeHidden = false;
1876 <.*?> }
1877  
1878 <.*?> /* Make a copy of the master layout array, but without the visible columns in it */
1879 <.*?> for ( i=0, iLen=aoSource.length ; i<iLen ; i++ )
1880 <.*?> {
1881 <.*?> aoLocal[i] = aoSource[i].slice();
1882 <.*?> aoLocal[i].nTr = aoSource[i].nTr;
1883  
1884 <.*?> /* Remove any columns which are currently hidden */
1885 <.*?> for ( j=iColumns-1 ; j>=0 ; j-- )
1886 <.*?> {
1887 <.*?> if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )
1888 <.*?> {
1889 <.*?> aoLocal[i].splice( j, 1 );
1890 <.*?> }
1891 <.*?> }
1892  
1893 <.*?> /* Prep the applied array - it needs an element for each row */
1894 <.*?> aApplied.push( [] );
1895 <.*?> }
1896  
1897 <.*?> for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
1898 <.*?> {
1899 <.*?> nLocalTr = aoLocal[i].nTr;
1900  
1901 <.*?> /* All cells are going to be replaced, so empty out the row */
1902 <.*?> if ( nLocalTr )
1903 <.*?> {
1904 <.*?> while( (n = nLocalTr.firstChild) )
1905 <.*?> {
1906 <.*?> nLocalTr.removeChild( n );
1907 <.*?> }
1908 <.*?> }
1909  
1910 <.*?> for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )
1911 <.*?> {
1912 <.*?> iRowspan = 1;
1913 <.*?> iColspan = 1;
1914  
1915 <.*?> /* Check to see if there is already a cell (row/colspan) covering our target
1916 <.*?> * insert point. If there is, then there is nothing to do.
1917 <.*?> */
1918 <.*?> if ( aApplied[i][j] === undefined )
1919 <.*?> {
1920 <.*?> nLocalTr.appendChild( aoLocal[i][j].cell );
1921 <.*?> aApplied[i][j] = 1;
1922  
1923 <.*?> /* Expand the cell to cover as many rows as needed */
1924 <.*?> while ( aoLocal[i+iRowspan] !== undefined &&
1925 <.*?> aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )
1926 <.*?> {
1927 <.*?> aApplied[i+iRowspan][j] = 1;
1928 <.*?> iRowspan++;
1929 <.*?> }
1930  
1931 <.*?> /* Expand the cell to cover as many columns as needed */
1932 <.*?> while ( aoLocal[i][j+iColspan] !== undefined &&
1933 <.*?> aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )
1934 <.*?> {
1935 <.*?> /* Must update the applied array over the rows for the columns */
1936 <.*?> for ( k=0 ; k<iRowspan ; k++ )
1937 <.*?> {
1938 <.*?> aApplied[i+k][j+iColspan] = 1;
1939 <.*?> }
1940 <.*?> iColspan++;
1941 <.*?> }
1942  
1943 <.*?> /* Do the actual expansion in the DOM */
1944 <.*?> $(aoLocal[i][j].cell)
1945 <.*?> .attr('rowspan', iRowspan)
1946 <.*?> .attr('colspan', iColspan);
1947 <.*?> }
1948 <.*?> }
1949 <.*?> }
1950 <.*?> }
1951  
1952  
1953 <.*?> /**
1954 <.*?> * Insert the required TR nodes into the table for display
1955 <.*?> * @param {object} oSettings dataTables settings object
1956 <.*?> * @memberof DataTable#oApi
1957 <.*?> */
1958 <.*?> function _fnDraw( oSettings )
1959 <.*?> {
1960 <.*?> /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
1961 <.*?> var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
1962 <.*?> if ( $.inArray( false, aPreDraw ) !== -1 )
1963 <.*?> {
1964 <.*?> _fnProcessingDisplay( oSettings, false );
1965 <.*?> return;
1966 <.*?> }
1967  
1968 <.*?> var i, iLen, n;
1969 <.*?> var anRows = [];
1970 <.*?> var iRowCount = 0;
1971 <.*?> var asStripeClasses = oSettings.asStripeClasses;
1972 <.*?> var iStripes = asStripeClasses.length;
1973 <.*?> var iOpenRows = oSettings.aoOpenRows.length;
1974 <.*?> var oLang = oSettings.oLanguage;
1975 <.*?> var iInitDisplayStart = oSettings.iInitDisplayStart;
1976 <.*?> var bServerSide = _fnDataSource( oSettings ) == 'ssp';
1977 <.*?> var aiDisplay = oSettings.aiDisplay;
1978  
1979 <.*?> oSettings.bDrawing = true;
1980  
1981 <.*?> /* Check and see if we have an initial draw position from state saving */
1982 <.*?> if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )
1983 <.*?> {
1984 <.*?> oSettings._iDisplayStart = bServerSide ?
1985 <.*?> iInitDisplayStart :
1986 <.*?> iInitDisplayStart >= oSettings.fnRecordsDisplay() ?
1987  
1988 <.*?> iInitDisplayStart;
1989  
1990 <.*?> oSettings.iInitDisplayStart = -1;
1991 <.*?> }
1992  
1993 <.*?> var iDisplayStart = oSettings._iDisplayStart;
1994 <.*?> var iDisplayEnd = oSettings.fnDisplayEnd();
1995  
1996 <.*?> /* Server-side processing draw intercept */
1997 <.*?> if ( oSettings.bDeferLoading )
1998 <.*?> {
1999 <.*?> oSettings.bDeferLoading = false;
2000 <.*?> oSettings.iDraw++;
2001 <.*?> _fnProcessingDisplay( oSettings, false );
2002 <.*?> }
2003 <.*?> else if ( !bServerSide )
2004 <.*?> {
2005 <.*?> oSettings.iDraw++;
2006 <.*?> }
2007 <.*?> else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )
2008 <.*?> {
2009 <.*?> return;
2010 <.*?> }
2011  
2012 <.*?> if ( aiDisplay.length !== 0 )
2013 <.*?> {
2014 <.*?> var iStart = bServerSide ? 0 : iDisplayStart;
2015 <.*?> var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
2016  
2017 <.*?> for ( var j=iStart ; j<iEnd ; j++ )
2018 <.*?> {
2019 <.*?> var iDataIndex = aiDisplay[j];
2020 <.*?> var aoData = oSettings.aoData[ iDataIndex ];
2021 <.*?> if ( aoData.nTr === null )
2022 <.*?> {
2023 <.*?> _fnCreateTr( oSettings, iDataIndex );
2024 <.*?> }
2025  
2026 <.*?> var nRow = aoData.nTr;
2027  
2028 <.*?> /* Remove the old striping classes and then add the new one */
2029 <.*?> if ( iStripes !== 0 )
2030 <.*?> {
2031 <.*?> var sStripe = asStripeClasses[ iRowCount % iStripes ];
2032 <.*?> if ( aoData._sRowStripe != sStripe )
2033 <.*?> {
2034 <.*?> $(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );
2035 <.*?> aoData._sRowStripe = sStripe;
2036 <.*?> }
2037 <.*?> }
2038  
2039 <.*?> // Row callback functions - might want to manipulate the row
2040 <.*?> // iRowCount and j are not currently documented. Are they at all
2041 <.*?> // useful?
2042 <.*?> _fnCallbackFire( oSettings, 'aoRowCallback', null,
2043 <.*?> [nRow, aoData._aData, iRowCount, j] );
2044  
2045 <.*?> anRows.push( nRow );
2046 <.*?> iRowCount++;
2047 <.*?> }
2048 <.*?> }
2049 <.*?> else
2050 <.*?> {
2051 <.*?> /* Table is empty - create a row with an empty message in it */
2052 <.*?> var sZero = oLang.sZeroRecords;
2053 <.*?> if ( oSettings.iDraw == 1 && _fnDataSource( oSettings ) == 'ajax' )
2054 <.*?> {
2055 <.*?> sZero = oLang.sLoadingRecords;
2056 <.*?> }
2057 <.*?> else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
2058 <.*?> {
2059 <.*?> sZero = oLang.sEmptyTable;
2060 <.*?> }
2061  
2062 <.*?> anRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } )
2063 <.*?> .append( $('<td />', {
2064 <.*?> 'valign': 'top',
2065 <.*?> 'colSpan': _fnVisbleColumns( oSettings ),
2066 <.*?> 'class': oSettings.oClasses.sRowEmpty
2067 <.*?> } ).html( sZero ) )[0];
2068 <.*?> }
2069  
2070 <.*?> /* Header and footer callbacks */
2071 <.*?> _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
2072 <.*?> _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
2073  
2074 <.*?> _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
2075 <.*?> _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
2076  
2077 <.*?> var body = $(oSettings.nTBody);
2078  
2079 <.*?> body.children().detach();
2080 <.*?> body.append( $(anRows) );
2081  
2082 <.*?> /* Call all required callback functions for the end of a draw */
2083 <.*?> _fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
2084  
2085 <.*?> /* Draw is complete, sorting and filtering must be as well */
2086 <.*?> oSettings.bSorted = false;
2087 <.*?> oSettings.bFiltered = false;
2088 <.*?> oSettings.bDrawing = false;
2089 <.*?> }
2090  
2091  
2092 <.*?> /**
2093 <.*?> * Redraw the table - taking account of the various features which are enabled
2094 <.*?> * @param {object} oSettings dataTables settings object
2095 <.*?> * @param {boolean} [holdPosition] Keep the current paging position. By default
2096 <.*?> * the paging is reset to the first page
2097 <.*?> * @memberof DataTable#oApi
2098 <.*?> */
2099 <.*?> function _fnReDraw( settings, holdPosition )
2100 <.*?> {
2101 <.*?> var
2102 <.*?> features = settings.oFeatures,
2103 <.*?> sort = features.bSort,
2104 <.*?> filter = features.bFilter;
2105  
2106 <.*?> if ( sort ) {
2107 <.*?> _fnSort( settings );
2108 <.*?> }
2109  
2110 <.*?> if ( filter ) {
2111 <.*?> _fnFilterComplete( settings, settings.oPreviousSearch );
2112 <.*?> }
2113 <.*?> else {
2114 <.*?> // No filtering, so we want to just use the display master
2115 <.*?> settings.aiDisplay = settings.aiDisplayMaster.slice();
2116 <.*?> }
2117  
2118 <.*?> if ( holdPosition !== true ) {
2119 <.*?> settings._iDisplayStart = 0;
2120 <.*?> }
2121  
2122 <.*?> // Let any modules know about the draw hold position state (used by
2123 <.*?> // scrolling internally)
2124 <.*?> settings._drawHold = holdPosition;
2125  
2126 <.*?> _fnDraw( settings );
2127  
2128 <.*?> settings._drawHold = false;
2129 <.*?> }
2130  
2131  
2132 <.*?> /**
2133 <.*?> * Add the options to the page HTML for the table
2134 <.*?> * @param {object} oSettings dataTables settings object
2135 <.*?> * @memberof DataTable#oApi
2136 <.*?> */
2137 <.*?> function _fnAddOptionsHtml ( oSettings )
2138 <.*?> {
2139 <.*?> var classes = oSettings.oClasses;
2140 <.*?> var table = $(oSettings.nTable);
2141 <.*?> var holding = $('<div/>').insertBefore( table ); // Holding element for speed
2142 <.*?> var features = oSettings.oFeatures;
2143  
2144 <.*?> // All DataTables are wrapped in a div
2145 <.*?> var insert = $('<div/>', {
2146 <.*?> id: oSettings.sTableId+'_wrapper',
2147 <.*?> 'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)
2148 <.*?> } );
2149  
2150 <.*?> oSettings.nHolding = holding[0];
2151 <.*?> oSettings.nTableWrapper = insert[0];
2152 <.*?> oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;
2153  
2154 <.*?> /* Loop over the user set positioning and place the elements as needed */
2155 <.*?> var aDom = oSettings.sDom.split('');
2156 <.*?> var featureNode, cOption, nNewNode, cNext, sAttr, j;
2157 <.*?> for ( var i=0 ; i<aDom.length ; i++ )
2158 <.*?> {
2159 <.*?> featureNode = null;
2160 <.*?> cOption = aDom[i];
2161  
2162 <.*?> if ( cOption == '<' )
2163 <.*?> {
2164 <.*?> /* New container div */
2165 <.*?> nNewNode = $('<div/>')[0];
2166  
2167 <.*?> /* Check to see if we should append an id and/or a class name to the container */
2168 <.*?> cNext = aDom[i+1];
2169 <.*?> if ( cNext == "'" || cNext == '"' )
2170 <.*?> {
2171 <.*?> sAttr = "";
2172 <.*?> j = 2;
2173 <.*?> while ( aDom[i+j] != cNext )
2174 <.*?> {
2175 <.*?> sAttr += aDom[i+j];
2176 <.*?> j++;
2177 <.*?> }
2178  
2179 <.*?> /* Replace jQuery UI constants @todo depreciated */
2180 <.*?> if ( sAttr == "H" )
2181 <.*?> {
2182 <.*?> sAttr = classes.sJUIHeader;
2183 <.*?> }
2184 <.*?> else if ( sAttr == "F" )
2185 <.*?> {
2186 <.*?> sAttr = classes.sJUIFooter;
2187 <.*?> }
2188  
2189 <.*?> /* The attribute can be in the format of "#id.class", "#id" or "class" This logic
2190 <.*?> * breaks the string into parts and applies them as needed
2191 <.*?> */
2192 <.*?> if ( sAttr.indexOf('.') != -1 )
2193 <.*?> {
2194 <.*?> var aSplit = sAttr.split('.');
2195 <.*?> nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);
2196 <.*?> nNewNode.className = aSplit[1];
2197 <.*?> }
2198 <.*?> else if ( sAttr.charAt(0) == "#" )
2199 <.*?> {
2200 <.*?> nNewNode.id = sAttr.substr(1, sAttr.length-1);
2201 <.*?> }
2202 <.*?> else
2203 <.*?> {
2204 <.*?> nNewNode.className = sAttr;
2205 <.*?> }
2206  
2207 <.*?> i += j; /* Move along the position array */
2208 <.*?> }
2209  
2210 <.*?> insert.append( nNewNode );
2211 <.*?> insert = $(nNewNode);
2212 <.*?> }
2213 <.*?> else if ( cOption == '>' )
2214 <.*?> {
2215 <.*?> /* End container div */
2216 <.*?> insert = insert.parent();
2217 <.*?> }
2218 <.*?> // @todo Move options into their own plugins?
2219 <.*?> else if ( cOption == 'l' && features.bPaginate && features.bLengthChange )
2220 <.*?> {
2221 <.*?> /* Length */
2222 <.*?> featureNode = _fnFeatureHtmlLength( oSettings );
2223 <.*?> }
2224 <.*?> else if ( cOption == 'f' && features.bFilter )
2225 <.*?> {
2226 <.*?> /* Filter */
2227 <.*?> featureNode = _fnFeatureHtmlFilter( oSettings );
2228 <.*?> }
2229 <.*?> else if ( cOption == 'r' && features.bProcessing )
2230 <.*?> {
2231 <.*?> /* pRocessing */
2232 <.*?> featureNode = _fnFeatureHtmlProcessing( oSettings );
2233 <.*?> }
2234 <.*?> else if ( cOption == 't' )
2235 <.*?> {
2236 <.*?> /* Table */
2237 <.*?> featureNode = _fnFeatureHtmlTable( oSettings );
2238 <.*?> }
2239 <.*?> else if ( cOption == 'i' && features.bInfo )
2240 <.*?> {
2241 <.*?> /* Info */
2242 <.*?> featureNode = _fnFeatureHtmlInfo( oSettings );
2243 <.*?> }
2244 <.*?> else if ( cOption == 'p' && features.bPaginate )
2245 <.*?> {
2246 <.*?> /* Pagination */
2247 <.*?> featureNode = _fnFeatureHtmlPaginate( oSettings );
2248 <.*?> }
2249 <.*?> else if ( DataTable.ext.feature.length !== 0 )
2250 <.*?> {
2251 <.*?> /* Plug-in features */
2252 <.*?> var aoFeatures = DataTable.ext.feature;
2253 <.*?> for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )
2254 <.*?> {
2255 <.*?> if ( cOption == aoFeatures[k].cFeature )
2256 <.*?> {
2257 <.*?> featureNode = aoFeatures[k].fnInit( oSettings );
2258 <.*?> break;
2259 <.*?> }
2260 <.*?> }
2261 <.*?> }
2262  
2263 <.*?> /* Add to the 2D features array */
2264 <.*?> if ( featureNode )
2265 <.*?> {
2266 <.*?> var aanFeatures = oSettings.aanFeatures;
2267  
2268 <.*?> if ( ! aanFeatures[cOption] )
2269 <.*?> {
2270 <.*?> aanFeatures[cOption] = [];
2271 <.*?> }
2272  
2273 <.*?> aanFeatures[cOption].push( featureNode );
2274 <.*?> insert.append( featureNode );
2275 <.*?> }
2276 <.*?> }
2277  
2278 <.*?> /* Built our DOM structure - replace the holding div with what we want */
2279 <.*?> holding.replaceWith( insert );
2280 <.*?> }
2281  
2282  
2283 <.*?> /**
2284 <.*?> * Use the DOM source to create up an array of header cells. The idea here is to
2285 <.*?> * create a layout grid (array) of rows x columns, which contains a reference
2286 <.*?> * to the cell that that point in the grid (regardless of col/rowspan), such that
2287 <.*?> * any column / row could be removed and the new grid constructed
2288 <.*?> * @param array {object} aLayout Array to store the calculated layout in
2289 <.*?> * @param {node} nThead The header/footer element for the table
2290 <.*?> * @memberof DataTable#oApi
2291 <.*?> */
2292 <.*?> function _fnDetectHeader ( aLayout, nThead )
2293 <.*?> {
2294 <.*?> var nTrs = $(nThead).children('tr');
2295 <.*?> var nTr, nCell;
2296 <.*?> var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
2297 <.*?> var bUnique;
2298 <.*?> var fnShiftCol = function ( a, i, j ) {
2299 <.*?> var k = a[i];
2300 <.*?> while ( k[j] ) {
2301 <.*?> j++;
2302 <.*?> }
2303 <.*?> return j;
2304 <.*?> };
2305  
2306 <.*?> aLayout.splice( 0, aLayout.length );
2307  
2308 <.*?> /* We know how many rows there are in the layout - so prep it */
2309 <.*?> for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
2310 <.*?> {
2311 <.*?> aLayout.push( [] );
2312 <.*?> }
2313  
2314 <.*?> /* Calculate a layout array */
2315 <.*?> for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
2316 <.*?> {
2317 <.*?> nTr = nTrs[i];
2318 <.*?> iColumn = 0;
2319  
2320 <.*?> /* For every cell in the row... */
2321 <.*?> nCell = nTr.firstChild;
2322 <.*?> while ( nCell ) {
2323 <.*?> if ( nCell.nodeName.toUpperCase() == "TD" ||
2324 <.*?> nCell.nodeName.toUpperCase() == "TH" )
2325 <.*?> {
2326 <.*?> /* Get the col and rowspan attributes from the DOM and sanitise them */
2327 <.*?> iColspan = nCell.getAttribute('colspan') * 1;
2328 <.*?> iRowspan = nCell.getAttribute('rowspan') * 1;
2329 <.*?> iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
2330 <.*?> iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
2331  
2332 <.*?> /* There might be colspan cells already in this row, so shift our target
2333 <.*?> * accordingly
2334 <.*?> */
2335 <.*?> iColShifted = fnShiftCol( aLayout, i, iColumn );
2336  
2337 <.*?> /* Cache calculation for unique columns */
2338 <.*?> bUnique = iColspan === 1 ? true : false;
2339  
2340 <.*?> /* If there is col / rowspan, copy the information into the layout grid */
2341 <.*?> for ( l=0 ; l<iColspan ; l++ )
2342 <.*?> {
2343 <.*?> for ( k=0 ; k<iRowspan ; k++ )
2344 <.*?> {
2345 <.*?> aLayout[i+k][iColShifted+l] = {
2346 <.*?> "cell": nCell,
2347 <.*?> "unique": bUnique
2348 <.*?> };
2349 <.*?> aLayout[i+k].nTr = nTr;
2350 <.*?> }
2351 <.*?> }
2352 <.*?> }
2353 <.*?> nCell = nCell.nextSibling;
2354 <.*?> }
2355 <.*?> }
2356 <.*?> }
2357  
2358  
2359 <.*?> /**
2360 <.*?> * Get an array of unique th elements, one for each column
2361 <.*?> * @param {object} oSettings dataTables settings object
2362 <.*?> * @param {node} nHeader automatically detect the layout from this node - optional
2363 <.*?> * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
2364 <.*?> * @returns array {node} aReturn list of unique th's
2365 <.*?> * @memberof DataTable#oApi
2366 <.*?> */
2367 <.*?> function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
2368 <.*?> {
2369 <.*?> var aReturn = [];
2370 <.*?> if ( !aLayout )
2371 <.*?> {
2372 <.*?> aLayout = oSettings.aoHeader;
2373 <.*?> if ( nHeader )
2374 <.*?> {
2375 <.*?> aLayout = [];
2376 <.*?> _fnDetectHeader( aLayout, nHeader );
2377 <.*?> }
2378 <.*?> }
2379  
2380 <.*?> for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )
2381 <.*?> {
2382 <.*?> for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )
2383 <.*?> {
2384 <.*?> if ( aLayout[i][j].unique &&
2385 <.*?> (!aReturn[j] || !oSettings.bSortCellsTop) )
2386 <.*?> {
2387 <.*?> aReturn[j] = aLayout[i][j].cell;
2388 <.*?> }
2389 <.*?> }
2390 <.*?> }
2391  
2392 <.*?> return aReturn;
2393 <.*?> }
2394  
2395 <.*?> /**
2396 <.*?> * Create an Ajax call based on the table's settings, taking into account that
2397 <.*?> * parameters can have multiple forms, and backwards compatibility.
2398 <.*?> *
2399 <.*?> * @param {object} oSettings dataTables settings object
2400 <.*?> * @param {array} data Data to send to the server, required by
2401 <.*?> * DataTables - may be augmented by developer callbacks
2402 <.*?> * @param {function} fn Callback function to run when data is obtained
2403 <.*?> */
2404 <.*?> function _fnBuildAjax( oSettings, data, fn )
2405 <.*?> {
2406 <.*?> // Compatibility with 1.9-, allow fnServerData and event to manipulate
2407 <.*?> _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
2408  
2409 <.*?> // Convert to object based for 1.10+ if using the old array scheme which can
2410 <.*?> // come from server-side processing or serverParams
2411 <.*?> if ( data && $.isArray(data) ) {
2412 <.*?> var tmp = {};
2413 <.*?> var rbracket = /(.*?)\[\]$/;
2414  
2415 <.*?> $.each( data, function (key, val) {
2416 <.*?> var match = val.name.match(rbracket);
2417  
2418 <.*?> if ( match ) {
2419 <.*?> // Support for arrays
2420 <.*?> var name = match[0];
2421  
2422 <.*?> if ( ! tmp[ name ] ) {
2423 <.*?> tmp[ name ] = [];
2424 <.*?> }
2425 <.*?> tmp[ name ].push( val.value );
2426 <.*?> }
2427 <.*?> else {
2428 <.*?> tmp[val.name] = val.value;
2429 <.*?> }
2430 <.*?> } );
2431 <.*?> data = tmp;
2432 <.*?> }
2433  
2434 <.*?> var ajaxData;
2435 <.*?> var ajax = oSettings.ajax;
2436 <.*?> var instance = oSettings.oInstance;
2437 <.*?> var callback = function ( json ) {
2438 <.*?> _fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
2439 <.*?> fn( json );
2440 <.*?> };
2441  
2442 <.*?> if ( $.isPlainObject( ajax ) && ajax.data )
2443 <.*?> {
2444 <.*?> ajaxData = ajax.data;
2445  
2446 <.*?> var newData = $.isFunction( ajaxData ) ?
2447 <.*?> ajaxData( data, oSettings ) : // fn can manipulate data or return
2448 <.*?> ajaxData; // an object object or array to merge
2449  
2450 <.*?> // If the function returned something, use that alone
2451 <.*?> data = $.isFunction( ajaxData ) && newData ?
2452 <.*?> newData :
2453 <.*?> $.extend( true, data, newData );
2454  
2455 <.*?> // Remove the data property as we've resolved it already and don't want
2456 <.*?> // jQuery to do it again (it is restored at the end of the function)
2457 <.*?> delete ajax.data;
2458 <.*?> }
2459  
2460 <.*?> var baseAjax = {
2461 <.*?> "data": data,
2462 <.*?> "success": function (json) {
2463 <.*?> var error = json.error || json.sError;
2464 <.*?> if ( error ) {
2465 <.*?> _fnLog( oSettings, 0, error );
2466 <.*?> }
2467  
2468 <.*?> oSettings.json = json;
2469 <.*?> callback( json );
2470 <.*?> },
2471 <.*?> "dataType": "json",
2472 <.*?> "cache": false,
2473 <.*?> "type": oSettings.sServerMethod,
2474 <.*?> "error": function (xhr, error, thrown) {
2475 <.*?> var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
2476  
2477 <.*?> if ( $.inArray( true, ret ) === -1 ) {
2478 <.*?> if ( error == "parsererror" ) {
2479 <.*?> _fnLog( oSettings, 0, 'Invalid JSON response', 1 );
2480 <.*?> }
2481 <.*?> else if ( xhr.readyState === 4 ) {
2482 <.*?> _fnLog( oSettings, 0, 'Ajax error', 7 );
2483 <.*?> }
2484 <.*?> }
2485  
2486 <.*?> _fnProcessingDisplay( oSettings, false );
2487 <.*?> }
2488 <.*?> };
2489  
2490 <.*?> // Store the data submitted for the API
2491 <.*?> oSettings.oAjaxData = data;
2492  
2493 <.*?> // Allow plug-ins and external processes to modify the data
2494 <.*?> _fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
2495  
2496 <.*?> if ( oSettings.fnServerData )
2497 <.*?> {
2498 <.*?> // DataTables 1.9- compatibility
2499 <.*?> oSettings.fnServerData.call( instance,
2500 <.*?> oSettings.sAjaxSource,
2501 <.*?> $.map( data, function (val, key) { // Need to convert back to 1.9 trad format
2502 <.*?> return { name: key, value: val };
2503 <.*?> } ),
2504 <.*?> callback,
2505 <.*?> oSettings
2506 <.*?> );
2507 <.*?> }
2508 <.*?> else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
2509 <.*?> {
2510 <.*?> // DataTables 1.9- compatibility
2511 <.*?> oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
2512 <.*?> url: ajax || oSettings.sAjaxSource
2513 <.*?> } ) );
2514 <.*?> }
2515 <.*?> else if ( $.isFunction( ajax ) )
2516 <.*?> {
2517 <.*?> // Is a function - let the caller define what needs to be done
2518 <.*?> oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
2519 <.*?> }
2520 <.*?> else
2521 <.*?> {
2522 <.*?> // Object to extend the base settings
2523 <.*?> oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
2524  
2525 <.*?> // Restore for next time around
2526 <.*?> ajax.data = ajaxData;
2527 <.*?> }
2528 <.*?> }
2529  
2530  
2531 <.*?> /**
2532 <.*?> * Update the table using an Ajax call
2533 <.*?> * @param {object} settings dataTables settings object
2534 <.*?> * @returns {boolean} Block the table drawing or not
2535 <.*?> * @memberof DataTable#oApi
2536 <.*?> */
2537 <.*?> function _fnAjaxUpdate( settings )
2538 <.*?> {
2539 <.*?> if ( settings.bAjaxDataGet ) {
2540 <.*?> settings.iDraw++;
2541 <.*?> _fnProcessingDisplay( settings, true );
2542  
2543 <.*?> _fnBuildAjax(
2544 <.*?> settings,
2545 <.*?> _fnAjaxParameters( settings ),
2546 <.*?> function(json) {
2547 <.*?> _fnAjaxUpdateDraw( settings, json );
2548 <.*?> }
2549 <.*?> );
2550  
2551 <.*?> return false;
2552 <.*?> }
2553 <.*?> return true;
2554 <.*?> }
2555  
2556  
2557 <.*?> /**
2558 <.*?> * Build up the parameters in an object needed for a server-side processing
2559 <.*?> * request. Note that this is basically done twice, is different ways - a modern
2560 <.*?> * method which is used by default in DataTables 1.10 which uses objects and
2561 <.*?> * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if
2562 <.*?> * the sAjaxSource option is used in the initialisation, or the legacyAjax
2563 <.*?> * option is set.
2564 <.*?> * @param {object} oSettings dataTables settings object
2565 <.*?> * @returns {bool} block the table drawing or not
2566 <.*?> * @memberof DataTable#oApi
2567 <.*?> */
2568 <.*?> function _fnAjaxParameters( settings )
2569 <.*?> {
2570 <.*?> var
2571 <.*?> columns = settings.aoColumns,
2572 <.*?> columnCount = columns.length,
2573 <.*?> features = settings.oFeatures,
2574 <.*?> preSearch = settings.oPreviousSearch,
2575 <.*?> preColSearch = settings.aoPreSearchCols,
2576 <.*?> i, data = [], dataProp, column, columnSearch,
2577 <.*?> sort = _fnSortFlatten( settings ),
2578 <.*?> displayStart = settings._iDisplayStart,
2579 <.*?> displayLength = features.bPaginate !== false ?
2580 <.*?> settings._iDisplayLength :
2581 <.*?> -1;
2582  
2583 <.*?> var param = function ( name, value ) {
2584 <.*?> data.push( { 'name': name, 'value': value } );
2585 <.*?> };
2586  
2587 <.*?> // DataTables 1.9- compatible method
2588 <.*?> param( 'sEcho', settings.iDraw );
2589 <.*?> param( 'iColumns', columnCount );
2590 <.*?> param( 'sColumns', _pluck( columns, 'sName' ).join(',') );
2591 <.*?> param( 'iDisplayStart', displayStart );
2592 <.*?> param( 'iDisplayLength', displayLength );
2593  
2594 <.*?> // DataTables 1.10+ method
2595 <.*?> var d = {
2596 <.*?> draw: settings.iDraw,
2597 <.*?> columns: [],
2598 <.*?> order: [],
2599 <.*?> start: displayStart,
2600 <.*?> length: displayLength,
2601 <.*?> search: {
2602 <.*?> value: preSearch.sSearch,
2603 <.*?> regex: preSearch.bRegex
2604 <.*?> }
2605 <.*?> };
2606  
2607 <.*?> for ( i=0 ; i<columnCount ; i++ ) {
2608 <.*?> column = columns[i];
2609 <.*?> columnSearch = preColSearch[i];
2610 <.*?> dataProp = typeof column.mData=="function" ? 'function' : column.mData ;
2611  
2612 <.*?> d.columns.push( {
2613 <.*?> data: dataProp,
2614 <.*?> name: column.sName,
2615 <.*?> searchable: column.bSearchable,
2616 <.*?> orderable: column.bSortable,
2617 <.*?> search: {
2618 <.*?> value: columnSearch.sSearch,
2619 <.*?> regex: columnSearch.bRegex
2620 <.*?> }
2621 <.*?> } );
2622  
2623 <.*?> param( "mDataProp_"+i, dataProp );
2624  
2625 <.*?> if ( features.bFilter ) {
2626 <.*?> param( 'sSearch_'+i, columnSearch.sSearch );
2627 <.*?> param( 'bRegex_'+i, columnSearch.bRegex );
2628 <.*?> param( 'bSearchable_'+i, column.bSearchable );
2629 <.*?> }
2630  
2631 <.*?> if ( features.bSort ) {
2632 <.*?> param( 'bSortable_'+i, column.bSortable );
2633 <.*?> }
2634 <.*?> }
2635  
2636 <.*?> if ( features.bFilter ) {
2637 <.*?> param( 'sSearch', preSearch.sSearch );
2638 <.*?> param( 'bRegex', preSearch.bRegex );
2639 <.*?> }
2640  
2641 <.*?> if ( features.bSort ) {
2642 <.*?> $.each( sort, function ( i, val ) {
2643 <.*?> d.order.push( { column: val.col, dir: val.dir } );
2644  
2645 <.*?> param( 'iSortCol_'+i, val.col );
2646 <.*?> param( 'sSortDir_'+i, val.dir );
2647 <.*?> } );
2648  
2649 <.*?> param( 'iSortingCols', sort.length );
2650 <.*?> }
2651  
2652 <.*?> // If the legacy.ajax parameter is null, then we automatically decide which
2653 <.*?> // form to use, based on sAjaxSource
2654 <.*?> var legacy = DataTable.ext.legacy.ajax;
2655 <.*?> if ( legacy === null ) {
2656 <.*?> return settings.sAjaxSource ? data : d;
2657 <.*?> }
2658  
2659 <.*?> // Otherwise, if legacy has been specified then we use that to decide on the
2660 <.*?> // form
2661 <.*?> return legacy ? data : d;
2662 <.*?> }
2663  
2664  
2665 <.*?> /**
2666 <.*?> * Data the data from the server (nuking the old) and redraw the table
2667 <.*?> * @param {object} oSettings dataTables settings object
2668 <.*?> * @param {object} json json data return from the server.
2669 <.*?> * @param {string} json.sEcho Tracking flag for DataTables to match requests
2670 <.*?> * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
2671 <.*?> * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
2672 <.*?> * @param {array} json.aaData The data to display on this page
2673 <.*?> * @param {string} [json.sColumns] Column ordering (sName, comma separated)
2674 <.*?> * @memberof DataTable#oApi
2675 <.*?> */
2676 <.*?> function _fnAjaxUpdateDraw ( settings, json )
2677 <.*?> {
2678 <.*?> // v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
2679 <.*?> // Support both
2680 <.*?> var compat = function ( old, modern ) {
2681 <.*?> return json[old] !== undefined ? json[old] : json[modern];
2682 <.*?> };
2683  
2684 <.*?> var data = _fnAjaxDataSrc( settings, json );
2685 <.*?> var draw = compat( 'sEcho', 'draw' );
2686 <.*?> var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' );
2687 <.*?> var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' );
2688  
2689 <.*?> if ( draw ) {
2690 <.*?> // Protect against out of sequence returns
2691 <.*?> if ( draw*1 < settings.iDraw ) {
2692 <.*?> return;
2693 <.*?> }
2694 <.*?> settings.iDraw = draw * 1;
2695 <.*?> }
2696  
2697 <.*?> _fnClearTable( settings );
2698 <.*?> settings._iRecordsTotal = parseInt(recordsTotal, 10);
2699 <.*?> settings._iRecordsDisplay = parseInt(recordsFiltered, 10);
2700  
2701 <.*?> for ( var i=0, ien=data.length ; i<ien ; i++ ) {
2702 <.*?> _fnAddData( settings, data[i] );
2703 <.*?> }
2704 <.*?> settings.aiDisplay = settings.aiDisplayMaster.slice();
2705  
2706 <.*?> settings.bAjaxDataGet = false;
2707 <.*?> _fnDraw( settings );
2708  
2709 <.*?> if ( ! settings._bInitComplete ) {
2710 <.*?> _fnInitComplete( settings, json );
2711 <.*?> }
2712  
2713 <.*?> settings.bAjaxDataGet = true;
2714 <.*?> _fnProcessingDisplay( settings, false );
2715 <.*?> }
2716  
2717  
2718 <.*?> /**
2719 <.*?> * Get the data from the JSON data source to use for drawing a table. Using
2720 <.*?> * `_fnGetObjectDataFn` allows the data to be sourced from a property of the
2721 <.*?> * source object, or from a processing function.
2722 <.*?> * @param {object} oSettings dataTables settings object
2723 <.*?> * @param {object} json Data source object / array from the server
2724 <.*?> * @return {array} Array of data to use
2725 <.*?> */
2726 <.*?> function _fnAjaxDataSrc ( oSettings, json )
2727 <.*?> {
2728 <.*?> var dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ?
2729 <.*?> oSettings.ajax.dataSrc :
2730 <.*?> oSettings.sAjaxDataProp; // Compatibility with 1.9-.
2731  
2732 <.*?> // Compatibility with 1.9-. In order to read from aaData, check if the
2733 <.*?> // default has been changed, if not, check for aaData
2734 <.*?> if ( dataSrc === 'data' ) {
2735 <.*?> return json.aaData || json[dataSrc];
2736 <.*?> }
2737  
2738 <.*?> return dataSrc !== "" ?
2739 <.*?> _fnGetObjectDataFn( dataSrc )( json ) :
2740 <.*?> json;
2741 <.*?> }
2742  
2743 <.*?> /**
2744 <.*?> * Generate the node required for filtering text
2745 <.*?> * @returns {node} Filter control element
2746 <.*?> * @param {object} oSettings dataTables settings object
2747 <.*?> * @memberof DataTable#oApi
2748 <.*?> */
2749 <.*?> function _fnFeatureHtmlFilter ( settings )
2750 <.*?> {
2751 <.*?> var classes = settings.oClasses;
2752 <.*?> var tableId = settings.sTableId;
2753 <.*?> var language = settings.oLanguage;
2754 <.*?> var previousSearch = settings.oPreviousSearch;
2755 <.*?> var features = settings.aanFeatures;
2756 <.*?> var input = '<input type="search" class="'+classes.sFilterInput+'"/>';
2757  
2758 <.*?> var str = language.sSearch;
2759 <.*?> str = str.match(/_INPUT_/) ?
2760 <.*?> str.replace('_INPUT_', input) :
2761 <.*?> str+input;
2762  
2763 <.*?> var filter = $('<div/>', {
2764 <.*?> 'id': ! features.f ? tableId+'_filter' : null,
2765 <.*?> 'class': classes.sFilter
2766 <.*?> } )
2767 <.*?> .append( $('<label/>' ).append( str ) );
2768  
2769 <.*?> var searchFn = function() {
2770 <.*?> /* Update all other filter input elements for the new display */
2771 <.*?> var n = features.f;
2772 <.*?> var val = !this.value ? "" : this.value; // mental IE8 fix :-(
2773  
2774 <.*?> /* Now do the filter */
2775 <.*?> if ( val != previousSearch.sSearch ) {
2776 <.*?> _fnFilterComplete( settings, {
2777 <.*?> "sSearch": val,
2778 <.*?> "bRegex": previousSearch.bRegex,
2779 <.*?> "bSmart": previousSearch.bSmart ,
2780 <.*?> "bCaseInsensitive": previousSearch.bCaseInsensitive
2781 <.*?> } );
2782  
2783 <.*?> // Need to redraw, without resorting
2784 <.*?> settings._iDisplayStart = 0;
2785 <.*?> _fnDraw( settings );
2786 <.*?> }
2787 <.*?> };
2788  
2789 <.*?> var searchDelay = settings.searchDelay !== null ?
2790 <.*?> settings.searchDelay :
2791 <.*?> _fnDataSource( settings ) === 'ssp' ?
2792 <.*?> 400 :
2793 <.*?> 0;
2794  
2795 <.*?> var jqFilter = $('input', filter)
2796 <.*?> .val( previousSearch.sSearch )
2797 <.*?> .attr( 'placeholder', language.sSearchPlaceholder )
2798 <.*?> .bind(
2799 <.*?> 'keyup.DT search.DT input.DT paste.DT cut.DT',
2800 <.*?> searchDelay ?
2801 <.*?> _fnThrottle( searchFn, searchDelay ) :
2802 <.*?> searchFn
2803 <.*?> )
2804 <.*?> .bind( 'keypress.DT', function(e) {
2805 <.*?> /* Prevent form submission */
2806 <.*?> if ( e.keyCode == 13 ) {
2807 <.*?> return false;
2808 <.*?> }
2809 <.*?> } )
2810 <.*?> .attr('aria-controls', tableId);
2811  
2812 <.*?> // Update the input elements whenever the table is filtered
2813 <.*?> $(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {
2814 <.*?> if ( settings === s ) {
2815 <.*?> // IE9 throws an 'unknown error' if document.activeElement is used
2816 <.*?> // inside an iframe or frame...
2817 <.*?> try {
2818 <.*?> if ( jqFilter[0] !== document.activeElement ) {
2819 <.*?> jqFilter.val( previousSearch.sSearch );
2820 <.*?> }
2821 <.*?> }
2822 <.*?> catch ( e ) {}
2823 <.*?> }
2824 <.*?> } );
2825  
2826 <.*?> return filter[0];
2827 <.*?> }
2828  
2829  
2830 <.*?> /**
2831 <.*?> * Filter the table using both the global filter and column based filtering
2832 <.*?> * @param {object} oSettings dataTables settings object
2833 <.*?> * @param {object} oSearch search information
2834 <.*?> * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
2835 <.*?> * @memberof DataTable#oApi
2836 <.*?> */
2837 <.*?> function _fnFilterComplete ( oSettings, oInput, iForce )
2838 <.*?> {
2839 <.*?> var oPrevSearch = oSettings.oPreviousSearch;
2840 <.*?> var aoPrevSearch = oSettings.aoPreSearchCols;
2841 <.*?> var fnSaveFilter = function ( oFilter ) {
2842 <.*?> /* Save the filtering values */
2843 <.*?> oPrevSearch.sSearch = oFilter.sSearch;
2844 <.*?> oPrevSearch.bRegex = oFilter.bRegex;
2845 <.*?> oPrevSearch.bSmart = oFilter.bSmart;
2846 <.*?> oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
2847 <.*?> };
2848 <.*?> var fnRegex = function ( o ) {
2849 <.*?> // Backwards compatibility with the bEscapeRegex option
2850 <.*?> return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex;
2851 <.*?> };
2852  
2853 <.*?> // Resolve any column types that are unknown due to addition or invalidation
2854 <.*?> // @todo As per sort - can this be moved into an event handler?
2855 <.*?> _fnColumnTypes( oSettings );
2856  
2857 <.*?> /* In server-side processing all filtering is done by the server, so no point hanging around here */
2858 <.*?> if ( _fnDataSource( oSettings ) != 'ssp' )
2859 <.*?> {
2860 <.*?> /* Global filter */
2861 <.*?> _fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive );
2862 <.*?> fnSaveFilter( oInput );
2863  
2864 <.*?> /* Now do the individual column filter */
2865 <.*?> for ( var i=0 ; i<aoPrevSearch.length ; i++ )
2866 <.*?> {
2867 <.*?> _fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]),
2868 <.*?> aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
2869 <.*?> }
2870  
2871 <.*?> /* Custom filtering */
2872 <.*?> _fnFilterCustom( oSettings );
2873 <.*?> }
2874 <.*?> else
2875 <.*?> {
2876 <.*?> fnSaveFilter( oInput );
2877 <.*?> }
2878  
2879 <.*?> /* Tell the draw function we have been filtering */
2880 <.*?> oSettings.bFiltered = true;
2881 <.*?> _fnCallbackFire( oSettings, null, 'search', [oSettings] );
2882 <.*?> }
2883  
2884  
2885 <.*?> /**
2886 <.*?> * Apply custom filtering functions
2887 <.*?> * @param {object} oSettings dataTables settings object
2888 <.*?> * @memberof DataTable#oApi
2889 <.*?> */
2890 <.*?> function _fnFilterCustom( settings )
2891 <.*?> {
2892 <.*?> var filters = DataTable.ext.search;
2893 <.*?> var displayRows = settings.aiDisplay;
2894 <.*?> var row, rowIdx;
2895  
2896 <.*?> for ( var i=0, ien=filters.length ; i<ien ; i++ ) {
2897 <.*?> var rows = [];
2898  
2899 <.*?> // Loop over each row and see if it should be included
2900 <.*?> for ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {
2901 <.*?> rowIdx = displayRows[ j ];
2902 <.*?> row = settings.aoData[ rowIdx ];
2903  
2904 <.*?> if ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {
2905 <.*?> rows.push( rowIdx );
2906 <.*?> }
2907 <.*?> }
2908  
2909 <.*?> // So the array reference doesn't break set the results into the
2910 <.*?> // existing array
2911 <.*?> displayRows.length = 0;
2912 <.*?> displayRows.push.apply( displayRows, rows );
2913 <.*?> }
2914 <.*?> }
2915  
2916  
2917 <.*?> /**
2918 <.*?> * Filter the table on a per-column basis
2919 <.*?> * @param {object} oSettings dataTables settings object
2920 <.*?> * @param {string} sInput string to filter on
2921 <.*?> * @param {int} iColumn column to filter
2922 <.*?> * @param {bool} bRegex treat search string as a regular expression or not
2923 <.*?> * @param {bool} bSmart use smart filtering or not
2924 <.*?> * @param {bool} bCaseInsensitive Do case insenstive matching or not
2925 <.*?> * @memberof DataTable#oApi
2926 <.*?> */
2927 <.*?> function _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive )
2928 <.*?> {
2929 <.*?> if ( searchStr === '' ) {
2930 <.*?> return;
2931 <.*?> }
2932  
2933 <.*?> var data;
2934 <.*?> var display = settings.aiDisplay;
2935 <.*?> var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive );
2936  
2937 <.*?> for ( var i=display.length-1 ; i>=0 ; i-- ) {
2938 <.*?> data = settings.aoData[ display[i] ]._aFilterData[ colIdx ];
2939  
2940 <.*?> if ( ! rpSearch.test( data ) ) {
2941 <.*?> display.splice( i, 1 );
2942 <.*?> }
2943 <.*?> }
2944 <.*?> }
2945  
2946  
2947 <.*?> /**
2948 <.*?> * Filter the data table based on user input and draw the table
2949 <.*?> * @param {object} settings dataTables settings object
2950 <.*?> * @param {string} input string to filter on
2951 <.*?> * @param {int} force optional - force a research of the master array (1) or not (undefined or 0)
2952 <.*?> * @param {bool} regex treat as a regular expression or not
2953 <.*?> * @param {bool} smart perform smart filtering or not
2954 <.*?> * @param {bool} caseInsensitive Do case insenstive matching or not
2955 <.*?> * @memberof DataTable#oApi
2956 <.*?> */
2957 <.*?> function _fnFilter( settings, input, force, regex, smart, caseInsensitive )
2958 <.*?> {
2959 <.*?> var rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive );
2960 <.*?> var prevSearch = settings.oPreviousSearch.sSearch;
2961 <.*?> var displayMaster = settings.aiDisplayMaster;
2962 <.*?> var display, invalidated, i;
2963  
2964 <.*?> // Need to take account of custom filtering functions - always filter
2965 <.*?> if ( DataTable.ext.search.length !== 0 ) {
2966 <.*?> force = true;
2967 <.*?> }
2968  
2969 <.*?> // Check if any of the rows were invalidated
2970 <.*?> invalidated = _fnFilterData( settings );
2971  
2972 <.*?> // If the input is blank - we just want the full data set
2973 <.*?> if ( input.length <= 0 ) {
2974 <.*?> settings.aiDisplay = displayMaster.slice();
2975 <.*?> }
2976 <.*?> else {
2977 <.*?> // New search - start from the master array
2978 <.*?> if ( invalidated ||
2979 <.*?> force ||
2980 <.*?> prevSearch.length > input.length ||
2981 <.*?> input.indexOf(prevSearch) !== 0 ||
2982 <.*?> settings.bSorted // On resort, the display master needs to be
2983 <.*?> // re-filtered since indexes will have changed
2984 <.*?> ) {
2985 <.*?> settings.aiDisplay = displayMaster.slice();
2986 <.*?> }
2987  
2988 <.*?> // Search the display array
2989 <.*?> display = settings.aiDisplay;
2990  
2991 <.*?> for ( i=display.length-1 ; i>=0 ; i-- ) {
2992 <.*?> if ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) {
2993 <.*?> display.splice( i, 1 );
2994 <.*?> }
2995 <.*?> }
2996 <.*?> }
2997 <.*?> }
2998  
2999  
3000 <.*?> /**
3001 <.*?> * Build a regular expression object suitable for searching a table
3002 <.*?> * @param {string} sSearch string to search for
3003 <.*?> * @param {bool} bRegex treat as a regular expression or not
3004 <.*?> * @param {bool} bSmart perform smart filtering or not
3005 <.*?> * @param {bool} bCaseInsensitive Do case insensitive matching or not
3006 <.*?> * @returns {RegExp} constructed object
3007 <.*?> * @memberof DataTable#oApi
3008 <.*?> */
3009 <.*?> function _fnFilterCreateSearch( search, regex, smart, caseInsensitive )
3010 <.*?> {
3011 <.*?> search = regex ?
3012 <.*?> search :
3013 <.*?> _fnEscapeRegex( search );
3014  
3015 <.*?> if ( smart ) {
3016 <.*?> /* For smart filtering we want to allow the search to work regardless of
3017 <.*?> * word order. We also want double quoted text to be preserved, so word
3018 <.*?> * order is important - a la google. So this is what we want to
3019 <.*?> * generate:
3020 <.*?> *
3021 <.*?> * ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$
3022 <.*?> */
3023 <.*?> var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) {
3024 <.*?> if ( word.charAt(0) === '"' ) {
3025 <.*?> var m = word.match( /^"(.*)"$/ );
3026 <.*?> word = m ? m[1] : word;
3027 <.*?> }
3028  
3029 <.*?> return word.replace('"', '');
3030 <.*?> } );
3031  
3032 <.*?> search = '^(?=.*?'+a.join( ')(?=.*?' )+').*$';
3033 <.*?> }
3034  
3035 <.*?> return new RegExp( search, caseInsensitive ? 'i' : '' );
3036 <.*?> }
3037  
3038  
3039 <.*?> /**
3040 <.*?> * Escape a string such that it can be used in a regular expression
3041 <.*?> * @param {string} sVal string to escape
3042 <.*?> * @returns {string} escaped string
3043 <.*?> * @memberof DataTable#oApi
3044 <.*?> */
3045 <.*?> function _fnEscapeRegex ( sVal )
3046 <.*?> {
3047 <.*?> return sVal.replace( _re_escape_regex, '\\$1' );
3048 <.*?> }
3049  
3050  
3051  
3052 <.*?> var __filter_div = $('<div>')[0];
3053 <.*?> var __filter_div_textContent = __filter_div.textContent !== undefined;
3054  
3055 <.*?> // Update the filtering data for each row if needed (by invalidation or first run)
3056 <.*?> function _fnFilterData ( settings )
3057 <.*?> {
3058 <.*?> var columns = settings.aoColumns;
3059 <.*?> var column;
3060 <.*?> var i, j, ien, jen, filterData, cellData, row;
3061 <.*?> var fomatters = DataTable.ext.type.search;
3062 <.*?> var wasInvalidated = false;
3063  
3064 <.*?> for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
3065 <.*?> row = settings.aoData[i];
3066  
3067 <.*?> if ( ! row._aFilterData ) {
3068 <.*?> filterData = [];
3069  
3070 <.*?> for ( j=0, jen=columns.length ; j<jen ; j++ ) {
3071 <.*?> column = columns[j];
3072  
3073 <.*?> if ( column.bSearchable ) {
3074 <.*?> cellData = _fnGetCellData( settings, i, j, 'filter' );
3075  
3076 <.*?> if ( fomatters[ column.sType ] ) {
3077 <.*?> cellData = fomatters[ column.sType ]( cellData );
3078 <.*?> }
3079  
3080 <.*?> // Search in DataTables 1.10 is string based. In 1.11 this
3081 <.*?> // should be altered to also allow strict type checking.
3082 <.*?> if ( cellData === null ) {
3083 <.*?> cellData = '';
3084 <.*?> }
3085  
3086 <.*?> if ( typeof cellData !== 'string' && cellData.toString ) {
3087 <.*?> cellData = cellData.toString();
3088 <.*?> }
3089 <.*?> }
3090 <.*?> else {
3091 <.*?> cellData = '';
3092 <.*?> }
3093  
3094 <.*?> // If it looks like there is an HTML entity in the string,
3095 <.*?> // attempt to decode it so sorting works as expected. Note that
3096 <.*?> // we could use a single line of jQuery to do this, but the DOM
3097 <.*?> // method used here is much faster http://jsperf.com/html-decode
3098 <.*?> if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
3099 <.*?> __filter_div.innerHTML = cellData;
3100 <.*?> cellData = __filter_div_textContent ?
3101 <.*?> __filter_div.textContent :
3102 <.*?> __filter_div.innerText;
3103 <.*?> }
3104  
3105 <.*?> if ( cellData.replace ) {
3106 <.*?> cellData = cellData.replace(/[\r\n]/g, '');
3107 <.*?> }
3108  
3109 <.*?> filterData.push( cellData );
3110 <.*?> }
3111  
3112 <.*?> row._aFilterData = filterData;
3113 <.*?> row._sFilterRow = filterData.join(' ');
3114 <.*?> wasInvalidated = true;
3115 <.*?> }
3116 <.*?> }
3117  
3118 <.*?> return wasInvalidated;
3119 <.*?> }
3120  
3121  
3122 <.*?> /**
3123 <.*?> * Convert from the internal Hungarian notation to camelCase for external
3124 <.*?> * interaction
3125 <.*?> * @param {object} obj Object to convert
3126 <.*?> * @returns {object} Inverted object
3127 <.*?> * @memberof DataTable#oApi
3128 <.*?> */
3129 <.*?> function _fnSearchToCamel ( obj )
3130 <.*?> {
3131 <.*?> return {
3132 <.*?> search: obj.sSearch,
3133 <.*?> smart: obj.bSmart,
3134 <.*?> regex: obj.bRegex,
3135 <.*?> caseInsensitive: obj.bCaseInsensitive
3136 <.*?> };
3137 <.*?> }
3138  
3139  
3140  
3141 <.*?> /**
3142 <.*?> * Convert from camelCase notation to the internal Hungarian. We could use the
3143 <.*?> * Hungarian convert function here, but this is cleaner
3144 <.*?> * @param {object} obj Object to convert
3145 <.*?> * @returns {object} Inverted object
3146 <.*?> * @memberof DataTable#oApi
3147 <.*?> */
3148 <.*?> function _fnSearchToHung ( obj )
3149 <.*?> {
3150 <.*?> return {
3151 <.*?> sSearch: obj.search,
3152 <.*?> bSmart: obj.smart,
3153 <.*?> bRegex: obj.regex,
3154 <.*?> bCaseInsensitive: obj.caseInsensitive
3155 <.*?> };
3156 <.*?> }
3157  
3158 <.*?> /**
3159 <.*?> * Generate the node required for the info display
3160 <.*?> * @param {object} oSettings dataTables settings object
3161 <.*?> * @returns {node} Information element
3162 <.*?> * @memberof DataTable#oApi
3163 <.*?> */
3164 <.*?> function _fnFeatureHtmlInfo ( settings )
3165 <.*?> {
3166 <.*?> var
3167 <.*?> tid = settings.sTableId,
3168 <.*?> nodes = settings.aanFeatures.i,
3169 <.*?> n = $('<div/>', {
3170 <.*?> 'class': settings.oClasses.sInfo,
3171 <.*?> 'id': ! nodes ? tid+'_info' : null
3172 <.*?> } );
3173  
3174 <.*?> if ( ! nodes ) {
3175 <.*?> // Update display on each draw
3176 <.*?> settings.aoDrawCallback.push( {
3177 <.*?> "fn": _fnUpdateInfo,
3178 <.*?> "sName": "information"
3179 <.*?> } );
3180  
3181 <.*?> n
3182 <.*?> .attr( 'role', 'status' )
3183 <.*?> .attr( 'aria-live', 'polite' );
3184  
3185 <.*?> // Table is described by our info div
3186 <.*?> $(settings.nTable).attr( 'aria-describedby', tid+'_info' );
3187 <.*?> }
3188  
3189 <.*?> return n[0];
3190 <.*?> }
3191  
3192  
3193 <.*?> /**
3194 <.*?> * Update the information elements in the display
3195 <.*?> * @param {object} settings dataTables settings object
3196 <.*?> * @memberof DataTable#oApi
3197 <.*?> */
3198 <.*?> function _fnUpdateInfo ( settings )
3199 <.*?> {
3200 <.*?> /* Show information about the table */
3201 <.*?> var nodes = settings.aanFeatures.i;
3202 <.*?> if ( nodes.length === 0 ) {
3203 <.*?> return;
3204 <.*?> }
3205  
3206 <.*?> var
3207 <.*?> lang = settings.oLanguage,
3208 <.*?> start = settings._iDisplayStart+1,
3209 <.*?> end = settings.fnDisplayEnd(),
3210 <.*?> max = settings.fnRecordsTotal(),
3211 <.*?> total = settings.fnRecordsDisplay(),
3212 <.*?> out = total ?
3213 <.*?> lang.sInfo :
3214 <.*?> lang.sInfoEmpty;
3215  
3216 <.*?> if ( total !== max ) {
3217 <.*?> /* Record set after filtering */
3218 <.*?> out += ' ' + lang.sInfoFiltered;
3219 <.*?> }
3220  
3221 <.*?> // Convert the macros
3222 <.*?> out += lang.sInfoPostFix;
3223 <.*?> out = _fnInfoMacros( settings, out );
3224  
3225 <.*?> var callback = lang.fnInfoCallback;
3226 <.*?> if ( callback !== null ) {
3227 <.*?> out = callback.call( settings.oInstance,
3228 <.*?> settings, start, end, max, total, out
3229 <.*?> );
3230 <.*?> }
3231  
3232 <.*?> $(nodes).html( out );
3233 <.*?> }
3234  
3235  
3236 <.*?> function _fnInfoMacros ( settings, str )
3237 <.*?> {
3238 <.*?> // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
3239 <.*?> // internally
3240 <.*?> var
3241 <.*?> formatter = settings.fnFormatNumber,
3242 <.*?> start = settings._iDisplayStart+1,
3243 <.*?> len = settings._iDisplayLength,
3244 <.*?> vis = settings.fnRecordsDisplay(),
3245 <.*?> all = len === -1;
3246  
3247 <.*?> return str.
3248 <.*?> replace(/_START_/g, formatter.call( settings, start ) ).
3249 <.*?> replace(/_END_/g, formatter.call( settings, settings.fnDisplayEnd() ) ).
3250 <.*?> replace(/_MAX_/g, formatter.call( settings, settings.fnRecordsTotal() ) ).
3251 <.*?> replace(/_TOTAL_/g, formatter.call( settings, vis ) ).
3252 <.*?> replace(/_PAGE_/g, formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).
3253 <.*?> replace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) );
3254 <.*?> }
3255  
3256  
3257  
3258 <.*?> /**
3259 <.*?> * Draw the table for the first time, adding all required features
3260 <.*?> * @param {object} settings dataTables settings object
3261 <.*?> * @memberof DataTable#oApi
3262 <.*?> */
3263 <.*?> function _fnInitialise ( settings )
3264 <.*?> {
3265 <.*?> var i, iLen, iAjaxStart=settings.iInitDisplayStart;
3266 <.*?> var columns = settings.aoColumns, column;
3267 <.*?> var features = settings.oFeatures;
3268  
3269 <.*?> /* Ensure that the table data is fully initialised */
3270 <.*?> if ( ! settings.bInitialised ) {
3271 <.*?> setTimeout( function(){ _fnInitialise( settings ); }, 200 );
3272 <.*?> return;
3273 <.*?> }
3274  
3275 <.*?> /* Show the display HTML options */
3276 <.*?> _fnAddOptionsHtml( settings );
3277  
3278 <.*?> /* Build and draw the header / footer for the table */
3279 <.*?> _fnBuildHead( settings );
3280 <.*?> _fnDrawHead( settings, settings.aoHeader );
3281 <.*?> _fnDrawHead( settings, settings.aoFooter );
3282  
3283 <.*?> /* Okay to show that something is going on now */
3284 <.*?> _fnProcessingDisplay( settings, true );
3285  
3286 <.*?> /* Calculate sizes for columns */
3287 <.*?> if ( features.bAutoWidth ) {
3288 <.*?> _fnCalculateColumnWidths( settings );
3289 <.*?> }
3290  
3291 <.*?> for ( i=0, iLen=columns.length ; i<iLen ; i++ ) {
3292 <.*?> column = columns[i];
3293  
3294 <.*?> if ( column.sWidth ) {
3295 <.*?> column.nTh.style.width = _fnStringToCss( column.sWidth );
3296 <.*?> }
3297 <.*?> }
3298  
3299 <.*?> // If there is default sorting required - let's do it. The sort function
3300 <.*?> // will do the drawing for us. Otherwise we draw the table regardless of the
3301 <.*?> // Ajax source - this allows the table to look initialised for Ajax sourcing
3302 <.*?> // data (show 'loading' message possibly)
3303 <.*?> _fnReDraw( settings );
3304  
3305 <.*?> // Server-side processing init complete is done by _fnAjaxUpdateDraw
3306 <.*?> var dataSrc = _fnDataSource( settings );
3307 <.*?> if ( dataSrc != 'ssp' ) {
3308 <.*?> // if there is an ajax source load the data
3309 <.*?> if ( dataSrc == 'ajax' ) {
3310 <.*?> _fnBuildAjax( settings, [], function(json) {
3311 <.*?> var aData = _fnAjaxDataSrc( settings, json );
3312  
3313 <.*?> // Got the data - add it to the table
3314 <.*?> for ( i=0 ; i<aData.length ; i++ ) {
3315 <.*?> _fnAddData( settings, aData[i] );
3316 <.*?> }
3317  
3318 <.*?> // Reset the init display for cookie saving. We've already done
3319 <.*?> // a filter, and therefore cleared it before. So we need to make
3320 <.*?> // it appear 'fresh'
3321 <.*?> settings.iInitDisplayStart = iAjaxStart;
3322  
3323 <.*?> _fnReDraw( settings );
3324  
3325 <.*?> _fnProcessingDisplay( settings, false );
3326 <.*?> _fnInitComplete( settings, json );
3327 <.*?> }, settings );
3328 <.*?> }
3329 <.*?> else {
3330 <.*?> _fnProcessingDisplay( settings, false );
3331 <.*?> _fnInitComplete( settings );
3332 <.*?> }
3333 <.*?> }
3334 <.*?> }
3335  
3336  
3337 <.*?> /**
3338 <.*?> * Draw the table for the first time, adding all required features
3339 <.*?> * @param {object} oSettings dataTables settings object
3340 <.*?> * @param {object} [json] JSON from the server that completed the table, if using Ajax source
3341 <.*?> * with client-side processing (optional)
3342 <.*?> * @memberof DataTable#oApi
3343 <.*?> */
3344 <.*?> function _fnInitComplete ( settings, json )
3345 <.*?> {
3346 <.*?> settings._bInitComplete = true;
3347  
3348 <.*?> // On an Ajax load we now have data and therefore want to apply the column
3349 <.*?> // sizing
3350 <.*?> if ( json ) {
3351 <.*?> _fnAdjustColumnSizing( settings );
3352 <.*?> }
3353  
3354 <.*?> _fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] );
3355 <.*?> }
3356  
3357  
3358 <.*?> function _fnLengthChange ( settings, val )
3359 <.*?> {
3360 <.*?> var len = parseInt( val, 10 );
3361 <.*?> settings._iDisplayLength = len;
3362  
3363 <.*?> _fnLengthOverflow( settings );
3364  
3365 <.*?> // Fire length change event
3366 <.*?> _fnCallbackFire( settings, null, 'length', [settings, len] );
3367 <.*?> }
3368  
3369  
3370 <.*?> /**
3371 <.*?> * Generate the node required for user display length changing
3372 <.*?> * @param {object} settings dataTables settings object
3373 <.*?> * @returns {node} Display length feature node
3374 <.*?> * @memberof DataTable#oApi
3375 <.*?> */
3376 <.*?> function _fnFeatureHtmlLength ( settings )
3377 <.*?> {
3378 <.*?> var
3379 <.*?> classes = settings.oClasses,
3380 <.*?> tableId = settings.sTableId,
3381 <.*?> menu = settings.aLengthMenu,
3382 <.*?> d2 = $.isArray( menu[0] ),
3383 <.*?> lengths = d2 ? menu[0] : menu,
3384 <.*?> language = d2 ? menu[1] : menu;
3385  
3386 <.*?> var select = $('<select/>', {
3387 <.*?> 'name': tableId+'_length',
3388 <.*?> 'aria-controls': tableId,
3389 <.*?> 'class': classes.sLengthSelect
3390 <.*?> } );
3391  
3392 <.*?> for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
3393 <.*?> select[0][ i ] = new Option( language[i], lengths[i] );
3394 <.*?> }
3395  
3396 <.*?> var div = $('<div><label/></div>').addClass( classes.sLength );
3397 <.*?> if ( ! settings.aanFeatures.l ) {
3398 <.*?> div[0].id = tableId+'_length';
3399 <.*?> }
3400  
3401 <.*?> div.children().append(
3402 <.*?> settings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML )
3403 <.*?> );
3404  
3405 <.*?> // Can't use `select` variable as user might provide their own and the
3406 <.*?> // reference is broken by the use of outerHTML
3407 <.*?> $('select', div)
3408 <.*?> .val( settings._iDisplayLength )
3409 <.*?> .bind( 'change.DT', function(e) {
3410 <.*?> _fnLengthChange( settings, $(this).val() );
3411 <.*?> _fnDraw( settings );
3412 <.*?> } );
3413  
3414 <.*?> // Update node value whenever anything changes the table's length
3415 <.*?> $(settings.nTable).bind( 'length.dt.DT', function (e, s, len) {
3416 <.*?> if ( settings === s ) {
3417 <.*?> $('select', div).val( len );
3418 <.*?> }
3419 <.*?> } );
3420  
3421 <.*?> return div[0];
3422 <.*?> }
3423  
3424  
3425  
3426 <.*?> /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3427 <.*?> * Note that most of the paging logic is done in
3428 <.*?> * DataTable.ext.pager
3429 <.*?> */
3430  
3431 <.*?> /**
3432 <.*?> * Generate the node required for default pagination
3433 <.*?> * @param {object} oSettings dataTables settings object
3434 <.*?> * @returns {node} Pagination feature node
3435 <.*?> * @memberof DataTable#oApi
3436 <.*?> */
3437 <.*?> function _fnFeatureHtmlPaginate ( settings )
3438 <.*?> {
3439 <.*?> var
3440 <.*?> type = settings.sPaginationType,
3441 <.*?> plugin = DataTable.ext.pager[ type ],
3442 <.*?> modern = typeof plugin === 'function',
3443 <.*?> redraw = function( settings ) {
3444 <.*?> _fnDraw( settings );
3445 <.*?> },
3446 <.*?> node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0],
3447 <.*?> features = settings.aanFeatures;
3448  
3449 <.*?> if ( ! modern ) {
3450 <.*?> plugin.fnInit( settings, node, redraw );
3451 <.*?> }
3452  
3453 <.*?> /* Add a draw callback for the pagination on first instance, to update the paging display */
3454 <.*?> if ( ! features.p )
3455 <.*?> {
3456 <.*?> node.id = settings.sTableId+'_paginate';
3457  
3458 <.*?> settings.aoDrawCallback.push( {
3459 <.*?> "fn": function( settings ) {
3460 <.*?> if ( modern ) {
3461 <.*?> var
3462 <.*?> start = settings._iDisplayStart,
3463 <.*?> len = settings._iDisplayLength,
3464 <.*?> visRecords = settings.fnRecordsDisplay(),
3465 <.*?> all = len === -1,
3466 <.*?> page = all ? 0 : Math.ceil( start / len ),
3467 <.*?> pages = all ? 1 : Math.ceil( visRecords / len ),
3468 <.*?> buttons = plugin(page, pages),
3469 <.*?> i, ien;
3470  
3471 <.*?> for ( i=0, ien=features.p.length ; i<ien ; i++ ) {
3472 <.*?> _fnRenderer( settings, 'pageButton' )(
3473 <.*?> settings, features.p[i], i, buttons, page, pages
3474 <.*?> );
3475 <.*?> }
3476 <.*?> }
3477 <.*?> else {
3478 <.*?> plugin.fnUpdate( settings, redraw );
3479 <.*?> }
3480 <.*?> },
3481 <.*?> "sName": "pagination"
3482 <.*?> } );
3483 <.*?> }
3484  
3485 <.*?> return node;
3486 <.*?> }
3487  
3488  
3489 <.*?> /**
3490 <.*?> * Alter the display settings to change the page
3491 <.*?> * @param {object} settings DataTables settings object
3492 <.*?> * @param {string|int} action Paging action to take: "first", "previous",
3493 <.*?> * "next" or "last" or page number to jump to (integer)
3494 <.*?> * @param [bool] redraw Automatically draw the update or not
3495 <.*?> * @returns {bool} true page has changed, false - no change
3496 <.*?> * @memberof DataTable#oApi
3497 <.*?> */
3498 <.*?> function _fnPageChange ( settings, action, redraw )
3499 <.*?> {
3500 <.*?> var
3501 <.*?> start = settings._iDisplayStart,
3502 <.*?> len = settings._iDisplayLength,
3503 <.*?> records = settings.fnRecordsDisplay();
3504  
3505 <.*?> if ( records === 0 || len === -1 )
3506 <.*?> {
3507 <.*?> start = 0;
3508 <.*?> }
3509 <.*?> else if ( typeof action === "number" )
3510 <.*?> {
3511 <.*?> start = action * len;
3512  
3513 <.*?> if ( start > records )
3514 <.*?> {
3515 <.*?> start = 0;
3516 <.*?> }
3517 <.*?> }
3518 <.*?> else if ( action == "first" )
3519 <.*?> {
3520 <.*?> start = 0;
3521 <.*?> }
3522 <.*?> else if ( action == "previous" )
3523 <.*?> {
3524 <.*?> start = len >= 0 ?
3525 <.*?> start - len :
3526 <.*?> 0;
3527  
3528 <.*?> if ( start < 0 )
3529 <.*?> {
3530 <.*?> start = 0;
3531 <.*?> }
3532 <.*?> }
3533 <.*?> else if ( action == "next" )
3534 <.*?> {
3535 <.*?> if ( start + len < records )
3536 <.*?> {
3537 <.*?> start += len;
3538 <.*?> }
3539 <.*?> }
3540 <.*?> else if ( action == "last" )
3541 <.*?> {
3542 <.*?> start = Math.floor( (records-1) / len) * len;
3543 <.*?> }
3544 <.*?> else
3545 <.*?> {
3546 <.*?> _fnLog( settings, 0, "Unknown paging action: "+action, 5 );
3547 <.*?> }
3548  
3549 <.*?> var changed = settings._iDisplayStart !== start;
3550 <.*?> settings._iDisplayStart = start;
3551  
3552 <.*?> if ( changed ) {
3553 <.*?> _fnCallbackFire( settings, null, 'page', [settings] );
3554  
3555 <.*?> if ( redraw ) {
3556 <.*?> _fnDraw( settings );
3557 <.*?> }
3558 <.*?> }
3559  
3560 <.*?> return changed;
3561 <.*?> }
3562  
3563  
3564  
3565 <.*?> /**
3566 <.*?> * Generate the node required for the processing node
3567 <.*?> * @param {object} settings dataTables settings object
3568 <.*?> * @returns {node} Processing element
3569 <.*?> * @memberof DataTable#oApi
3570 <.*?> */
3571 <.*?> function _fnFeatureHtmlProcessing ( settings )
3572 <.*?> {
3573 <.*?> return $('
>', {
3574 <.*?>
'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null,
3575 <.*?>
'class': settings.oClasses.sProcessing
3576 <.*?>
} )
3577 <.*?>
.html( settings.oLanguage.sProcessing )
3578 <.*?>
.insertBefore( settings.nTable )[0];
3579 <.*?>
}
3580  
3581  
3582 <.*?>
/**
3583 <.*?>
* Display or hide the processing indicator
3584 <.*?>
* @param {object} settings dataTables settings object
3585 <.*?>
* @param {bool} show Show the processing indicator (true) or not (false)
3586 <.*?>
* @memberof DataTable#oApi
3587 <.*?>
*/
3588 <.*?>
function _fnProcessingDisplay ( settings, show )
3589 <.*?>
{
3590 <.*?>
if ( settings.oFeatures.bProcessing ) {
3591 <.*?>
$(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' );
3592 <.*?>
}
3593  
3594 <.*?>
_fnCallbackFire( settings, null, 'processing', [settings, show] );
3595 <.*?>
}
3596  
3597 <.*?>
/**
3598 <.*?>
* Add any control elements for the table - specifically scrolling
3599 <.*?>
* @param {object} settings dataTables settings object
3600 <.*?>
* @returns {node} Node to add to the DOM
3601 <.*?>
* @memberof DataTable#oApi
3602 <.*?>
*/
3603 <.*?>
function _fnFeatureHtmlTable ( settings )
3604 <.*?>
{
3605 <.*?>
var table = $(settings.nTable);
3606  
3607 <.*?>
// Add the ARIA grid role to the table
3608 <.*?>
table.attr( 'role', 'grid' );
3609  
3610 <.*?>
// Scrolling from here on in
3611 <.*?>
var scroll = settings.oScroll;
3612  
3613 <.*?>
if ( scroll.sX === '' && scroll.sY === '' ) {
3614 <.*?>
return settings.nTable;
3615 <.*?>
}
3616  
3617 <.*?>
var scrollX = scroll.sX;
3618 <.*?>
var scrollY = scroll.sY;
3619 <.*?>
var classes = settings.oClasses;
3620 <.*?>
var caption = table.children('caption');
3621 <.*?>
var captionSide = caption.length ? caption[0]._captionSide : null;
3622 <.*?>
var headerClone = $( table[0].cloneNode(false) );
3623 <.*?>
var footerClone = $( table[0].cloneNode(false) );
3624 <.*?>
var footer = table.children('tfoot');
3625 <.*?>
var _div = '<div/>';
3626 <.*?>
var size = function ( s ) {
3627 <.*?>
return !s ? null : _fnStringToCss( s );
3628 <.*?>
};
3629  
3630 <.*?>
// This is fairly messy, but with x scrolling enabled, if the table has a
3631 <.*?>
// width attribute, regardless of any width applied using the column width
3632 <.*?>
// options, the browser will shrink or grow the table as needed to fit into
3633 <.*?>
// that 100%. That would make the width options useless. So we remove it.
3634 <.*?>
// This is okay, under the assumption that width:100% is applied to the
3635 <.*?>
// table in CSS (it is in the default stylesheet) which will set the table
3636 <.*?>
// width as appropriate (the attribute and css behave differently...)
3637 <.*?>
if ( scroll.sX && table.attr('width') === '100%' ) {
3638 <.*?>
table.removeAttr('width');
3639 <.*?>
}
3640  
3641 <.*?>
if ( ! footer.length ) {
3642 <.*?>
footer = null;
3643 <.*?>
}
3644  
3645 <.*?>
/*
3646 <.*?>
* The HTML structure that we want to generate in this function is:
3647 <.*?>
* div - scroller
3648 <.*?>
* div - scroll head
3649 <.*?>
* div - scroll head inner
3650 <.*?>
* table - scroll head table
3651 <.*?>
* thead - thead
3652 <.*?>
* div - scroll body
3653 <.*?>
* table - table (master table)
3654 <.*?>
* thead - thead clone for sizing
3655 <.*?>
* tbody - tbody
3656 <.*?>
* div - scroll foot
3657 <.*?>
* div - scroll foot inner
3658 <.*?>
* table - scroll foot table
3659 <.*?>
* tfoot - tfoot
3660 <.*?>
*/
3661 <.*?>
var scroller = $( _div, { 'class': classes.sScrollWrapper } )
3662 <.*?>
.append(
3663 <.*?>
$(_div, { 'class': classes.sScrollHead } )
3664 <.*?>
.css( {
3665 <.*?>
overflow: 'hidden',
3666 <.*?>
position: 'relative',
3667 <.*?>
border: 0,
3668 <.*?>
width: scrollX ? size(scrollX) : '100%'
3669 <.*?>
} )
3670 <.*?>
.append(
3671 <.*?>
$(_div, { 'class': classes.sScrollHeadInner } )
3672 <.*?>
.css( {
3673 <.*?>
'box-sizing': 'content-box',
3674 <.*?>
width: scroll.sXInner || '100%'
3675 <.*?>
} )
3676 <.*?>
.append(
3677 <.*?>
headerClone
3678 <.*?>
.removeAttr('id')
3679 <.*?>
.css( 'margin-left', 0 )
3680 <.*?>
.append( captionSide === 'top' ? caption : null )
3681 <.*?>
.append(
3682 <.*?>
table.children('thead')
3683 <.*?>
)
3684 <.*?>
)
3685 <.*?>
)
3686 <.*?>
)
3687 <.*?>
.append(
3688 <.*?>
$(_div, { 'class': classes.sScrollBody } )
3689 <.*?>
.css( {
3690 <.*?>
overflow: 'auto',
3691 <.*?>
height: size( scrollY ),
3692 <.*?>
width: size( scrollX )
3693 <.*?>
} )
3694 <.*?>
.append( table )
3695 <.*?>
);
3696  
3697 <.*?>
if ( footer ) {
3698 <.*?>
scroller.append(
3699 <.*?>
$(_div, { 'class': classes.sScrollFoot } )
3700 <.*?>
.css( {
3701 <.*?>
overflow: 'hidden',
3702 <.*?>
border: 0,
3703 <.*?>
width: scrollX ? size(scrollX) : '100%'
3704 <.*?>
} )
3705 <.*?>
.append(
3706 <.*?>
$(_div, { 'class': classes.sScrollFootInner } )
3707 <.*?>
.append(
3708 <.*?>
footerClone
3709 <.*?>
.removeAttr('id')
3710 <.*?>
.css( 'margin-left', 0 )
3711 <.*?>
.append( captionSide === 'bottom' ? caption : null )
3712 <.*?>
.append(
3713 <.*?>
table.children('tfoot')
3714 <.*?>
)
3715 <.*?>
)
3716 <.*?>
)
3717 <.*?>
);
3718 <.*?>
}
3719  
3720 <.*?>
var children = scroller.children();
3721 <.*?>
var scrollHead = children[0];
3722 <.*?>
var scrollBody = children[1];
3723 <.*?>
var scrollFoot = footer ? children[2] : null;
3724  
3725 <.*?>
// When the body is scrolled, then we also want to scroll the headers
3726 <.*?>
if ( scrollX ) {
3727 <.*?>
$(scrollBody).on( 'scroll.DT', function (e) {
3728 <.*?>
var scrollLeft = this.scrollLeft;
3729  
3730 <.*?>
scrollHead.scrollLeft = scrollLeft;
3731  
3732 <.*?>
if ( footer ) {
3733 <.*?>
scrollFoot.scrollLeft = scrollLeft;
3734 <.*?>
}
3735 <.*?>
} );
3736 <.*?>
}
3737  
3738 <.*?>
settings.nScrollHead = scrollHead;
3739 <.*?>
settings.nScrollBody = scrollBody;
3740 <.*?>
settings.nScrollFoot = scrollFoot;
3741  
3742 <.*?>
// On redraw - align columns
3743 <.*?>
settings.aoDrawCallback.push( {
3744 <.*?>
"fn": _fnScrollDraw,
3745 <.*?>
"sName": "scrolling"
3746 <.*?>
} );
3747  
3748 <.*?>
return scroller[0];
3749 <.*?>
}
3750  
3751  
3752  
3753 <.*?>
/**
3754 <.*?>
* Update the header, footer and body tables for resizing - i.e. column
3755 <.*?>
* alignment.
3756 <.*?>
*
3757 <.*?>
* Welcome to the most horrible function DataTables. The process that this
3758 <.*?>
* function follows is basically:
3759 <.*?>
* 1. Re-create the table inside the scrolling div
3760 <.*?>
* 2. Take live measurements from the DOM
3761 <.*?>
* 3. Apply the measurements to align the columns
3762 <.*?>
* 4. Clean up
3763 <.*?>
*
3764 <.*?>
* @param {object} settings dataTables settings object
3765 <.*?>
* @memberof DataTable#oApi
3766 <.*?>
*/
3767 <.*?>
function _fnScrollDraw ( settings )
3768 <.*?>
{
3769 <.*?>
// Given that this is such a monster function, a lot of variables are use
3770 <.*?>
// to try and keep the minimised size as small as possible
3771 <.*?>
var
3772 <.*?>
scroll = settings.oScroll,
3773 <.*?>
scrollX = scroll.sX,
3774 <.*?>
scrollXInner = scroll.sXInner,
3775 <.*?>
scrollY = scroll.sY,
3776 <.*?>
barWidth = scroll.iBarWidth,
3777 <.*?>
divHeader = $(settings.nScrollHead),
3778 <.*?>
divHeaderStyle = divHeader[0].style,
3779 <.*?>
divHeaderInner = divHeader.children('div'),
3780 <.*?>
divHeaderInnerStyle = divHeaderInner[0].style,
3781 <.*?>
divHeaderTable = divHeaderInner.children('table'),
3782 <.*?>
divBodyEl = settings.nScrollBody,
3783 <.*?>
divBody = $(divBodyEl),
3784 <.*?>
divBodyStyle = divBodyEl.style,
3785 <.*?>
divFooter = $(settings.nScrollFoot),
3786 <.*?>
divFooterInner = divFooter.children('div'),
3787 <.*?>
divFooterTable = divFooterInner.children('table'),
3788 <.*?>
header = $(settings.nTHead),
3789 <.*?>
table = $(settings.nTable),
3790 <.*?>
tableEl = table[0],
3791 <.*?>
tableStyle = tableEl.style,
3792 <.*?>
footer = settings.nTFoot ? $(settings.nTFoot) : null,
3793 <.*?>
browser = settings.oBrowser,
3794 <.*?>
ie67 = browser.bScrollOversize,
3795 <.*?>
headerTrgEls, footerTrgEls,
3796 <.*?>
headerSrcEls, footerSrcEls,
3797 <.*?>
headerCopy, footerCopy,
3798 <.*?>
headerWidths=[], footerWidths=[],
3799 <.*?>
headerContent=[],
3800 <.*?>
idx, correction, sanityWidth,
3801 <.*?>
zeroOut = function(nSizer) {
3802 <.*?>
var style = nSizer.style;
3803 <.*?>
style.paddingTop = "0";
3804 <.*?>
style.paddingBottom = "0";
3805 <.*?>
style.borderTopWidth = "0";
3806 <.*?>
style.borderBottomWidth = "0";
3807 <.*?>
style.height = 0;
3808 <.*?>
};
3809  
3810 <.*?>
/*
3811 <.*?>
* 1. Re-create the table inside the scrolling div
3812 <.*?>
*/
3813  
3814 <.*?>
// Remove the old minimised thead and tfoot elements in the inner table
3815 <.*?>
table.children('thead, tfoot').remove();
3816  
3817 <.*?>
// Clone the current header and footer elements and then place it into the inner table
3818 <.*?>
headerCopy = header.clone().prependTo( table );
3819 <.*?>
headerTrgEls = header.find('tr'); // original header is in its own table
3820 <.*?>
headerSrcEls = headerCopy.find('tr');
3821 <.*?>
headerCopy.find('th, td').removeAttr('tabindex');
3822  
3823 <.*?>
if ( footer ) {
3824 <.*?>
footerCopy = footer.clone().prependTo( table );
3825 <.*?>
footerTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized
3826 <.*?>
footerSrcEls = footerCopy.find('tr');
3827 <.*?>
}
3828  
3829  
3830 <.*?>
/*
3831 <.*?>
* 2. Take live measurements from the DOM - do not alter the DOM itself!
3832 <.*?>
*/
3833  
3834 <.*?>
// Remove old sizing and apply the calculated column widths
3835 <.*?>
// Get the unique column headers in the newly created (cloned) header. We want to apply the
3836 <.*?>
// calculated sizes to this header
3837 <.*?>
if ( ! scrollX )
3838 <.*?>
{
3839 <.*?>
divBodyStyle.width = '100%';
3840 <.*?>
divHeader[0].style.width = '100%';
3841 <.*?>
}
3842  
3843 <.*?>
$.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) {
3844 <.*?>
idx = _fnVisibleToColumnIndex( settings, i );
3845 <.*?>
el.style.width = settings.aoColumns[idx].sWidth;
3846 <.*?>
} );
3847  
3848 <.*?>
if ( footer ) {
3849 <.*?>
_fnApplyToChildren( function(n) {
3850 <.*?>
n.style.width = "";
3851 <.*?>
}, footerSrcEls );
3852 <.*?>
}
3853  
3854 <.*?>
// If scroll collapse is enabled, when we put the headers back into the body for sizing, we
3855 <.*?>
// will end up forcing the scrollbar to appear, making our measurements wrong for when we
3856 <.*?>
// then hide it (end of this function), so add the header height to the body scroller.
3857 <.*?>
if ( scroll.bCollapse && scrollY !== "" ) {
3858 <.*?>
divBodyStyle.height = (divBody[0].offsetHeight + header[0].offsetHeight)+"px";
3859 <.*?>
}
3860  
3861 <.*?>
// Size the table as a whole
3862 <.*?>
sanityWidth = table.outerWidth();
3863 <.*?>
if ( scrollX === "" ) {
3864 <.*?>
// No x scrolling
3865 <.*?>
tableStyle.width = "100%";
3866  
3867 <.*?>
// IE7 will make the width of the table when 100% include the scrollbar
3868 <.*?>
// - which is shouldn't. When there is a scrollbar we need to take this
3869 <.*?>
// into account.
3870 <.*?>
if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||
3871 <.*?>
divBody.css('overflow-y') == "scroll")
3872 <.*?>
) {
3873 <.*?>
tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);
3874 <.*?>
}
3875 <.*?>
}
3876 <.*?>
else
3877 <.*?>
{
3878 <.*?>
// x scrolling
3879 <.*?>
if ( scrollXInner !== "" ) {
3880 <.*?>
// x scroll inner has been given - use it
3881 <.*?>
tableStyle.width = _fnStringToCss(scrollXInner);
3882 <.*?>
}
3883 <.*?>
else if ( sanityWidth == divBody.width() && divBody.height() < table.height() ) {
3884 <.*?>
< table.height() ) { // There is y-scrolling - try to take account of the y scroll bar
3885 <.*?>
< table.height() ) { tableStyle.width = _fnStringToCss( sanityWidth-barWidth );
3886 <.*?>
< table.height() ) { if ( table.outerWidth() > sanityWidth-barWidth ) {
3887 <.*?>
< table.height() ) { // Not possible to take account of it
3888 <.*?>
< table.height() ) { tableStyle.width = _fnStringToCss( sanityWidth );
3889 <.*?>
< table.height() ) { }
3890 <.*?>
< table.height() ) { }
3891 <.*?>
< table.height() ) { else {
3892 <.*?>
< table.height() ) { // When all else fails
3893 <.*?>
< table.height() ) { tableStyle.width = _fnStringToCss( sanityWidth );
3894 <.*?>
< table.height() ) { }
3895 <.*?>
< table.height() ) { }
3896  
3897 <.*?>
< table.height() ) { // Recalculate the sanity width - now that we've applied the required width,
3898 <.*?>
< table.height() ) { // before it was a temporary variable. This is required because the column
3899 <.*?>
< table.height() ) { // width calculation is done before this table DOM is created.
3900 <.*?>
< table.height() ) { sanityWidth = table.outerWidth();
3901  
3902 <.*?>
< table.height() ) { // Hidden header should have zero height, so remove padding and borders. Then
3903 <.*?>
< table.height() ) { // set the width based on the real headers
3904  
3905 <.*?>
< table.height() ) { // Apply all styles in one pass
3906 <.*?>
< table.height() ) { _fnApplyToChildren( zeroOut, headerSrcEls );
3907  
3908 <.*?>
< table.height() ) { // Read all widths in next pass
3909 <.*?>
< table.height() ) { _fnApplyToChildren( function(nSizer) {
3910 <.*?>
< table.height() ) { headerContent.push( nSizer.innerHTML );
3911 <.*?>
< table.height() ) { headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
3912 <.*?>
< table.height() ) { }, headerSrcEls );
3913  
3914 <.*?>
< table.height() ) { // Apply all widths in final pass
3915 <.*?>
< table.height() ) { _fnApplyToChildren( function(nToSize, i) {
3916 <.*?>
< table.height() ) { nToSize.style.width = headerWidths[i];
3917 <.*?>
< table.height() ) { }, headerTrgEls );
3918  
3919 <.*?>
< table.height() ) { $(headerSrcEls).height(0);
3920  
3921 <.*?>
< table.height() ) { /* Same again with the footer if we have one */
3922 <.*?>
< table.height() ) { if ( footer )
3923 <.*?>
< table.height() ) { {
3924 <.*?>
< table.height() ) { _fnApplyToChildren( zeroOut, footerSrcEls );
3925  
3926 <.*?>
< table.height() ) { _fnApplyToChildren( function(nSizer) {
3927 <.*?>
< table.height() ) { footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
3928 <.*?>
< table.height() ) { }, footerSrcEls );
3929  
3930 <.*?>
< table.height() ) { _fnApplyToChildren( function(nToSize, i) {
3931 <.*?>
< table.height() ) { nToSize.style.width = footerWidths[i];
3932 <.*?>
< table.height() ) { }, footerTrgEls );
3933  
3934 <.*?>
< table.height() ) { $(footerSrcEls).height(0);
3935 <.*?>
< table.height() ) { }
3936  
3937  
3938 <.*?>
< table.height() ) { /*
3939 <.*?>
< table.height() ) { * 3. Apply the measurements
3940 <.*?>
< table.height() ) { */
3941  
3942 <.*?>
< table.height() ) { // "Hide" the header and footer that we used for the sizing. We need to keep
3943 <.*?>
< table.height() ) { // the content of the cell so that the width applied to the header and body
3944 <.*?>
< table.height() ) { // both match, but we want to hide it completely. We want to also fix their
3945 <.*?>
< table.height() ) { // width to what they currently are
3946 <.*?>
< table.height() ) { _fnApplyToChildren( function(nSizer, i) {
3947 <.*?>
< table.height() ) { nSizer.innerHTML = '
'+headerContent[i]+'div>';
3948 <.*?>
< table.height() ) {
nSizer.style.width = headerWidths[i];
3949 <.*?>
< table.height() ) {
}, headerSrcEls );
3950  
3951 <.*?>
< table.height() ) {
if ( footer )
3952 <.*?>
< table.height() ) {
{
3953 <.*?>
< table.height() ) {
_fnApplyToChildren( function(nSizer, i) {
3954 <.*?>
< table.height() ) {
nSizer.innerHTML = "";
3955 <.*?>
< table.height() ) {
nSizer.style.width = footerWidths[i];
3956 <.*?>
< table.height() ) {
}, footerSrcEls );
3957 <.*?>
< table.height() ) {
}
3958  
3959 <.*?>
< table.height() ) {
// Sanity check that the table is of a sensible width. If not then we are going to get
3960 <.*?>
< table.height() ) {
// misalignment - try to prevent this by not allowing the table to shrink below its min width
3961 <.*?>
< table.height() ) {
if ( table.outerWidth() < sanityWidth )
3962 <.*?>
< table.height() ) {
{
3963 <.*?>
< table.height() ) {
// The min width depends upon if we have a vertical scrollbar visible or not */
3964 <.*?>
< table.height() ) {
correction = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight ||
3965 <.*?>
< table.height() ) {
divBody.css('overflow-y') == "scroll")) ?
3966 <.*?>
< table.height() ) {
sanityWidth+barWidth :
3967 <.*?>
< table.height() ) {
sanityWidth;
3968  
3969 <.*?>
< table.height() ) {
// IE6/7 are a law unto themselves...
3970 <.*?>
< table.height() ) {
if ( ie67 && (divBodyEl.scrollHeight >
3971 <.*?>
< table.height() ) {
divBodyEl.offsetHeight || divBody.css('overflow-y') == "scroll")
3972 <.*?>
< table.height() ) {
) {
3973 <.*?>
< table.height() ) {
tableStyle.width = _fnStringToCss( correction-barWidth );
3974 <.*?>
< table.height() ) {
}
3975  
3976 <.*?>
< table.height() ) {
// And give the user a warning that we've stopped the table getting too small
3977 <.*?>
< table.height() ) {
if ( scrollX === "" || scrollXInner !== "" ) {
3978 <.*?>
< table.height() ) {
_fnLog( settings, 1, 'Possible column misalignment', 6 );
3979 <.*?>
< table.height() ) {
}
3980 <.*?>
< table.height() ) {
}
3981 <.*?>
< table.height() ) {
else
3982 <.*?>
< table.height() ) {
{
3983 <.*?>
< table.height() ) {
correction = '100%';
3984 <.*?>
< table.height() ) {
}
3985  
3986 <.*?>
< table.height() ) {
// Apply to the container elements
3987 <.*?>
< table.height() ) {
divBodyStyle.width = _fnStringToCss( correction );
3988 <.*?>
< table.height() ) {
divHeaderStyle.width = _fnStringToCss( correction );
3989  
3990 <.*?>
< table.height() ) {
if ( footer ) {
3991 <.*?>
< table.height() ) {
settings.nScrollFoot.style.width = _fnStringToCss( correction );
3992 <.*?>
< table.height() ) {
}
3993  
3994  
3995 <.*?>
< table.height() ) {
/*
3996 <.*?>
< table.height() ) {
* 4. Clean up
3997 <.*?>
< table.height() ) {
*/
3998 <.*?>
< table.height() ) {
if ( ! scrollY ) {
3999 <.*?>
< table.height() ) {
/* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
4000 <.*?>
< table.height() ) {
* the scrollbar height from the visible display, rather than adding it on. We need to
4001 <.*?>
< table.height() ) {
* set the height in order to sort this. Don't want to do it in any other browsers.
4002 <.*?>
< table.height() ) {
*/
4003 <.*?>
< table.height() ) {
if ( ie67 ) {
4004 <.*?>
< table.height() ) {
divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth );
4005 <.*?>
< table.height() ) {
}
4006 <.*?>
< table.height() ) {
}
4007  
4008 <.*?>
< table.height() ) {
if ( scrollY && scroll.bCollapse ) {
4009 <.*?>
< table.height() ) {
divBodyStyle.height = _fnStringToCss( scrollY );
4010  
4011 <.*?>
< table.height() ) {
var iExtra = (scrollX && tableEl.offsetWidth > divBodyEl.offsetWidth) ?
4012 <.*?>
< table.height() ) {
barWidth :
4013 <.*?>
< table.height() ) {
0;
4014  
4015 <.*?>
< table.height() ) {
if ( tableEl.offsetHeight < divBodyEl.offsetHeight ) {
4016 <.*?>
< table.height() ) {
divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+iExtra );
4017 <.*?>
< table.height() ) {
}
4018 <.*?>
< table.height() ) {
}
4019  
4020 <.*?>
< table.height() ) {
/* Finally set the width's of the header and footer tables */
4021 <.*?>
< table.height() ) {
var iOuterWidth = table.outerWidth();
4022 <.*?>
< table.height() ) {
divHeaderTable[0].style.width = _fnStringToCss( iOuterWidth );
4023 <.*?>
< table.height() ) {
divHeaderInnerStyle.width = _fnStringToCss( iOuterWidth );
4024  
4025 <.*?>
< table.height() ) {
// Figure out if there are scrollbar present - if so then we need a the header and footer to
4026 <.*?>
< table.height() ) {
// provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
4027 <.*?>
< table.height() ) {
var bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == "scroll";
4028 <.*?>
< table.height() ) {
var padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );
4029 <.*?>
< table.height() ) {
divHeaderInnerStyle[ padding ] = bScrolling ? barWidth+"px" : "0px";
4030  
4031 <.*?>
< table.height() ) {
if ( footer ) {
4032 <.*?>
< table.height() ) {
divFooterTable[0].style.width = _fnStringToCss( iOuterWidth );
4033 <.*?>
< table.height() ) {
divFooterInner[0].style.width = _fnStringToCss( iOuterWidth );
4034 <.*?>
< table.height() ) {
divFooterInner[0].style[padding] = bScrolling ? barWidth+"px" : "0px";
4035 <.*?>
< table.height() ) {
}
4036  
4037 <.*?>
< table.height() ) {
/* Adjust the position of the header in case we loose the y-scrollbar */
4038 <.*?>
< table.height() ) {
divBody.scroll();
4039  
4040 <.*?>
< table.height() ) {
// If sorting or filtering has occurred, jump the scrolling back to the top
4041 <.*?>
< table.height() ) {
// only if we aren't holding the position
4042 <.*?>
< table.height() ) {
if ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {
4043 <.*?>
< table.height() ) {
divBodyEl.scrollTop = 0;
4044 <.*?>
< table.height() ) {
}
4045 <.*?>
< table.height() ) {
}
4046  
4047  
4048  
4049 <.*?>
< table.height() ) {
/**
4050 <.*?>
< table.height() ) {
* Apply a given function to the display child nodes of an element array (typically
4051 <.*?>
< table.height() ) {
* TD children of TR rows
4052 <.*?>
< table.height() ) {
* @param {function} fn Method to apply to the objects
4053 <.*?>
< table.height() ) {
* @param array {nodes} an1 List of elements to look through for display children
4054 <.*?>
< table.height() ) {
* @param array {nodes} an2 Another list (identical structure to the first) - optional
4055 <.*?>
< table.height() ) {
* @memberof DataTable#oApi
4056 <.*?>
< table.height() ) {
*/
4057 <.*?>
< table.height() ) {
function _fnApplyToChildren( fn, an1, an2 )
4058 <.*?>
< table.height() ) {
{
4059 <.*?>
< table.height() ) {
var index=0, i=0, iLen=an1.length;
4060 <.*?>
< table.height() ) {
var nNode1, nNode2;
4061  
4062 <.*?>
< table.height() ) {
while ( i < iLen ) {
4063 <.*?>
< table.height() ) {
nNode1 = an1[i].firstChild;
4064 <.*?>
< table.height() ) {
nNode2 = an2 ? an2[i].firstChild : null;
4065  
4066 <.*?>
< table.height() ) {
while ( nNode1 ) {
4067 <.*?>
< table.height() ) {
if ( nNode1.nodeType === 1 ) {
4068 <.*?>
< table.height() ) {
if ( an2 ) {
4069 <.*?>
< table.height() ) {
fn( nNode1, nNode2, index );
4070 <.*?>
< table.height() ) {
}
4071 <.*?>
< table.height() ) {
else {
4072 <.*?>
< table.height() ) {
fn( nNode1, index );
4073 <.*?>
< table.height() ) {
}
4074  
4075 <.*?>
< table.height() ) {
index++;
4076 <.*?>
< table.height() ) {
}
4077  
4078 <.*?>
< table.height() ) {
nNode1 = nNode1.nextSibling;
4079 <.*?>
< table.height() ) {
nNode2 = an2 ? nNode2.nextSibling : null;
4080 <.*?>
< table.height() ) {
}
4081  
4082 <.*?>
< table.height() ) {
i++;
4083 <.*?>
< table.height() ) {
}
4084 <.*?>
< table.height() ) {
}
4085  
4086  
4087  
4088 <.*?>
< table.height() ) {
var __re_html_remove = /<.*?>/g;
4089  
4090  
4091 <.*?>
< table.height() ) {
<.*?> /**
4092 <.*?>
< table.height() ) {
<.*?> * Calculate the width of columns for the table
4093 <.*?>
< table.height() ) {
<.*?> * @param {object} oSettings dataTables settings object
4094 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4095 <.*?>
< table.height() ) {
<.*?> */
4096 <.*?>
< table.height() ) {
<.*?> function _fnCalculateColumnWidths ( oSettings )
4097 <.*?>
< table.height() ) {
<.*?> {
4098 <.*?>
< table.height() ) {
<.*?> var
4099 <.*?>
< table.height() ) {
<.*?> table = oSettings.nTable,
4100 <.*?>
< table.height() ) {
<.*?> columns = oSettings.aoColumns,
4101 <.*?>
< table.height() ) {
<.*?> scroll = oSettings.oScroll,
4102 <.*?>
< table.height() ) {
<.*?> scrollY = scroll.sY,
4103 <.*?>
< table.height() ) {
<.*?> scrollX = scroll.sX,
4104 <.*?>
< table.height() ) {
<.*?> scrollXInner = scroll.sXInner,
4105 <.*?>
< table.height() ) {
<.*?> columnCount = columns.length,
4106 <.*?>
< table.height() ) {
<.*?> visibleColumns = _fnGetColumns( oSettings, 'bVisible' ),
4107 <.*?>
< table.height() ) {
<.*?> headerCells = $('th', oSettings.nTHead),
4108 <.*?>
< table.height() ) {
<.*?> tableWidthAttr = table.getAttribute('width'), // from DOM element
4109 <.*?>
< table.height() ) {
<.*?> tableContainer = table.parentNode,
4110 <.*?>
< table.height() ) {
<.*?> userInputs = false,
4111 <.*?>
< table.height() ) {
<.*?> i, column, columnIdx, width, outerWidth;
4112  
4113 <.*?>
< table.height() ) {
<.*?> var styleWidth = table.style.width;
4114 <.*?>
< table.height() ) {
<.*?> if ( styleWidth && styleWidth.indexOf('%') !== -1 ) {
4115 <.*?>
< table.height() ) {
<.*?> tableWidthAttr = styleWidth;
4116 <.*?>
< table.height() ) {
<.*?> }
4117  
4118 <.*?>
< table.height() ) {
<.*?> /* Convert any user input sizes into pixel sizes */
4119 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<visibleColumns.length ; i++ ) {
4120 <.*?>
< table.height() ) {
<.*?> column = columns[ visibleColumns[i] ];
4121  
4122 <.*?>
< table.height() ) {
<.*?> if ( column.sWidth !== null ) {
4123 <.*?>
< table.height() ) {
<.*?> column.sWidth = _fnConvertToWidth( column.sWidthOrig, tableContainer );
4124  
4125 <.*?>
< table.height() ) {
<.*?> userInputs = true;
4126 <.*?>
< table.height() ) {
<.*?> }
4127 <.*?>
< table.height() ) {
<.*?> }
4128  
4129 <.*?>
< table.height() ) {
<.*?> /* If the number of columns in the DOM equals the number that we have to
4130 <.*?>
< table.height() ) {
<.*?> * process in DataTables, then we can use the offsets that are created by
4131 <.*?>
< table.height() ) {
<.*?> * the web- browser. No custom sizes can be set in order for this to happen,
4132 <.*?>
< table.height() ) {
<.*?> * nor scrolling used
4133 <.*?>
< table.height() ) {
<.*?> */
4134 <.*?>
< table.height() ) {
<.*?> if ( ! userInputs && ! scrollX && ! scrollY &&
4135 <.*?>
< table.height() ) {
<.*?> columnCount == _fnVisbleColumns( oSettings ) &&
4136 <.*?>
< table.height() ) {
<.*?> columnCount == headerCells.length
4137 <.*?>
< table.height() ) {
<.*?> ) {
4138 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<columnCount ; i++ ) {
4139 <.*?>
< table.height() ) {
<.*?> columns[i].sWidth = _fnStringToCss( headerCells.eq(i).width() );
4140 <.*?>
< table.height() ) {
<.*?> }
4141 <.*?>
< table.height() ) {
<.*?> }
4142 <.*?>
< table.height() ) {
<.*?> else
4143 <.*?>
< table.height() ) {
<.*?> {
4144 <.*?>
< table.height() ) {
<.*?> // Otherwise construct a single row, worst case, table with the widest
4145 <.*?>
< table.height() ) {
<.*?> // node in the data, assign any user defined widths, then insert it into
4146 <.*?>
< table.height() ) {
<.*?> // the DOM and allow the browser to do all the hard work of calculating
4147 <.*?>
< table.height() ) {
<.*?> // table widths
4148 <.*?>
< table.height() ) {
<.*?> var tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table
4149 <.*?>
< table.height() ) {
<.*?> .css( 'visibility', 'hidden' )
4150 <.*?>
< table.height() ) {
<.*?> .removeAttr( 'id' );
4151  
4152 <.*?>
< table.height() ) {
<.*?> // Clean up the table body
4153 <.*?>
< table.height() ) {
<.*?> tmpTable.find('tbody tr').remove();
4154 <.*?>
< table.height() ) {
<.*?> var tr = $('<tr/>').appendTo( tmpTable.find('tbody') );
4155  
4156 <.*?>
< table.height() ) {
<.*?> // Remove any assigned widths from the footer (from scrolling)
4157 <.*?>
< table.height() ) {
<.*?> tmpTable.find('tfoot th, tfoot td').css('width', '');
4158  
4159 <.*?>
< table.height() ) {
<.*?> // Apply custom sizing to the cloned header
4160 <.*?>
< table.height() ) {
<.*?> headerCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] );
4161  
4162 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<visibleColumns.length ; i++ ) {
4163 <.*?>
< table.height() ) {
<.*?> column = columns[ visibleColumns[i] ];
4164  
4165 <.*?>
< table.height() ) {
<.*?> headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
4166 <.*?>
< table.height() ) {
<.*?> _fnStringToCss( column.sWidthOrig ) :
4167 <.*?>
< table.height() ) {
<.*?> '';
4168 <.*?>
< table.height() ) {
<.*?> }
4169  
4170 <.*?>
< table.height() ) {
<.*?> // Find the widest cell for each column and put it into the table
4171 <.*?>
< table.height() ) {
<.*?> if ( oSettings.aoData.length ) {
4172 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<visibleColumns.length ; i++ ) {
4173 <.*?>
< table.height() ) {
<.*?> columnIdx = visibleColumns[i];
4174 <.*?>
< table.height() ) {
<.*?> column = columns[ columnIdx ];
4175  
4176 <.*?>
< table.height() ) {
<.*?> $( _fnGetWidestNode( oSettings, columnIdx ) )
4177 <.*?>
< table.height() ) {
<.*?> .clone( false )
4178 <.*?>
< table.height() ) {
<.*?> .append( column.sContentPadding )
4179 <.*?>
< table.height() ) {
<.*?> .appendTo( tr );
4180 <.*?>
< table.height() ) {
<.*?> }
4181 <.*?>
< table.height() ) {
<.*?> }
4182  
4183 <.*?>
< table.height() ) {
<.*?> // Table has been built, attach to the document so we can work with it
4184 <.*?>
< table.height() ) {
<.*?> tmpTable.appendTo( tableContainer );
4185  
4186 <.*?>
< table.height() ) {
<.*?> // When scrolling (X or Y) we want to set the width of the table as
4187 <.*?>
< table.height() ) {
<.*?> // appropriate. However, when not scrolling leave the table width as it
4188 <.*?>
< table.height() ) {
<.*?> // is. This results in slightly different, but I think correct behaviour
4189 <.*?>
< table.height() ) {
<.*?> if ( scrollX && scrollXInner ) {
4190 <.*?>
< table.height() ) {
<.*?> tmpTable.width( scrollXInner );
4191 <.*?>
< table.height() ) {
<.*?> }
4192 <.*?>
< table.height() ) {
<.*?> else if ( scrollX ) {
4193 <.*?>
< table.height() ) {
<.*?> tmpTable.css( 'width', 'auto' );
4194  
4195 <.*?>
< table.height() ) {
<.*?> if ( tmpTable.width() < tableContainer.offsetWidth ) {
4196 <.*?>
< table.height() ) {
<.*?> tmpTable.width( tableContainer.offsetWidth );
4197 <.*?>
< table.height() ) {
<.*?> }
4198 <.*?>
< table.height() ) {
<.*?> }
4199 <.*?>
< table.height() ) {
<.*?> else if ( scrollY ) {
4200 <.*?>
< table.height() ) {
<.*?> tmpTable.width( tableContainer.offsetWidth );
4201 <.*?>
< table.height() ) {
<.*?> }
4202 <.*?>
< table.height() ) {
<.*?> else if ( tableWidthAttr ) {
4203 <.*?>
< table.height() ) {
<.*?> tmpTable.width( tableWidthAttr );
4204 <.*?>
< table.height() ) {
<.*?> }
4205  
4206 <.*?>
< table.height() ) {
<.*?> // Take into account the y scrollbar
4207 <.*?>
< table.height() ) {
<.*?> _fnScrollingWidthAdjust( oSettings, tmpTable[0] );
4208  
4209 <.*?>
< table.height() ) {
<.*?> // Browsers need a bit of a hand when a width is assigned to any columns
4210 <.*?>
< table.height() ) {
<.*?> // when x-scrolling as they tend to collapse the table to the min-width,
4211 <.*?>
< table.height() ) {
<.*?> // even if we sent the column widths. So we need to keep track of what
4212 <.*?>
< table.height() ) {
<.*?> // the table width should be by summing the user given values, and the
4213 <.*?>
< table.height() ) {
<.*?> // automatic values
4214 <.*?>
< table.height() ) {
<.*?> if ( scrollX )
4215 <.*?>
< table.height() ) {
<.*?> {
4216 <.*?>
< table.height() ) {
<.*?> var total = 0;
4217  
4218 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<visibleColumns.length ; i++ ) {
4219 <.*?>
< table.height() ) {
<.*?> column = columns[ visibleColumns[i] ];
4220 <.*?>
< table.height() ) {
<.*?> outerWidth = $(headerCells[i]).outerWidth();
4221  
4222 <.*?>
< table.height() ) {
<.*?> total += column.sWidthOrig === null ?
4223 <.*?>
< table.height() ) {
<.*?> outerWidth :
4224 <.*?>
< table.height() ) {
<.*?> parseInt( column.sWidth, 10 ) + outerWidth - $(headerCells[i]).width();
4225 <.*?>
< table.height() ) {
<.*?> }
4226  
4227 <.*?>
< table.height() ) {
<.*?> tmpTable.width( _fnStringToCss( total ) );
4228 <.*?>
< table.height() ) {
<.*?> table.style.width = _fnStringToCss( total );
4229 <.*?>
< table.height() ) {
<.*?> }
4230  
4231 <.*?>
< table.height() ) {
<.*?> // Get the width of each column in the constructed table
4232 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<visibleColumns.length ; i++ ) {
4233 <.*?>
< table.height() ) {
<.*?> column = columns[ visibleColumns[i] ];
4234 <.*?>
< table.height() ) {
<.*?> width = $(headerCells[i]).width();
4235  
4236 <.*?>
< table.height() ) {
<.*?> if ( width ) {
4237 <.*?>
< table.height() ) {
<.*?> column.sWidth = _fnStringToCss( width );
4238 <.*?>
< table.height() ) {
<.*?> }
4239 <.*?>
< table.height() ) {
<.*?> }
4240  
4241 <.*?>
< table.height() ) {
<.*?> table.style.width = _fnStringToCss( tmpTable.css('width') );
4242  
4243 <.*?>
< table.height() ) {
<.*?> // Finished with the table - ditch it
4244 <.*?>
< table.height() ) {
<.*?> tmpTable.remove();
4245 <.*?>
< table.height() ) {
<.*?> }
4246  
4247 <.*?>
< table.height() ) {
<.*?> // If there is a width attr, we want to attach an event listener which
4248 <.*?>
< table.height() ) {
<.*?> // allows the table sizing to automatically adjust when the window is
4249 <.*?>
< table.height() ) {
<.*?> // resized. Use the width attr rather than CSS, since we can't know if the
4250 <.*?>
< table.height() ) {
<.*?> // CSS is a relative value or absolute - DOM read is always px.
4251 <.*?>
< table.height() ) {
<.*?> if ( tableWidthAttr ) {
4252 <.*?>
< table.height() ) {
<.*?> table.style.width = _fnStringToCss( tableWidthAttr );
4253 <.*?>
< table.height() ) {
<.*?> }
4254  
4255 <.*?>
< table.height() ) {
<.*?> if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {
4256 <.*?>
< table.height() ) {
<.*?> var bindResize = function () {
4257 <.*?>
< table.height() ) {
<.*?> $(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
4258 <.*?>
< table.height() ) {
<.*?> _fnAdjustColumnSizing( oSettings );
4259 <.*?>
< table.height() ) {
<.*?> } ) );
4260 <.*?>
< table.height() ) {
<.*?> };
4261  
4262 <.*?>
< table.height() ) {
<.*?> // IE6/7 will crash if we bind a resize event handler on page load.
4263 <.*?>
< table.height() ) {
<.*?> // To be removed in 1.11 which drops IE6/7 support
4264 <.*?>
< table.height() ) {
<.*?> if ( oSettings.oBrowser.bScrollOversize ) {
4265 <.*?>
< table.height() ) {
<.*?> setTimeout( bindResize, 1000 );
4266 <.*?>
< table.height() ) {
<.*?> }
4267 <.*?>
< table.height() ) {
<.*?> else {
4268 <.*?>
< table.height() ) {
<.*?> bindResize();
4269 <.*?>
< table.height() ) {
<.*?> }
4270  
4271 <.*?>
< table.height() ) {
<.*?> oSettings._reszEvt = true;
4272 <.*?>
< table.height() ) {
<.*?> }
4273 <.*?>
< table.height() ) {
<.*?> }
4274  
4275  
4276 <.*?>
< table.height() ) {
<.*?> /**
4277 <.*?>
< table.height() ) {
<.*?> * Throttle the calls to a function. Arguments and context are maintained for
4278 <.*?>
< table.height() ) {
<.*?> * the throttled function
4279 <.*?>
< table.height() ) {
<.*?> * @param {function} fn Function to be called
4280 <.*?>
< table.height() ) {
<.*?> * @param {int} [freq=200] call frequency in mS
4281 <.*?>
< table.height() ) {
<.*?> * @returns {function} wrapped function
4282 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4283 <.*?>
< table.height() ) {
<.*?> */
4284 <.*?>
< table.height() ) {
<.*?> function _fnThrottle( fn, freq ) {
4285 <.*?>
< table.height() ) {
<.*?> var
4286 <.*?>
< table.height() ) {
<.*?> frequency = freq !== undefined ? freq : 200,
4287 <.*?>
< table.height() ) {
<.*?> last,
4288 <.*?>
< table.height() ) {
<.*?> timer;
4289  
4290 <.*?>
< table.height() ) {
<.*?> return function () {
4291 <.*?>
< table.height() ) {
<.*?> var
4292 <.*?>
< table.height() ) {
<.*?> that = this,
4293 <.*?>
< table.height() ) {
<.*?> now = +new Date(),
4294 <.*?>
< table.height() ) {
<.*?> args = arguments;
4295  
4296 <.*?>
< table.height() ) {
<.*?> if ( last && now < last + frequency ) {
4297 <.*?>
< table.height() ) {
<.*?> clearTimeout( timer );
4298  
4299 <.*?>
< table.height() ) {
<.*?> timer = setTimeout( function () {
4300 <.*?>
< table.height() ) {
<.*?> last = undefined;
4301 <.*?>
< table.height() ) {
<.*?> fn.apply( that, args );
4302 <.*?>
< table.height() ) {
<.*?> }, frequency );
4303 <.*?>
< table.height() ) {
<.*?> }
4304 <.*?>
< table.height() ) {
<.*?> else {
4305 <.*?>
< table.height() ) {
<.*?> last = now;
4306 <.*?>
< table.height() ) {
<.*?> fn.apply( that, args );
4307 <.*?>
< table.height() ) {
<.*?> }
4308 <.*?>
< table.height() ) {
<.*?> };
4309 <.*?>
< table.height() ) {
<.*?> }
4310  
4311  
4312 <.*?>
< table.height() ) {
<.*?> /**
4313 <.*?>
< table.height() ) {
<.*?> * Convert a CSS unit width to pixels (e.g. 2em)
4314 <.*?>
< table.height() ) {
<.*?> * @param {string} width width to be converted
4315 <.*?>
< table.height() ) {
<.*?> * @param {node} parent parent to get the with for (required for relative widths) - optional
4316 <.*?>
< table.height() ) {
<.*?> * @returns {int} width in pixels
4317 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4318 <.*?>
< table.height() ) {
<.*?> */
4319 <.*?>
< table.height() ) {
<.*?> function _fnConvertToWidth ( width, parent )
4320 <.*?>
< table.height() ) {
<.*?> {
4321 <.*?>
< table.height() ) {
<.*?> if ( ! width ) {
4322 <.*?>
< table.height() ) {
<.*?> return 0;
4323 <.*?>
< table.height() ) {
<.*?> }
4324  
4325 <.*?>
< table.height() ) {
<.*?> var n = $('<div/>')
4326 <.*?>
< table.height() ) {
<.*?> .css( 'width', _fnStringToCss( width ) )
4327 <.*?>
< table.height() ) {
<.*?> .appendTo( parent || document.body );
4328  
4329 <.*?>
< table.height() ) {
<.*?> var val = n[0].offsetWidth;
4330 <.*?>
< table.height() ) {
<.*?> n.remove();
4331  
4332 <.*?>
< table.height() ) {
<.*?> return val;
4333 <.*?>
< table.height() ) {
<.*?> }
4334  
4335  
4336 <.*?>
< table.height() ) {
<.*?> /**
4337 <.*?>
< table.height() ) {
<.*?> * Adjust a table's width to take account of vertical scroll bar
4338 <.*?>
< table.height() ) {
<.*?> * @param {object} oSettings dataTables settings object
4339 <.*?>
< table.height() ) {
<.*?> * @param {node} n table node
4340 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4341 <.*?>
< table.height() ) {
<.*?> */
4342  
4343 <.*?>
< table.height() ) {
<.*?> function _fnScrollingWidthAdjust ( settings, n )
4344 <.*?>
< table.height() ) {
<.*?> {
4345 <.*?>
< table.height() ) {
<.*?> var scroll = settings.oScroll;
4346  
4347 <.*?>
< table.height() ) {
<.*?> if ( scroll.sX || scroll.sY ) {
4348 <.*?>
< table.height() ) {
<.*?> // When y-scrolling only, we want to remove the width of the scroll bar
4349 <.*?>
< table.height() ) {
<.*?> // so the table + scroll bar will fit into the area available, otherwise
4350 <.*?>
< table.height() ) {
<.*?> // we fix the table at its current size with no adjustment
4351 <.*?>
< table.height() ) {
<.*?> var correction = ! scroll.sX ? scroll.iBarWidth : 0;
4352 <.*?>
< table.height() ) {
<.*?> n.style.width = _fnStringToCss( $(n).outerWidth() - correction );
4353 <.*?>
< table.height() ) {
<.*?> }
4354 <.*?>
< table.height() ) {
<.*?> }
4355  
4356  
4357 <.*?>
< table.height() ) {
<.*?> /**
4358 <.*?>
< table.height() ) {
<.*?> * Get the widest node
4359 <.*?>
< table.height() ) {
<.*?> * @param {object} settings dataTables settings object
4360 <.*?>
< table.height() ) {
<.*?> * @param {int} colIdx column of interest
4361 <.*?>
< table.height() ) {
<.*?> * @returns {node} widest table node
4362 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4363 <.*?>
< table.height() ) {
<.*?> */
4364 <.*?>
< table.height() ) {
<.*?> function _fnGetWidestNode( settings, colIdx )
4365 <.*?>
< table.height() ) {
<.*?> {
4366 <.*?>
< table.height() ) {
<.*?> var idx = _fnGetMaxLenString( settings, colIdx );
4367 <.*?>
< table.height() ) {
<.*?> if ( idx < 0 ) {
4368 <.*?>
< table.height() ) {
<.*?> return null;
4369 <.*?>
< table.height() ) {
<.*?> }
4370  
4371 <.*?>
< table.height() ) {
<.*?> var data = settings.aoData[ idx ];
4372 <.*?>
< table.height() ) {
<.*?> return ! data.nTr ? // Might not have been created when deferred rendering
4373 <.*?>
< table.height() ) {
<.*?> $('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] :
4374 <.*?>
< table.height() ) {
<.*?> data.anCells[ colIdx ];
4375 <.*?>
< table.height() ) {
<.*?> }
4376  
4377  
4378 <.*?>
< table.height() ) {
<.*?> /**
4379 <.*?>
< table.height() ) {
<.*?> * Get the maximum strlen for each data column
4380 <.*?>
< table.height() ) {
<.*?> * @param {object} settings dataTables settings object
4381 <.*?>
< table.height() ) {
<.*?> * @param {int} colIdx column of interest
4382 <.*?>
< table.height() ) {
<.*?> * @returns {string} max string length for each column
4383 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4384 <.*?>
< table.height() ) {
<.*?> */
4385 <.*?>
< table.height() ) {
<.*?> function _fnGetMaxLenString( settings, colIdx )
4386 <.*?>
< table.height() ) {
<.*?> {
4387 <.*?>
< table.height() ) {
<.*?> var s, max=-1, maxIdx = -1;
4388  
4389 <.*?>
< table.height() ) {
<.*?> for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
4390 <.*?>
< table.height() ) {
<.*?> s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
4391 <.*?>
< table.height() ) {
<.*?> s = s.replace( __re_html_remove, '' );
4392  
4393 <.*?>
< table.height() ) {
<.*?> if ( s.length > max ) {
4394 <.*?>
< table.height() ) {
<.*?> max = s.length;
4395 <.*?>
< table.height() ) {
<.*?> maxIdx = i;
4396 <.*?>
< table.height() ) {
<.*?> }
4397 <.*?>
< table.height() ) {
<.*?> }
4398  
4399 <.*?>
< table.height() ) {
<.*?> return maxIdx;
4400 <.*?>
< table.height() ) {
<.*?> }
4401  
4402  
4403 <.*?>
< table.height() ) {
<.*?> /**
4404 <.*?>
< table.height() ) {
<.*?> * Append a CSS unit (only if required) to a string
4405 <.*?>
< table.height() ) {
<.*?> * @param {string} value to css-ify
4406 <.*?>
< table.height() ) {
<.*?> * @returns {string} value with css unit
4407 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4408 <.*?>
< table.height() ) {
<.*?> */
4409 <.*?>
< table.height() ) {
<.*?> function _fnStringToCss( s )
4410 <.*?>
< table.height() ) {
<.*?> {
4411 <.*?>
< table.height() ) {
<.*?> if ( s === null ) {
4412 <.*?>
< table.height() ) {
<.*?> return '0px';
4413 <.*?>
< table.height() ) {
<.*?> }
4414  
4415 <.*?>
< table.height() ) {
<.*?> if ( typeof s == 'number' ) {
4416 <.*?>
< table.height() ) {
<.*?> return s < 0 ?
4417 <.*?>
< table.height() ) {
<.*?> '0px' :
4418 <.*?>
< table.height() ) {
<.*?> s+'px';
4419 <.*?>
< table.height() ) {
<.*?> }
4420  
4421 <.*?>
< table.height() ) {
<.*?> // Check it has a unit character already
4422 <.*?>
< table.height() ) {
<.*?> return s.match(/\d$/) ?
4423 <.*?>
< table.height() ) {
<.*?> s+'px' :
4424 <.*?>
< table.height() ) {
<.*?> s;
4425 <.*?>
< table.height() ) {
<.*?> }
4426  
4427  
4428 <.*?>
< table.height() ) {
<.*?> /**
4429 <.*?>
< table.height() ) {
<.*?> * Get the width of a scroll bar in this browser being used
4430 <.*?>
< table.height() ) {
<.*?> * @returns {int} width in pixels
4431 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4432 <.*?>
< table.height() ) {
<.*?> */
4433 <.*?>
< table.height() ) {
<.*?> function _fnScrollBarWidth ()
4434 <.*?>
< table.height() ) {
<.*?> {
4435 <.*?>
< table.height() ) {
<.*?> // On first run a static variable is set, since this is only needed once.
4436 <.*?>
< table.height() ) {
<.*?> // Subsequent runs will just use the previously calculated value
4437 <.*?>
< table.height() ) {
<.*?> var width = DataTable.__scrollbarWidth;
4438  
4439 <.*?>
< table.height() ) {
<.*?> if ( width === undefined ) {
4440 <.*?>
< table.height() ) {
<.*?> var sizer = $('<p/>').css( {
4441 <.*?>
< table.height() ) {
<.*?> position: 'absolute',
4442 <.*?>
< table.height() ) {
<.*?> top: 0,
4443 <.*?>
< table.height() ) {
<.*?> left: 0,
4444 <.*?>
< table.height() ) {
<.*?> width: '100%',
4445 <.*?>
< table.height() ) {
<.*?> height: 150,
4446 <.*?>
< table.height() ) {
<.*?> padding: 0,
4447 <.*?>
< table.height() ) {
<.*?> overflow: 'scroll',
4448 <.*?>
< table.height() ) {
<.*?> visibility: 'hidden'
4449 <.*?>
< table.height() ) {
<.*?> } )
4450 <.*?>
< table.height() ) {
<.*?> .appendTo('body');
4451  
4452 <.*?>
< table.height() ) {
<.*?> width = sizer[0].offsetWidth - sizer[0].clientWidth;
4453 <.*?>
< table.height() ) {
<.*?> DataTable.__scrollbarWidth = width;
4454  
4455 <.*?>
< table.height() ) {
<.*?> sizer.remove();
4456 <.*?>
< table.height() ) {
<.*?> }
4457  
4458 <.*?>
< table.height() ) {
<.*?> return width;
4459 <.*?>
< table.height() ) {
<.*?> }
4460  
4461  
4462  
4463 <.*?>
< table.height() ) {
<.*?> function _fnSortFlatten ( settings )
4464 <.*?>
< table.height() ) {
<.*?> {
4465 <.*?>
< table.height() ) {
<.*?> var
4466 <.*?>
< table.height() ) {
<.*?> i, iLen, k, kLen,
4467 <.*?>
< table.height() ) {
<.*?> aSort = [],
4468 <.*?>
< table.height() ) {
<.*?> aiOrig = [],
4469 <.*?>
< table.height() ) {
<.*?> aoColumns = settings.aoColumns,
4470 <.*?>
< table.height() ) {
<.*?> aDataSort, iCol, sType, srcCol,
4471 <.*?>
< table.height() ) {
<.*?> fixed = settings.aaSortingFixed,
4472 <.*?>
< table.height() ) {
<.*?> fixedObj = $.isPlainObject( fixed ),
4473 <.*?>
< table.height() ) {
<.*?> nestedSort = [],
4474 <.*?>
< table.height() ) {
<.*?> add = function ( a ) {
4475 <.*?>
< table.height() ) {
<.*?> if ( a.length && ! $.isArray( a[0] ) ) {
4476 <.*?>
< table.height() ) {
<.*?> // 1D array
4477 <.*?>
< table.height() ) {
<.*?> nestedSort.push( a );
4478 <.*?>
< table.height() ) {
<.*?> }
4479 <.*?>
< table.height() ) {
<.*?> else {
4480 <.*?>
< table.height() ) {
<.*?> // 2D array
4481 <.*?>
< table.height() ) {
<.*?> nestedSort.push.apply( nestedSort, a );
4482 <.*?>
< table.height() ) {
<.*?> }
4483 <.*?>
< table.height() ) {
<.*?> };
4484  
4485 <.*?>
< table.height() ) {
<.*?> // Build the sort array, with pre-fix and post-fix options if they have been
4486 <.*?>
< table.height() ) {
<.*?> // specified
4487 <.*?>
< table.height() ) {
<.*?> if ( $.isArray( fixed ) ) {
4488 <.*?>
< table.height() ) {
<.*?> add( fixed );
4489 <.*?>
< table.height() ) {
<.*?> }
4490  
4491 <.*?>
< table.height() ) {
<.*?> if ( fixedObj && fixed.pre ) {
4492 <.*?>
< table.height() ) {
<.*?> add( fixed.pre );
4493 <.*?>
< table.height() ) {
<.*?> }
4494  
4495 <.*?>
< table.height() ) {
<.*?> add( settings.aaSorting );
4496  
4497 <.*?>
< table.height() ) {
<.*?> if (fixedObj && fixed.post ) {
4498 <.*?>
< table.height() ) {
<.*?> add( fixed.post );
4499 <.*?>
< table.height() ) {
<.*?> }
4500  
4501 <.*?>
< table.height() ) {
<.*?> for ( i=0 ; i<nestedSort.length ; i++ )
4502 <.*?>
< table.height() ) {
<.*?> {
4503 <.*?>
< table.height() ) {
<.*?> srcCol = nestedSort[i][0];
4504 <.*?>
< table.height() ) {
<.*?> aDataSort = aoColumns[ srcCol ].aDataSort;
4505  
4506 <.*?>
< table.height() ) {
<.*?> for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
4507 <.*?>
< table.height() ) {
<.*?> {
4508 <.*?>
< table.height() ) {
<.*?> iCol = aDataSort[k];
4509 <.*?>
< table.height() ) {
<.*?> sType = aoColumns[ iCol ].sType || 'string';
4510  
4511 <.*?>
< table.height() ) {
<.*?> if ( nestedSort[i]._idx === undefined ) {
4512 <.*?>
< table.height() ) {
<.*?> nestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting );
4513 <.*?>
< table.height() ) {
<.*?> }
4514  
4515 <.*?>
< table.height() ) {
<.*?> aSort.push( {
4516 <.*?>
< table.height() ) {
<.*?> src: srcCol,
4517 <.*?>
< table.height() ) {
<.*?> col: iCol,
4518 <.*?>
< table.height() ) {
<.*?> dir: nestedSort[i][1],
4519 <.*?>
< table.height() ) {
<.*?> index: nestedSort[i]._idx,
4520 <.*?>
< table.height() ) {
<.*?> type: sType,
4521 <.*?>
< table.height() ) {
<.*?> formatter: DataTable.ext.type.order[ sType+"-pre" ]
4522 <.*?>
< table.height() ) {
<.*?> } );
4523 <.*?>
< table.height() ) {
<.*?> }
4524 <.*?>
< table.height() ) {
<.*?> }
4525  
4526 <.*?>
< table.height() ) {
<.*?> return aSort;
4527 <.*?>
< table.height() ) {
<.*?> }
4528  
4529 <.*?>
< table.height() ) {
<.*?> /**
4530 <.*?>
< table.height() ) {
<.*?> * Change the order of the table
4531 <.*?>
< table.height() ) {
<.*?> * @param {object} oSettings dataTables settings object
4532 <.*?>
< table.height() ) {
<.*?> * @memberof DataTable#oApi
4533 <.*?>
< table.height() ) {
<.*?> * @todo This really needs split up!
4534 <.*?>
< table.height() ) {
<.*?> */
4535 <.*?>
< table.height() ) {
<.*?> function _fnSort ( oSettings )
4536 <.*?>
< table.height() ) {
<.*?> {
4537 <.*?>
< table.height() ) {
<.*?> var
4538 <.*?>
< table.height() ) {
<.*?> i, ien, iLen, j, jLen, k, kLen,
4539 <.*?>
< table.height() ) {
<.*?> sDataType, nTh,
4540 <.*?>
< table.height() ) {
<.*?> aiOrig = [],
4541 <.*?>
< table.height() ) {
<.*?> oExtSort = DataTable.ext.type.order,
4542 <.*?>
< table.height() ) {
<.*?> aoData = oSettings.aoData,
4543 <.*?>
< table.height() ) {
<.*?> aoColumns = oSettings.aoColumns,
4544 <.*?>
< table.height() ) {
<.*?> aDataSort, data, iCol, sType, oSort,
4545 <.*?>
< table.height() ) {
<.*?> formatters = 0,
4546 <.*?>
< table.height() ) {
<.*?> sortCol,
4547 <.*?>
< table.height() ) {
<.*?> displayMaster = oSettings.aiDisplayMaster,
4548 <.*?>
< table.height() ) {
<.*?> aSort;
4549  
4550 <.*?>
< table.height() ) {
<.*?> // Resolve any column types that are unknown due to addition or invalidation
4551 <.*?>
< table.height() ) {
<.*?> // @todo Can this be moved into a 'data-ready' handler which is called when
4552 <.*?>
< table.height() ) {
<.*?> // data is going to be used in the table?
4553 <.*?>
< table.height() ) {
<.*?> _fnColumnTypes( oSettings );
4554  
4555 <.*?>
< table.height() ) {
<.*?> aSort = _fnSortFlatten( oSettings );
4556  
4557 <.*?>
< table.height() ) {
<.*?> for ( i=0, ien=aSort.length ; i<ien ; i++ ) {
4558 <.*?>
< table.height() ) {
<.*?> sortCol = aSort[i];
4559  
4560 <.*?>
< table.height() ) {
<.*?> // Track if we can use the fast sort algorithm
4561 <.*?>
< table.height() ) {
<.*?> if ( sortCol.formatter ) {
4562 <.*?>
< table.height() ) {
<.*?> formatters++;
4563 <.*?>
< table.height() ) {
<.*?> }
4564  
4565 <.*?>
< table.height() ) {
<.*?> // Load the data needed for the sort, for each cell
4566 <.*?>
< table.height() ) {
<.*?> _fnSortData( oSettings, sortCol.col );
4567 <.*?>
< table.height() ) {
<.*?> }
4568  
4569 <.*?>
< table.height() ) {
<.*?> /* No sorting required if server-side or no sorting array */
4570 <.*?>
< table.height() ) {
<.*?> if ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )
4571 <.*?>
< table.height() ) {
<.*?> {
4572 <.*?>
< table.height() ) {
<.*?> // Create a value - key array of the current row positions such that we can use their
4573 <.*?>
< table.height() ) {
<.*?> // current position during the sort, if values match, in order to perform stable sorting
4574 <.*?>
< table.height() ) {
<.*?> for ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {
4575 <.*?>
< table.height() ) {
<.*?> aiOrig[ displayMaster[i] ] = i;
4576 <.*?>
< table.height() ) {
<.*?> }
4577  
4578 <.*?>
< table.height() ) {
<.*?> /* Do the sort - here we want multi-column sorting based on a given data source (column)
4579 <.*?>
< table.height() ) {
<.*?> * and sorting function (from oSort) in a certain direction. It's reasonably complex to
4580 <.*?>
< table.height() ) {
<.*?> * follow on it's own, but this is what we want (example two column sorting):
4581 <.*?>
< table.height() ) {
<.*?> * fnLocalSorting = function(a,b){
4582 <.*?>
< table.height() ) {
<.*?> * var iTest;
4583 <.*?>
< table.height() ) {
<.*?> * iTest = oSort['string-asc']('data11', 'data12');
4584 <.*?>
< table.height() ) {
<.*?> * if (iTest !== 0)
4585 <.*?>
< table.height() ) {
<.*?> * return iTest;
4586 <.*?>
< table.height() ) {
<.*?> * iTest = oSort['numeric-desc']('data21', 'data22');
4587 <.*?>
< table.height() ) {
<.*?> * if (iTest !== 0)
4588 <.*?>
< table.height() ) {
<.*?> * return iTest;
4589 <.*?>
< table.height() ) {
<.*?> * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
4590 <.*?>
< table.height() ) {
<.*?> * }
4591 <.*?>
< table.height() ) {
<.*?> * Basically we have a test for each sorting column, if the data in that column is equal,
4592 <.*?>
< table.height() ) {
<.*?> * test the next column. If all columns match, then we use a numeric sort on the row
4593 <.*?>
< table.height() ) {
<.*?> * positions in the original data array to provide a stable sort.
4594 <.*?>
< table.height() ) {
<.*?> *
4595 <.*?>
< table.height() ) {
<.*?> * Note - I know it seems excessive to have two sorting methods, but the first is around
4596 <.*?>
< table.height() ) {
<.*?> * 15% faster, so the second is only maintained for backwards compatibility with sorting
4597 <.*?>
< table.height() ) {
<.*?> * methods which do not have a pre-sort formatting function.
4598 <.*?>
< table.height() ) {
<.*?> */
4599 <.*?>
< table.height() ) {
<.*?> if ( formatters === aSort.length ) {
4600 <.*?>
< table.height() ) {
<.*?> // All sort types have formatting functions
4601 <.*?>
< table.height() ) {
<.*?> displayMaster.sort( function ( a, b ) {
4602 <.*?>
< table.height() ) {
<.*?> var
4603 <.*?>
< table.height() ) {
<.*?> x, y, k, test, sort,
4604 <.*?>
< table.height() ) {
<.*?> len=aSort.length,
4605 <.*?>
< table.height() ) {
<.*?> dataA = aoData[a]._aSortData,
4606 <.*?>
< table.height() ) {
<.*?> dataB = aoData[b]._aSortData;
4607  
4608 <.*?>
< table.height() ) {
<.*?> for ( k=0 ; k<len ; k++ ) {
4609 <.*?>
< table.height() ) {
<.*?> sort = aSort[k];
4610  
4611 <.*?>
< table.height() ) {
<.*?> x = dataA[ sort.col ];
4612 <.*?>
< table.height() ) {
<.*?> y = dataB[ sort.col ];
4613  
4614 <.*?>
< table.height() ) {
<.*?> test = x<y ? -1 : x>y ? 1 : 0;
4615 <.*?>
< table.height() ) {
<.*?> if ( test !== 0 ) {
4616 <.*?>
< table.height() ) {
<.*?> return sort.dir === 'asc' ? test : -test;
4617 <.*?>
< table.height() ) {
<.*?> }
4618 <.*?>
< table.height() ) {
<.*?> }
4619  
4620 <.*?>
< table.height() ) {
<.*?> x = aiOrig[a];
4621 <.*?>
< table.height() ) {
<.*?> y = aiOrig[b];
4622 <.*?>
< table.height() ) {
<.*?> return x<y ? -1 : x>y ? 1 : 0;
4623 <.*?>
< table.height() ) {
<.*?> } );
4624 <.*?>
< table.height() ) {
<.*?> }
4625 <.*?>
< table.height() ) {
<.*?> else {
4626 <.*?>
< table.height() ) {
<.*?> // Depreciated - remove in 1.11 (providing a plug-in option)
4627 <.*?>
< table.height() ) {
<.*?> // Not all sort types have formatting methods, so we have to call their sorting
4628 <.*?>
< table.height() ) {
<.*?> // methods.
4629 <.*?>
< table.height() ) {
<.*?> displayMaster.sort( function ( a, b ) {
4630 <.*?>
< table.height() ) {
<.*?> var
4631 <.*?>
< table.height() ) {
<.*?> x, y, k, l, test, sort, fn,
4632 <.*?>
< table.height() ) {
<.*?> len=aSort.length,
4633 <.*?>
< table.height() ) {
<.*?> dataA = aoData[a]._aSortData,
4634 <.*?>
< table.height() ) {
<.*?> dataB = aoData[b]._aSortData;
4635  
4636 <.*?>
< table.height() ) {
<.*?> for ( k=0 ; k<len ; k++ ) {
4637 <.*?>
< table.height() ) {
<.*?> sort = aSort[k];
4638  
4639 <.*?>
< table.height() ) {
<.*?> x = dataA[ sort.col ];
4640 <.*?>
< table.height() ) {
<.*?> y = dataB[ sort.col ];
4641  
4642 <.*?>
< table.height() ) {
<.*?> fn = oExtSort[ sort.type+"-"+sort.dir ] || oExtSort[ "string-"+sort.dir ];
4643 <.*?>
< table.height() ) {
<.*?> test = fn( x, y );
4644 <.*?>
< table.height() ) {
<.*?> if ( test !== 0 ) {
4645 <.*?>
< table.height() ) {
<.*?> return test;
4646 <.*?>
< table.height() ) {
<.*?> }
4647 <.*?>
< table.height() ) {
<.*?> }
4648  
4649 <.*?>
< table.height() ) {
<.*?> x = aiOrig[a];
4650 <.*?>
< table.height() ) {
<.*?> y = aiOrig[b];
4651 <.*?>
< table.height() ) {
<.*?> return x<y ? -1 : x>y ? 1 : 0;
4652 <.*?>
< table.height() ) {
<.*?> } );
4653 <.*?>
< table.height() ) {
<.*?> }
4654 <.*?>
< table.height() ) {
<.*?> }
4655  
4656 <.*?>
< table.height() ) {
<.*?> /* Tell the draw function that we have sorted the data */
4657 <.*?>
< table.height() ) {
<.*?> oSettings.bSorted = true;
4658 <.*?>
< table.height() ) {
<.*?> }
4659  
4660  
4661 <.*?>
< table.height() ) {
<.*?> function _fnSortAria ( settings )
4662 <.*?>
< table.height() ) {
<.*?> {
4663 <.*?>
< table.height() ) {
<.*?> var label;
4664 <.*?>
< table.height() ) {
<.*?> var nextSort;
4665 <.*?>
< table.height() ) {
<.*?> var columns = settings.aoColumns;
4666 <.*?>
< table.height() ) {
<.*?> var aSort = _fnSortFlatten( settings );
4667 <.*?>
< table.height() ) {
<.*?> var oAria = settings.oLanguage.oAria;
4668  
4669 <.*?>
< table.height() ) {
<.*?> // ARIA attributes - need to loop all columns, to update all (removing old
4670 <.*?>
< table.height() ) {
<.*?> // attributes as needed)
4671 <.*?>
< table.height() ) {
<.*?> for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
4672 <.*?>
< table.height() ) {
<.*?> {
4673 <.*?>
< table.height() ) {
<.*?> var col = columns[i];
4674 <.*?>
< table.height() ) {
<.*?> var asSorting = col.asSorting;
4675 <.*?>
< table.height() ) {
<.*?> var sTitle = col.sTitle.replace( /<.*?>/g, "" );
4676 <.*?>
< table.height() ) {
<.*?><.*?> var th = col.nTh;
4677  
4678 <.*?>
< table.height() ) {
<.*?><.*?> // IE7 is throwing an error when setting these properties with jQuery's
4679 <.*?>
< table.height() ) {
<.*?><.*?> // attr() and removeAttr() methods...
4680 <.*?>
< table.height() ) {
<.*?><.*?> th.removeAttribute('aria-sort');
4681  
4682 <.*?>
< table.height() ) {
<.*?><.*?> /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
4683 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.bSortable ) {
4684 <.*?>
< table.height() ) {
<.*?><.*?> if ( aSort.length > 0 && aSort[0].col == i ) {
4685 <.*?>
< table.height() ) {
<.*?><.*?> th.setAttribute('aria-sort', aSort[0].dir=="asc" ? "ascending" : "descending" );
4686 <.*?>
< table.height() ) {
<.*?><.*?> nextSort = asSorting[ aSort[0].index+1 ] || asSorting[0];
4687 <.*?>
< table.height() ) {
<.*?><.*?> }
4688 <.*?>
< table.height() ) {
<.*?><.*?> else {
4689 <.*?>
< table.height() ) {
<.*?><.*?> nextSort = asSorting[0];
4690 <.*?>
< table.height() ) {
<.*?><.*?> }
4691  
4692 <.*?>
< table.height() ) {
<.*?><.*?> label = sTitle + ( nextSort === "asc" ?
4693 <.*?>
< table.height() ) {
<.*?><.*?> oAria.sSortAscending :
4694 <.*?>
< table.height() ) {
<.*?><.*?> oAria.sSortDescending
4695 <.*?>
< table.height() ) {
<.*?><.*?> );
4696 <.*?>
< table.height() ) {
<.*?><.*?> }
4697 <.*?>
< table.height() ) {
<.*?><.*?> else {
4698 <.*?>
< table.height() ) {
<.*?><.*?> label = sTitle;
4699 <.*?>
< table.height() ) {
<.*?><.*?> }
4700  
4701 <.*?>
< table.height() ) {
<.*?><.*?> th.setAttribute('aria-label', label);
4702 <.*?>
< table.height() ) {
<.*?><.*?> }
4703 <.*?>
< table.height() ) {
<.*?><.*?> }
4704  
4705  
4706 <.*?>
< table.height() ) {
<.*?><.*?> /**
4707 <.*?>
< table.height() ) {
<.*?><.*?> * Function to run on user sort request
4708 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings dataTables settings object
4709 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} attachTo node to attach the handler to
4710 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} colIdx column sorting index
4711 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [append=false] Append the requested sort to the existing
4712 <.*?>
< table.height() ) {
<.*?><.*?> * sort if true (i.e. multi-column sort)
4713 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} [callback] callback function
4714 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
4715 <.*?>
< table.height() ) {
<.*?><.*?> */
4716 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSortListener ( settings, colIdx, append, callback )
4717 <.*?>
< table.height() ) {
<.*?><.*?> {
4718 <.*?>
< table.height() ) {
<.*?><.*?> var col = settings.aoColumns[ colIdx ];
4719 <.*?>
< table.height() ) {
<.*?><.*?> var sorting = settings.aaSorting;
4720 <.*?>
< table.height() ) {
<.*?><.*?> var asSorting = col.asSorting;
4721 <.*?>
< table.height() ) {
<.*?><.*?> var nextSortIdx;
4722 <.*?>
< table.height() ) {
<.*?><.*?> var next = function ( a, overflow ) {
4723 <.*?>
< table.height() ) {
<.*?><.*?> var idx = a._idx;
4724 <.*?>
< table.height() ) {
<.*?><.*?> if ( idx === undefined ) {
4725 <.*?>
< table.height() ) {
<.*?><.*?> idx = $.inArray( a[1], asSorting );
4726 <.*?>
< table.height() ) {
<.*?><.*?> }
4727  
4728 <.*?>
< table.height() ) {
<.*?><.*?> return idx+1 < asSorting.length ?
4729 <.*?>
< table.height() ) {
<.*?><.*?> idx+1 :
4730 <.*?>
< table.height() ) {
<.*?><.*?> overflow ?
4731 <.*?>
< table.height() ) {
<.*?><.*?> null :
4732 <.*?>
< table.height() ) {
<.*?><.*?> 0;
4733 <.*?>
< table.height() ) {
<.*?><.*?> };
4734  
4735 <.*?>
< table.height() ) {
<.*?><.*?> // Convert to 2D array if needed
4736 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof sorting[0] === 'number' ) {
4737 <.*?>
< table.height() ) {
<.*?><.*?> sorting = settings.aaSorting = [ sorting ];
4738 <.*?>
< table.height() ) {
<.*?><.*?> }
4739  
4740 <.*?>
< table.height() ) {
<.*?><.*?> // If appending the sort then we are multi-column sorting
4741 <.*?>
< table.height() ) {
<.*?><.*?> if ( append && settings.oFeatures.bSortMulti ) {
4742 <.*?>
< table.height() ) {
<.*?><.*?> // Are we already doing some kind of sort on this column?
4743 <.*?>
< table.height() ) {
<.*?><.*?> var sortIdx = $.inArray( colIdx, _pluck(sorting, '0') );
4744  
4745 <.*?>
< table.height() ) {
<.*?><.*?> if ( sortIdx !== -1 ) {
4746 <.*?>
< table.height() ) {
<.*?><.*?> // Yes, modify the sort
4747 <.*?>
< table.height() ) {
<.*?><.*?> nextSortIdx = next( sorting[sortIdx], true );
4748  
4749 <.*?>
< table.height() ) {
<.*?><.*?> if ( nextSortIdx === null && sorting.length === 1 ) {
4750 <.*?>
< table.height() ) {
<.*?><.*?> nextSortIdx = 0; // can't remove sorting completely
4751 <.*?>
< table.height() ) {
<.*?><.*?> }
4752  
4753 <.*?>
< table.height() ) {
<.*?><.*?> if ( nextSortIdx === null ) {
4754 <.*?>
< table.height() ) {
<.*?><.*?> sorting.splice( sortIdx, 1 );
4755 <.*?>
< table.height() ) {
<.*?><.*?> }
4756 <.*?>
< table.height() ) {
<.*?><.*?> else {
4757 <.*?>
< table.height() ) {
<.*?><.*?> sorting[sortIdx][1] = asSorting[ nextSortIdx ];
4758 <.*?>
< table.height() ) {
<.*?><.*?> sorting[sortIdx]._idx = nextSortIdx;
4759 <.*?>
< table.height() ) {
<.*?><.*?> }
4760 <.*?>
< table.height() ) {
<.*?><.*?> }
4761 <.*?>
< table.height() ) {
<.*?><.*?> else {
4762 <.*?>
< table.height() ) {
<.*?><.*?> // No sort on this column yet
4763 <.*?>
< table.height() ) {
<.*?><.*?> sorting.push( [ colIdx, asSorting[0], 0 ] );
4764 <.*?>
< table.height() ) {
<.*?><.*?> sorting[sorting.length-1]._idx = 0;
4765 <.*?>
< table.height() ) {
<.*?><.*?> }
4766 <.*?>
< table.height() ) {
<.*?><.*?> }
4767 <.*?>
< table.height() ) {
<.*?><.*?> else if ( sorting.length && sorting[0][0] == colIdx ) {
4768 <.*?>
< table.height() ) {
<.*?><.*?> // Single column - already sorting on this column, modify the sort
4769 <.*?>
< table.height() ) {
<.*?><.*?> nextSortIdx = next( sorting[0] );
4770  
4771 <.*?>
< table.height() ) {
<.*?><.*?> sorting.length = 1;
4772 <.*?>
< table.height() ) {
<.*?><.*?> sorting[0][1] = asSorting[ nextSortIdx ];
4773 <.*?>
< table.height() ) {
<.*?><.*?> sorting[0]._idx = nextSortIdx;
4774 <.*?>
< table.height() ) {
<.*?><.*?> }
4775 <.*?>
< table.height() ) {
<.*?><.*?> else {
4776 <.*?>
< table.height() ) {
<.*?><.*?> // Single column - sort only on this column
4777 <.*?>
< table.height() ) {
<.*?><.*?> sorting.length = 0;
4778 <.*?>
< table.height() ) {
<.*?><.*?> sorting.push( [ colIdx, asSorting[0] ] );
4779 <.*?>
< table.height() ) {
<.*?><.*?> sorting[0]._idx = 0;
4780 <.*?>
< table.height() ) {
<.*?><.*?> }
4781  
4782 <.*?>
< table.height() ) {
<.*?><.*?> // Run the sort by calling a full redraw
4783 <.*?>
< table.height() ) {
<.*?><.*?> _fnReDraw( settings );
4784  
4785 <.*?>
< table.height() ) {
<.*?><.*?> // callback used for async user interaction
4786 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof callback == 'function' ) {
4787 <.*?>
< table.height() ) {
<.*?><.*?> callback( settings );
4788 <.*?>
< table.height() ) {
<.*?><.*?> }
4789 <.*?>
< table.height() ) {
<.*?><.*?> }
4790  
4791  
4792 <.*?>
< table.height() ) {
<.*?><.*?> /**
4793 <.*?>
< table.height() ) {
<.*?><.*?> * Attach a sort handler (click) to a node
4794 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings dataTables settings object
4795 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} attachTo node to attach the handler to
4796 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} colIdx column sorting index
4797 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} [callback] callback function
4798 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
4799 <.*?>
< table.height() ) {
<.*?><.*?> */
4800 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSortAttachListener ( settings, attachTo, colIdx, callback )
4801 <.*?>
< table.height() ) {
<.*?><.*?> {
4802 <.*?>
< table.height() ) {
<.*?><.*?> var col = settings.aoColumns[ colIdx ];
4803  
4804 <.*?>
< table.height() ) {
<.*?><.*?> _fnBindAction( attachTo, {}, function (e) {
4805 <.*?>
< table.height() ) {
<.*?><.*?> /* If the column is not sortable - don't to anything */
4806 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.bSortable === false ) {
4807 <.*?>
< table.height() ) {
<.*?><.*?> return;
4808 <.*?>
< table.height() ) {
<.*?><.*?> }
4809  
4810 <.*?>
< table.height() ) {
<.*?><.*?> // If processing is enabled use a timeout to allow the processing
4811 <.*?>
< table.height() ) {
<.*?><.*?> // display to be shown - otherwise to it synchronously
4812 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings.oFeatures.bProcessing ) {
4813 <.*?>
< table.height() ) {
<.*?><.*?> _fnProcessingDisplay( settings, true );
4814  
4815 <.*?>
< table.height() ) {
<.*?><.*?> setTimeout( function() {
4816 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortListener( settings, colIdx, e.shiftKey, callback );
4817  
4818 <.*?>
< table.height() ) {
<.*?><.*?> // In server-side processing, the draw callback will remove the
4819 <.*?>
< table.height() ) {
<.*?><.*?> // processing display
4820 <.*?>
< table.height() ) {
<.*?><.*?> if ( _fnDataSource( settings ) !== 'ssp' ) {
4821 <.*?>
< table.height() ) {
<.*?><.*?> _fnProcessingDisplay( settings, false );
4822 <.*?>
< table.height() ) {
<.*?><.*?> }
4823 <.*?>
< table.height() ) {
<.*?><.*?> }, 0 );
4824 <.*?>
< table.height() ) {
<.*?><.*?> }
4825 <.*?>
< table.height() ) {
<.*?><.*?> else {
4826 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortListener( settings, colIdx, e.shiftKey, callback );
4827 <.*?>
< table.height() ) {
<.*?><.*?> }
4828 <.*?>
< table.height() ) {
<.*?><.*?> } );
4829 <.*?>
< table.height() ) {
<.*?><.*?> }
4830  
4831  
4832 <.*?>
< table.height() ) {
<.*?><.*?> /**
4833 <.*?>
< table.height() ) {
<.*?><.*?> * Set the sorting classes on table's body, Note: it is safe to call this function
4834 <.*?>
< table.height() ) {
<.*?><.*?> * when bSort and bSortClasses are false
4835 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oSettings dataTables settings object
4836 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
4837 <.*?>
< table.height() ) {
<.*?><.*?> */
4838 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSortingClasses( settings )
4839 <.*?>
< table.height() ) {
<.*?><.*?> {
4840 <.*?>
< table.height() ) {
<.*?><.*?> var oldSort = settings.aLastSort;
4841 <.*?>
< table.height() ) {
<.*?><.*?> var sortClass = settings.oClasses.sSortColumn;
4842 <.*?>
< table.height() ) {
<.*?><.*?> var sort = _fnSortFlatten( settings );
4843 <.*?>
< table.height() ) {
<.*?><.*?> var features = settings.oFeatures;
4844 <.*?>
< table.height() ) {
<.*?><.*?> var i, ien, colIdx;
4845  
4846 <.*?>
< table.height() ) {
<.*?><.*?> if ( features.bSort && features.bSortClasses ) {
4847 <.*?>
< table.height() ) {
<.*?><.*?> // Remove old sorting classes
4848 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=oldSort.length ; i<ien ; i++ ) {
4849 <.*?>
< table.height() ) {
<.*?><.*?> colIdx = oldSort[i].src;
4850  
4851 <.*?>
< table.height() ) {
<.*?><.*?> // Remove column sorting
4852 <.*?>
< table.height() ) {
<.*?><.*?> $( _pluck( settings.aoData, 'anCells', colIdx ) )
4853 <.*?>
< table.height() ) {
<.*?><.*?> .removeClass( sortClass + (i<2 ? i+1 : 3) );
4854 <.*?>
< table.height() ) {
<.*?><.*?> }
4855  
4856 <.*?>
< table.height() ) {
<.*?><.*?> // Add new column sorting
4857 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=sort.length ; i<ien ; i++ ) {
4858 <.*?>
< table.height() ) {
<.*?><.*?> colIdx = sort[i].src;
4859  
4860 <.*?>
< table.height() ) {
<.*?><.*?> $( _pluck( settings.aoData, 'anCells', colIdx ) )
4861 <.*?>
< table.height() ) {
<.*?><.*?> .addClass( sortClass + (i<2 ? i+1 : 3) );
4862 <.*?>
< table.height() ) {
<.*?><.*?> }
4863 <.*?>
< table.height() ) {
<.*?><.*?> }
4864  
4865 <.*?>
< table.height() ) {
<.*?><.*?> settings.aLastSort = sort;
4866 <.*?>
< table.height() ) {
<.*?><.*?> }
4867  
4868  
4869 <.*?>
< table.height() ) {
<.*?><.*?> // Get the data to sort a column, be it from cache, fresh (populating the
4870 <.*?>
< table.height() ) {
<.*?><.*?> // cache), or from a sort formatter
4871 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSortData( settings, idx )
4872 <.*?>
< table.height() ) {
<.*?><.*?> {
4873 <.*?>
< table.height() ) {
<.*?><.*?> // Custom sorting function - provided by the sort data type
4874 <.*?>
< table.height() ) {
<.*?><.*?> var column = settings.aoColumns[ idx ];
4875 <.*?>
< table.height() ) {
<.*?><.*?> var customSort = DataTable.ext.order[ column.sSortDataType ];
4876 <.*?>
< table.height() ) {
<.*?><.*?> var customData;
4877  
4878 <.*?>
< table.height() ) {
<.*?><.*?> if ( customSort ) {
4879 <.*?>
< table.height() ) {
<.*?><.*?> customData = customSort.call( settings.oInstance, settings, idx,
4880 <.*?>
< table.height() ) {
<.*?><.*?> _fnColumnIndexToVisible( settings, idx )
4881 <.*?>
< table.height() ) {
<.*?><.*?> );
4882 <.*?>
< table.height() ) {
<.*?><.*?> }
4883  
4884 <.*?>
< table.height() ) {
<.*?><.*?> // Use / populate cache
4885 <.*?>
< table.height() ) {
<.*?><.*?> var row, cellData;
4886 <.*?>
< table.height() ) {
<.*?><.*?> var formatter = DataTable.ext.type.order[ column.sType+"-pre" ];
4887  
4888 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
4889 <.*?>
< table.height() ) {
<.*?><.*?> row = settings.aoData[i];
4890  
4891 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! row._aSortData ) {
4892 <.*?>
< table.height() ) {
<.*?><.*?> row._aSortData = [];
4893 <.*?>
< table.height() ) {
<.*?><.*?> }
4894  
4895 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! row._aSortData[idx] || customSort ) {
4896 <.*?>
< table.height() ) {
<.*?><.*?> cellData = customSort ?
4897 <.*?>
< table.height() ) {
<.*?><.*?> customData[i] : // If there was a custom sort function, use data from there
4898 <.*?>
< table.height() ) {
<.*?><.*?> _fnGetCellData( settings, i, idx, 'sort' );
4899  
4900 <.*?>
< table.height() ) {
<.*?><.*?> row._aSortData[ idx ] = formatter ?
4901 <.*?>
< table.height() ) {
<.*?><.*?> formatter( cellData ) :
4902 <.*?>
< table.height() ) {
<.*?><.*?> cellData;
4903 <.*?>
< table.height() ) {
<.*?><.*?> }
4904 <.*?>
< table.height() ) {
<.*?><.*?> }
4905 <.*?>
< table.height() ) {
<.*?><.*?> }
4906  
4907  
4908  
4909 <.*?>
< table.height() ) {
<.*?><.*?> /**
4910 <.*?>
< table.height() ) {
<.*?><.*?> * Save the state of a table
4911 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oSettings dataTables settings object
4912 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
4913 <.*?>
< table.height() ) {
<.*?><.*?> */
4914 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSaveState ( settings )
4915 <.*?>
< table.height() ) {
<.*?><.*?> {
4916 <.*?>
< table.height() ) {
<.*?><.*?> if ( !settings.oFeatures.bStateSave || settings.bDestroying )
4917 <.*?>
< table.height() ) {
<.*?><.*?> {
4918 <.*?>
< table.height() ) {
<.*?><.*?> return;
4919 <.*?>
< table.height() ) {
<.*?><.*?> }
4920  
4921 <.*?>
< table.height() ) {
<.*?><.*?> /* Store the interesting variables */
4922 <.*?>
< table.height() ) {
<.*?><.*?> var state = {
4923 <.*?>
< table.height() ) {
<.*?><.*?> time: +new Date(),
4924 <.*?>
< table.height() ) {
<.*?><.*?> start: settings._iDisplayStart,
4925 <.*?>
< table.height() ) {
<.*?><.*?> length: settings._iDisplayLength,
4926 <.*?>
< table.height() ) {
<.*?><.*?> order: $.extend( true, [], settings.aaSorting ),
4927 <.*?>
< table.height() ) {
<.*?><.*?> search: _fnSearchToCamel( settings.oPreviousSearch ),
4928 <.*?>
< table.height() ) {
<.*?><.*?> columns: $.map( settings.aoColumns, function ( col, i ) {
4929 <.*?>
< table.height() ) {
<.*?><.*?> return {
4930 <.*?>
< table.height() ) {
<.*?><.*?> visible: col.bVisible,
4931 <.*?>
< table.height() ) {
<.*?><.*?> search: _fnSearchToCamel( settings.aoPreSearchCols[i] )
4932 <.*?>
< table.height() ) {
<.*?><.*?> };
4933 <.*?>
< table.height() ) {
<.*?><.*?> } )
4934 <.*?>
< table.height() ) {
<.*?><.*?> };
4935  
4936 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( settings, "aoStateSaveParams", 'stateSaveParams', [settings, state] );
4937  
4938 <.*?>
< table.height() ) {
<.*?><.*?> settings.oSavedState = state;
4939 <.*?>
< table.height() ) {
<.*?><.*?> settings.fnStateSaveCallback.call( settings.oInstance, settings, state );
4940 <.*?>
< table.height() ) {
<.*?><.*?> }
4941  
4942  
4943 <.*?>
< table.height() ) {
<.*?><.*?> /**
4944 <.*?>
< table.height() ) {
<.*?><.*?> * Attempt to load a saved table state
4945 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oSettings dataTables settings object
4946 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oInit DataTables init object so we can override settings
4947 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
4948 <.*?>
< table.height() ) {
<.*?><.*?> */
4949 <.*?>
< table.height() ) {
<.*?><.*?> function _fnLoadState ( settings, oInit )
4950 <.*?>
< table.height() ) {
<.*?><.*?> {
4951 <.*?>
< table.height() ) {
<.*?><.*?> var i, ien;
4952 <.*?>
< table.height() ) {
<.*?><.*?> var columns = settings.aoColumns;
4953  
4954 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! settings.oFeatures.bStateSave ) {
4955 <.*?>
< table.height() ) {
<.*?><.*?> return;
4956 <.*?>
< table.height() ) {
<.*?><.*?> }
4957  
4958 <.*?>
< table.height() ) {
<.*?><.*?> var state = settings.fnStateLoadCallback.call( settings.oInstance, settings );
4959 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! state || ! state.time ) {
4960 <.*?>
< table.height() ) {
<.*?><.*?> return;
4961 <.*?>
< table.height() ) {
<.*?><.*?> }
4962  
4963 <.*?>
< table.height() ) {
<.*?><.*?> /* Allow custom and plug-in manipulation functions to alter the saved data set and
4964 <.*?>
< table.height() ) {
<.*?><.*?> * cancelling of loading by returning false
4965 <.*?>
< table.height() ) {
<.*?><.*?> */
4966 <.*?>
< table.height() ) {
<.*?><.*?> var abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, state] );
4967 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.inArray( false, abStateLoad ) !== -1 ) {
4968 <.*?>
< table.height() ) {
<.*?><.*?> return;
4969 <.*?>
< table.height() ) {
<.*?><.*?> }
4970  
4971 <.*?>
< table.height() ) {
<.*?><.*?> /* Reject old data */
4972 <.*?>
< table.height() ) {
<.*?><.*?> var duration = settings.iStateDuration;
4973 <.*?>
< table.height() ) {
<.*?><.*?> if ( duration > 0 && state.time < +new Date() - (duration*1000) ) {
4974 <.*?>
< table.height() ) {
<.*?><.*?> return;
4975 <.*?>
< table.height() ) {
<.*?><.*?> }
4976  
4977 <.*?>
< table.height() ) {
<.*?><.*?> // Number of columns have changed - all bets are off, no restore of settings
4978 <.*?>
< table.height() ) {
<.*?><.*?> if ( columns.length !== state.columns.length ) {
4979 <.*?>
< table.height() ) {
<.*?><.*?> return;
4980 <.*?>
< table.height() ) {
<.*?><.*?> }
4981  
4982 <.*?>
< table.height() ) {
<.*?><.*?> // Store the saved state so it might be accessed at any time
4983 <.*?>
< table.height() ) {
<.*?><.*?> settings.oLoadedState = $.extend( true, {}, state );
4984  
4985 <.*?>
< table.height() ) {
<.*?><.*?> // Restore key features - todo - for 1.11 this needs to be done by
4986 <.*?>
< table.height() ) {
<.*?><.*?> // subscribed events
4987 <.*?>
< table.height() ) {
<.*?><.*?> if ( state.start !== undefined ) {
4988 <.*?>
< table.height() ) {
<.*?><.*?> settings._iDisplayStart = state.start;
4989 <.*?>
< table.height() ) {
<.*?><.*?> settings.iInitDisplayStart = state.start;
4990 <.*?>
< table.height() ) {
<.*?><.*?> }
4991 <.*?>
< table.height() ) {
<.*?><.*?> if ( state.length !== undefined ) {
4992 <.*?>
< table.height() ) {
<.*?><.*?> settings._iDisplayLength = state.length;
4993 <.*?>
< table.height() ) {
<.*?><.*?> }
4994  
4995 <.*?>
< table.height() ) {
<.*?><.*?> // Order
4996 <.*?>
< table.height() ) {
<.*?><.*?> if ( state.order !== undefined ) {
4997 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSorting = [];
4998 <.*?>
< table.height() ) {
<.*?><.*?> $.each( state.order, function ( i, col ) {
4999 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSorting.push( col[0] >= columns.length ?
5000 <.*?>
< table.height() ) {
<.*?><.*?> [ 0, col[1] ] :
5001 <.*?>
< table.height() ) {
<.*?><.*?> col
5002 <.*?>
< table.height() ) {
<.*?><.*?> );
5003 <.*?>
< table.height() ) {
<.*?><.*?> } );
5004 <.*?>
< table.height() ) {
<.*?><.*?> }
5005  
5006 <.*?>
< table.height() ) {
<.*?><.*?> // Search
5007 <.*?>
< table.height() ) {
<.*?><.*?> if ( state.search !== undefined ) {
5008 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( settings.oPreviousSearch, _fnSearchToHung( state.search ) );
5009 <.*?>
< table.height() ) {
<.*?><.*?> }
5010  
5011 <.*?>
< table.height() ) {
<.*?><.*?> // Columns
5012 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=state.columns.length ; i<ien ; i++ ) {
5013 <.*?>
< table.height() ) {
<.*?><.*?> var col = state.columns[i];
5014  
5015 <.*?>
< table.height() ) {
<.*?><.*?> // Visibility
5016 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.visible !== undefined ) {
5017 <.*?>
< table.height() ) {
<.*?><.*?> columns[i].bVisible = col.visible;
5018 <.*?>
< table.height() ) {
<.*?><.*?> }
5019  
5020 <.*?>
< table.height() ) {
<.*?><.*?> // Search
5021 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.search !== undefined ) {
5022 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) );
5023 <.*?>
< table.height() ) {
<.*?><.*?> }
5024 <.*?>
< table.height() ) {
<.*?><.*?> }
5025  
5026 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, state] );
5027 <.*?>
< table.height() ) {
<.*?><.*?> }
5028  
5029  
5030 <.*?>
< table.height() ) {
<.*?><.*?> /**
5031 <.*?>
< table.height() ) {
<.*?><.*?> * Return the settings object for a particular table
5032 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} table table we are using as a dataTable
5033 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {object} Settings object - or null if not found
5034 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5035 <.*?>
< table.height() ) {
<.*?><.*?> */
5036 <.*?>
< table.height() ) {
<.*?><.*?> function _fnSettingsFromNode ( table )
5037 <.*?>
< table.height() ) {
<.*?><.*?> {
5038 <.*?>
< table.height() ) {
<.*?><.*?> var settings = DataTable.settings;
5039 <.*?>
< table.height() ) {
<.*?><.*?> var idx = $.inArray( table, _pluck( settings, 'nTable' ) );
5040  
5041 <.*?>
< table.height() ) {
<.*?><.*?> return idx !== -1 ?
5042 <.*?>
< table.height() ) {
<.*?><.*?> settings[ idx ] :
5043 <.*?>
< table.height() ) {
<.*?><.*?> null;
5044 <.*?>
< table.height() ) {
<.*?><.*?> }
5045  
5046  
5047 <.*?>
< table.height() ) {
<.*?><.*?> /**
5048 <.*?>
< table.height() ) {
<.*?><.*?> * Log an error message
5049 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings dataTables settings object
5050 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} level log error messages, or display them to the user
5051 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} msg error message
5052 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} tn Technical note id to get more information about the error.
5053 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5054 <.*?>
< table.height() ) {
<.*?><.*?> */
5055 <.*?>
< table.height() ) {
<.*?><.*?> function _fnLog( settings, level, msg, tn )
5056 <.*?>
< table.height() ) {
<.*?><.*?> {
5057 <.*?>
< table.height() ) {
<.*?><.*?> msg = 'DataTables warning: '+
5058 <.*?>
< table.height() ) {
<.*?><.*?> (settings!==null ? 'table id='+settings.sTableId+' - ' : '')+msg;
5059  
5060 <.*?>
< table.height() ) {
<.*?><.*?> if ( tn ) {
5061 <.*?>
< table.height() ) {
<.*?><.*?> msg += '. For more information about this error, please see '+
5062 <.*?>
< table.height() ) {
<.*?><.*?> 'http://datatables.net/tn/'+tn;
5063 <.*?>
< table.height() ) {
<.*?><.*?> }
5064  
5065 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! level ) {
5066 <.*?>
< table.height() ) {
<.*?><.*?> // Backwards compatibility pre 1.10
5067 <.*?>
< table.height() ) {
<.*?><.*?> var ext = DataTable.ext;
5068 <.*?>
< table.height() ) {
<.*?><.*?> var type = ext.sErrMode || ext.errMode;
5069  
5070 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] );
5071  
5072 <.*?>
< table.height() ) {
<.*?><.*?> if ( type == 'alert' ) {
5073 <.*?>
< table.height() ) {
<.*?><.*?> alert( msg );
5074 <.*?>
< table.height() ) {
<.*?><.*?> }
5075 <.*?>
< table.height() ) {
<.*?><.*?> else if ( type == 'throw' ) {
5076 <.*?>
< table.height() ) {
<.*?><.*?> throw new Error(msg);
5077 <.*?>
< table.height() ) {
<.*?><.*?> }
5078 <.*?>
< table.height() ) {
<.*?><.*?> else if ( typeof type == 'function' ) {
5079 <.*?>
< table.height() ) {
<.*?><.*?> type( settings, tn, msg );
5080 <.*?>
< table.height() ) {
<.*?><.*?> }
5081 <.*?>
< table.height() ) {
<.*?><.*?> }
5082 <.*?>
< table.height() ) {
<.*?><.*?> else if ( window.console && console.log ) {
5083 <.*?>
< table.height() ) {
<.*?><.*?> console.log( msg );
5084 <.*?>
< table.height() ) {
<.*?><.*?> }
5085 <.*?>
< table.height() ) {
<.*?><.*?> }
5086  
5087  
5088 <.*?>
< table.height() ) {
<.*?><.*?> /**
5089 <.*?>
< table.height() ) {
<.*?><.*?> * See if a property is defined on one object, if so assign it to the other object
5090 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} ret target object
5091 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} src source object
5092 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} name property
5093 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [mappedName] name to map too - optional, name used if not given
5094 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5095 <.*?>
< table.height() ) {
<.*?><.*?> */
5096 <.*?>
< table.height() ) {
<.*?><.*?> function _fnMap( ret, src, name, mappedName )
5097 <.*?>
< table.height() ) {
<.*?><.*?> {
5098 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isArray( name ) ) {
5099 <.*?>
< table.height() ) {
<.*?><.*?> $.each( name, function (i, val) {
5100 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isArray( val ) ) {
5101 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( ret, src, val[0], val[1] );
5102 <.*?>
< table.height() ) {
<.*?><.*?> }
5103 <.*?>
< table.height() ) {
<.*?><.*?> else {
5104 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( ret, src, val );
5105 <.*?>
< table.height() ) {
<.*?><.*?> }
5106 <.*?>
< table.height() ) {
<.*?><.*?> } );
5107  
5108 <.*?>
< table.height() ) {
<.*?><.*?> return;
5109 <.*?>
< table.height() ) {
<.*?><.*?> }
5110  
5111 <.*?>
< table.height() ) {
<.*?><.*?> if ( mappedName === undefined ) {
5112 <.*?>
< table.height() ) {
<.*?><.*?> mappedName = name;
5113 <.*?>
< table.height() ) {
<.*?><.*?> }
5114  
5115 <.*?>
< table.height() ) {
<.*?><.*?> if ( src[name] !== undefined ) {
5116 <.*?>
< table.height() ) {
<.*?><.*?> ret[mappedName] = src[name];
5117 <.*?>
< table.height() ) {
<.*?><.*?> }
5118 <.*?>
< table.height() ) {
<.*?><.*?> }
5119  
5120  
5121 <.*?>
< table.height() ) {
<.*?><.*?> /**
5122 <.*?>
< table.height() ) {
<.*?><.*?> * Extend objects - very similar to jQuery.extend, but deep copy objects, and
5123 <.*?>
< table.height() ) {
<.*?><.*?> * shallow copy arrays. The reason we need to do this, is that we don't want to
5124 <.*?>
< table.height() ) {
<.*?><.*?> * deep copy array init values (such as aaSorting) since the dev wouldn't be
5125 <.*?>
< table.height() ) {
<.*?><.*?> * able to override them, but we do want to deep copy arrays.
5126 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} out Object to extend
5127 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} extender Object from which the properties will be applied to
5128 <.*?>
< table.height() ) {
<.*?><.*?> * out
5129 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} breakRefs If true, then arrays will be sliced to take an
5130 <.*?>
< table.height() ) {
<.*?><.*?> * independent copy with the exception of the `data` or `aaData` parameters
5131 <.*?>
< table.height() ) {
<.*?><.*?> * if they are present. This is so you can pass in a collection to
5132 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables and have that used as your data source without breaking the
5133 <.*?>
< table.height() ) {
<.*?><.*?> * references
5134 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {object} out Reference, just for convenience - out === the return.
5135 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5136 <.*?>
< table.height() ) {
<.*?><.*?> * @todo This doesn't take account of arrays inside the deep copied objects.
5137 <.*?>
< table.height() ) {
<.*?><.*?> */
5138 <.*?>
< table.height() ) {
<.*?><.*?> function _fnExtend( out, extender, breakRefs )
5139 <.*?>
< table.height() ) {
<.*?><.*?> {
5140 <.*?>
< table.height() ) {
<.*?><.*?> var val;
5141  
5142 <.*?>
< table.height() ) {
<.*?><.*?> for ( var prop in extender ) {
5143 <.*?>
< table.height() ) {
<.*?><.*?> if ( extender.hasOwnProperty(prop) ) {
5144 <.*?>
< table.height() ) {
<.*?><.*?> val = extender[prop];
5145  
5146 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( val ) ) {
5147 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! $.isPlainObject( out[prop] ) ) {
5148 <.*?>
< table.height() ) {
<.*?><.*?> out[prop] = {};
5149 <.*?>
< table.height() ) {
<.*?><.*?> }
5150 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( true, out[prop], val );
5151 <.*?>
< table.height() ) {
<.*?><.*?> }
5152 <.*?>
< table.height() ) {
<.*?><.*?> else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
5153 <.*?>
< table.height() ) {
<.*?><.*?> out[prop] = val.slice();
5154 <.*?>
< table.height() ) {
<.*?><.*?> }
5155 <.*?>
< table.height() ) {
<.*?><.*?> else {
5156 <.*?>
< table.height() ) {
<.*?><.*?> out[prop] = val;
5157 <.*?>
< table.height() ) {
<.*?><.*?> }
5158 <.*?>
< table.height() ) {
<.*?><.*?> }
5159 <.*?>
< table.height() ) {
<.*?><.*?> }
5160  
5161 <.*?>
< table.height() ) {
<.*?><.*?> return out;
5162 <.*?>
< table.height() ) {
<.*?><.*?> }
5163  
5164  
5165 <.*?>
< table.height() ) {
<.*?><.*?> /**
5166 <.*?>
< table.height() ) {
<.*?><.*?> * Bind an event handers to allow a click or return key to activate the callback.
5167 <.*?>
< table.height() ) {
<.*?><.*?> * This is good for accessibility since a return on the keyboard will have the
5168 <.*?>
< table.height() ) {
<.*?><.*?> * same effect as a click, if the element has focus.
5169 <.*?>
< table.height() ) {
<.*?><.*?> * @param {element} n Element to bind the action to
5170 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oData Data object to pass to the triggered function
5171 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} fn Callback function for when the event is triggered
5172 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5173 <.*?>
< table.height() ) {
<.*?><.*?> */
5174 <.*?>
< table.height() ) {
<.*?><.*?> function _fnBindAction( n, oData, fn )
5175 <.*?>
< table.height() ) {
<.*?><.*?> {
5176 <.*?>
< table.height() ) {
<.*?><.*?> $(n)
5177 <.*?>
< table.height() ) {
<.*?><.*?> .bind( 'click.DT', oData, function (e) {
5178 <.*?>
< table.height() ) {
<.*?><.*?> n.blur(); // Remove focus outline for mouse users
5179 <.*?>
< table.height() ) {
<.*?><.*?> fn(e);
5180 <.*?>
< table.height() ) {
<.*?><.*?> } )
5181 <.*?>
< table.height() ) {
<.*?><.*?> .bind( 'keypress.DT', oData, function (e){
5182 <.*?>
< table.height() ) {
<.*?><.*?> if ( e.which === 13 ) {
5183 <.*?>
< table.height() ) {
<.*?><.*?> e.preventDefault();
5184 <.*?>
< table.height() ) {
<.*?><.*?> fn(e);
5185 <.*?>
< table.height() ) {
<.*?><.*?> }
5186 <.*?>
< table.height() ) {
<.*?><.*?> } )
5187 <.*?>
< table.height() ) {
<.*?><.*?> .bind( 'selectstart.DT', function () {
5188 <.*?>
< table.height() ) {
<.*?><.*?> /* Take the brutal approach to cancelling text selection */
5189 <.*?>
< table.height() ) {
<.*?><.*?> return false;
5190 <.*?>
< table.height() ) {
<.*?><.*?> } );
5191 <.*?>
< table.height() ) {
<.*?><.*?> }
5192  
5193  
5194 <.*?>
< table.height() ) {
<.*?><.*?> /**
5195 <.*?>
< table.height() ) {
<.*?><.*?> * Register a callback function. Easily allows a callback function to be added to
5196 <.*?>
< table.height() ) {
<.*?><.*?> * an array store of callback functions that can then all be called together.
5197 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oSettings dataTables settings object
5198 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sStore Name of the array storage for the callbacks in oSettings
5199 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} fn Function to be called back
5200 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sName Identifying name for the callback (i.e. a label)
5201 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5202 <.*?>
< table.height() ) {
<.*?><.*?> */
5203 <.*?>
< table.height() ) {
<.*?><.*?> function _fnCallbackReg( oSettings, sStore, fn, sName )
5204 <.*?>
< table.height() ) {
<.*?><.*?> {
5205 <.*?>
< table.height() ) {
<.*?><.*?> if ( fn )
5206 <.*?>
< table.height() ) {
<.*?><.*?> {
5207 <.*?>
< table.height() ) {
<.*?><.*?> oSettings[sStore].push( {
5208 <.*?>
< table.height() ) {
<.*?><.*?> "fn": fn,
5209 <.*?>
< table.height() ) {
<.*?><.*?> "sName": sName
5210 <.*?>
< table.height() ) {
<.*?><.*?> } );
5211 <.*?>
< table.height() ) {
<.*?><.*?> }
5212 <.*?>
< table.height() ) {
<.*?><.*?> }
5213  
5214  
5215 <.*?>
< table.height() ) {
<.*?><.*?> /**
5216 <.*?>
< table.height() ) {
<.*?><.*?> * Fire callback functions and trigger events. Note that the loop over the
5217 <.*?>
< table.height() ) {
<.*?><.*?> * callback array store is done backwards! Further note that you do not want to
5218 <.*?>
< table.height() ) {
<.*?><.*?> * fire off triggers in time sensitive applications (for example cell creation)
5219 <.*?>
< table.height() ) {
<.*?><.*?> * as its slow.
5220 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings dataTables settings object
5221 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} callbackArr Name of the array storage for the callbacks in
5222 <.*?>
< table.height() ) {
<.*?><.*?> * oSettings
5223 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} eventName Name of the jQuery custom event to trigger. If
5224 <.*?>
< table.height() ) {
<.*?><.*?> * null no trigger is fired
5225 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} args Array of arguments to pass to the callback function /
5226 <.*?>
< table.height() ) {
<.*?><.*?> * trigger
5227 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5228 <.*?>
< table.height() ) {
<.*?><.*?> */
5229 <.*?>
< table.height() ) {
<.*?><.*?> function _fnCallbackFire( settings, callbackArr, eventName, args )
5230 <.*?>
< table.height() ) {
<.*?><.*?> {
5231 <.*?>
< table.height() ) {
<.*?><.*?> var ret = [];
5232  
5233 <.*?>
< table.height() ) {
<.*?><.*?> if ( callbackArr ) {
5234 <.*?>
< table.height() ) {
<.*?><.*?> ret = $.map( settings[callbackArr].slice().reverse(), function (val, i) {
5235 <.*?>
< table.height() ) {
<.*?><.*?> return val.fn.apply( settings.oInstance, args );
5236 <.*?>
< table.height() ) {
<.*?><.*?> } );
5237 <.*?>
< table.height() ) {
<.*?><.*?> }
5238  
5239 <.*?>
< table.height() ) {
<.*?><.*?> if ( eventName !== null ) {
5240 <.*?>
< table.height() ) {
<.*?><.*?> var e = $.Event( eventName+'.dt' );
5241  
5242 <.*?>
< table.height() ) {
<.*?><.*?> $(settings.nTable).trigger( e, args );
5243  
5244 <.*?>
< table.height() ) {
<.*?><.*?> ret.push( e.result );
5245 <.*?>
< table.height() ) {
<.*?><.*?> }
5246  
5247 <.*?>
< table.height() ) {
<.*?><.*?> return ret;
5248 <.*?>
< table.height() ) {
<.*?><.*?> }
5249  
5250  
5251 <.*?>
< table.height() ) {
<.*?><.*?> function _fnLengthOverflow ( settings )
5252 <.*?>
< table.height() ) {
<.*?><.*?> {
5253 <.*?>
< table.height() ) {
<.*?><.*?> var
5254 <.*?>
< table.height() ) {
<.*?><.*?> start = settings._iDisplayStart,
5255 <.*?>
< table.height() ) {
<.*?><.*?> end = settings.fnDisplayEnd(),
5256 <.*?>
< table.height() ) {
<.*?><.*?> len = settings._iDisplayLength;
5257  
5258 <.*?>
< table.height() ) {
<.*?><.*?> /* If we have space to show extra rows (backing up from the end point - then do so */
5259 <.*?>
< table.height() ) {
<.*?><.*?> if ( start >= end )
5260 <.*?>
< table.height() ) {
<.*?><.*?> {
5261 <.*?>
< table.height() ) {
<.*?><.*?> start = end - len;
5262 <.*?>
< table.height() ) {
<.*?><.*?> }
5263  
5264 <.*?>
< table.height() ) {
<.*?><.*?> // Keep the start record on the current page
5265 <.*?>
< table.height() ) {
<.*?><.*?> start -= (start % len);
5266  
5267 <.*?>
< table.height() ) {
<.*?><.*?> if ( len === -1 || start < 0 )
5268 <.*?>
< table.height() ) {
<.*?><.*?> {
5269 <.*?>
< table.height() ) {
<.*?><.*?> start = 0;
5270 <.*?>
< table.height() ) {
<.*?><.*?> }
5271  
5272 <.*?>
< table.height() ) {
<.*?><.*?> settings._iDisplayStart = start;
5273 <.*?>
< table.height() ) {
<.*?><.*?> }
5274  
5275  
5276 <.*?>
< table.height() ) {
<.*?><.*?> function _fnRenderer( settings, type )
5277 <.*?>
< table.height() ) {
<.*?><.*?> {
5278 <.*?>
< table.height() ) {
<.*?><.*?> var renderer = settings.renderer;
5279 <.*?>
< table.height() ) {
<.*?><.*?> var host = DataTable.ext.renderer[type];
5280  
5281 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( renderer ) && renderer[type] ) {
5282 <.*?>
< table.height() ) {
<.*?><.*?> // Specific renderer for this type. If available use it, otherwise use
5283 <.*?>
< table.height() ) {
<.*?><.*?> // the default.
5284 <.*?>
< table.height() ) {
<.*?><.*?> return host[renderer[type]] || host._;
5285 <.*?>
< table.height() ) {
<.*?><.*?> }
5286 <.*?>
< table.height() ) {
<.*?><.*?> else if ( typeof renderer === 'string' ) {
5287 <.*?>
< table.height() ) {
<.*?><.*?> // Common renderer - if there is one available for this type use it,
5288 <.*?>
< table.height() ) {
<.*?><.*?> // otherwise use the default
5289 <.*?>
< table.height() ) {
<.*?><.*?> return host[renderer] || host._;
5290 <.*?>
< table.height() ) {
<.*?><.*?> }
5291  
5292 <.*?>
< table.height() ) {
<.*?><.*?> // Use the default
5293 <.*?>
< table.height() ) {
<.*?><.*?> return host._;
5294 <.*?>
< table.height() ) {
<.*?><.*?> }
5295  
5296  
5297 <.*?>
< table.height() ) {
<.*?><.*?> /**
5298 <.*?>
< table.height() ) {
<.*?><.*?> * Detect the data source being used for the table. Used to simplify the code
5299 <.*?>
< table.height() ) {
<.*?><.*?> * a little (ajax) and to make it compress a little smaller.
5300 <.*?>
< table.height() ) {
<.*?><.*?> *
5301 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings dataTables settings object
5302 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {string} Data source
5303 <.*?>
< table.height() ) {
<.*?><.*?> * @memberof DataTable#oApi
5304 <.*?>
< table.height() ) {
<.*?><.*?> */
5305 <.*?>
< table.height() ) {
<.*?><.*?> function _fnDataSource ( settings )
5306 <.*?>
< table.height() ) {
<.*?><.*?> {
5307 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings.oFeatures.bServerSide ) {
5308 <.*?>
< table.height() ) {
<.*?><.*?> return 'ssp';
5309 <.*?>
< table.height() ) {
<.*?><.*?> }
5310 <.*?>
< table.height() ) {
<.*?><.*?> else if ( settings.ajax || settings.sAjaxSource ) {
5311 <.*?>
< table.height() ) {
<.*?><.*?> return 'ajax';
5312 <.*?>
< table.height() ) {
<.*?><.*?> }
5313 <.*?>
< table.height() ) {
<.*?><.*?> return 'dom';
5314 <.*?>
< table.height() ) {
<.*?><.*?> }
5315  
5316  
5317 <.*?>
< table.height() ) {
<.*?><.*?> DataTable = function( options )
5318 <.*?>
< table.height() ) {
<.*?><.*?> {
5319 <.*?>
< table.height() ) {
<.*?><.*?> /**
5320 <.*?>
< table.height() ) {
<.*?><.*?> * Perform a jQuery selector action on the table's TR elements (from the tbody) and
5321 <.*?>
< table.height() ) {
<.*?><.*?> * return the resulting jQuery object.
5322 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
5323 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} [oOpts] Optional parameters for modifying the rows to be included
5324 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter
5325 <.*?>
< table.height() ) {
<.*?><.*?> * criterion ("applied") or all TR elements (i.e. no filter).
5326 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.
5327 <.*?>
< table.height() ) {
<.*?><.*?> * Can be either 'current', whereby the current sorting of the table is used, or
5328 <.*?>
< table.height() ) {
<.*?><.*?> * 'original' whereby the original order the data was read into the table is used.
5329 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
5330 <.*?>
< table.height() ) {
<.*?><.*?> * ("current") or not ("all"). If 'current' is given, then order is assumed to be
5331 <.*?>
< table.height() ) {
<.*?><.*?> * 'current' and filter is 'applied', regardless of what they might be given as.
5332 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {object} jQuery object, filtered by the given selector.
5333 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5334 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5335 <.*?>
< table.height() ) {
<.*?><.*?> *
5336 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5337 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5338 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5339 <.*?>
< table.height() ) {
<.*?><.*?> *
5340 <.*?>
< table.height() ) {
<.*?><.*?> * // Highlight every second row
5341 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.$('tr:odd').css('backgroundColor', 'blue');
5342 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5343 <.*?>
< table.height() ) {
<.*?><.*?> *
5344 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5345 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5346 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5347 <.*?>
< table.height() ) {
<.*?><.*?> *
5348 <.*?>
< table.height() ) {
<.*?><.*?> * // Filter to rows with 'Webkit' in them, add a background colour and then
5349 <.*?>
< table.height() ) {
<.*?><.*?> * // remove the filter, thus highlighting the 'Webkit' rows only.
5350 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnFilter('Webkit');
5351 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.$('tr', {"search": "applied"}).css('backgroundColor', 'blue');
5352 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnFilter('');
5353 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5354 <.*?>
< table.height() ) {
<.*?><.*?> */
5355 <.*?>
< table.height() ) {
<.*?><.*?> this.$ = function ( sSelector, oOpts )
5356 <.*?>
< table.height() ) {
<.*?><.*?> {
5357 <.*?>
< table.height() ) {
<.*?><.*?> return this.api(true).$( sSelector, oOpts );
5358 <.*?>
< table.height() ) {
<.*?><.*?> };
5359  
5360  
5361 <.*?>
< table.height() ) {
<.*?><.*?> /**
5362 <.*?>
< table.height() ) {
<.*?><.*?> * Almost identical to $ in operation, but in this case returns the data for the matched
5363 <.*?>
< table.height() ) {
<.*?><.*?> * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
5364 <.*?>
< table.height() ) {
<.*?><.*?> * rather than any descendants, so the data can be obtained for the row/cell. If matching
5365 <.*?>
< table.height() ) {
<.*?><.*?> * rows are found, the data returned is the original data array/object that was used to
5366 <.*?>
< table.height() ) {
<.*?><.*?> * create the row (or a generated array if from a DOM source).
5367 <.*?>
< table.height() ) {
<.*?><.*?> *
5368 <.*?>
< table.height() ) {
<.*?><.*?> * This method is often useful in-combination with $ where both functions are given the
5369 <.*?>
< table.height() ) {
<.*?><.*?> * same parameters and the array indexes will match identically.
5370 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
5371 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} [oOpts] Optional parameters for modifying the rows to be included
5372 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.filter=none] Select elements that meet the current filter
5373 <.*?>
< table.height() ) {
<.*?><.*?> * criterion ("applied") or all elements (i.e. no filter).
5374 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.order=current] Order of the data in the processed array.
5375 <.*?>
< table.height() ) {
<.*?><.*?> * Can be either 'current', whereby the current sorting of the table is used, or
5376 <.*?>
< table.height() ) {
<.*?><.*?> * 'original' whereby the original order the data was read into the table is used.
5377 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
5378 <.*?>
< table.height() ) {
<.*?><.*?> * ("current") or not ("all"). If 'current' is given, then order is assumed to be
5379 <.*?>
< table.height() ) {
<.*?><.*?> * 'current' and filter is 'applied', regardless of what they might be given as.
5380 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array} Data for the matched elements. If any elements, as a result of the
5381 <.*?>
< table.height() ) {
<.*?><.*?> * selector, were not TR, TD or TH elements in the DataTable, they will have a null
5382 <.*?>
< table.height() ) {
<.*?><.*?> * entry in the array.
5383 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5384 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5385 <.*?>
< table.height() ) {
<.*?><.*?> *
5386 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5387 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5388 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5389 <.*?>
< table.height() ) {
<.*?><.*?> *
5390 <.*?>
< table.height() ) {
<.*?><.*?> * // Get the data from the first row in the table
5391 <.*?>
< table.height() ) {
<.*?><.*?> * var data = oTable._('tr:first');
5392 <.*?>
< table.height() ) {
<.*?><.*?> *
5393 <.*?>
< table.height() ) {
<.*?><.*?> * // Do something useful with the data
5394 <.*?>
< table.height() ) {
<.*?><.*?> * alert( "First cell is: "+data[0] );
5395 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5396 <.*?>
< table.height() ) {
<.*?><.*?> *
5397 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5398 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5399 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5400 <.*?>
< table.height() ) {
<.*?><.*?> *
5401 <.*?>
< table.height() ) {
<.*?><.*?> * // Filter to 'Webkit' and get all data for
5402 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnFilter('Webkit');
5403 <.*?>
< table.height() ) {
<.*?><.*?> * var data = oTable._('tr', {"search": "applied"});
5404 <.*?>
< table.height() ) {
<.*?><.*?> *
5405 <.*?>
< table.height() ) {
<.*?><.*?> * // Do something with the data
5406 <.*?>
< table.height() ) {
<.*?><.*?> * alert( data.length+" rows matched the search" );
5407 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5408 <.*?>
< table.height() ) {
<.*?><.*?> */
5409 <.*?>
< table.height() ) {
<.*?><.*?> this._ = function ( sSelector, oOpts )
5410 <.*?>
< table.height() ) {
<.*?><.*?> {
5411 <.*?>
< table.height() ) {
<.*?><.*?> return this.api(true).rows( sSelector, oOpts ).data();
5412 <.*?>
< table.height() ) {
<.*?><.*?> };
5413  
5414  
5415 <.*?>
< table.height() ) {
<.*?><.*?> /**
5416 <.*?>
< table.height() ) {
<.*?><.*?> * Create a DataTables Api instance, with the currently selected tables for
5417 <.*?>
< table.height() ) {
<.*?><.*?> * the Api's context.
5418 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [traditional=false] Set the API instance's context to be
5419 <.*?>
< table.height() ) {
<.*?><.*?> * only the table referred to by the `DataTable.ext.iApiIndex` option, as was
5420 <.*?>
< table.height() ) {
<.*?><.*?> * used in the API presented by DataTables 1.9- (i.e. the traditional mode),
5421 <.*?>
< table.height() ) {
<.*?><.*?> * or if all tables captured in the jQuery object should be used.
5422 <.*?>
< table.height() ) {
<.*?><.*?> * @return {DataTables.Api}
5423 <.*?>
< table.height() ) {
<.*?><.*?> */
5424 <.*?>
< table.height() ) {
<.*?><.*?> this.api = function ( traditional )
5425 <.*?>
< table.height() ) {
<.*?><.*?> {
5426 <.*?>
< table.height() ) {
<.*?><.*?> return traditional ?
5427 <.*?>
< table.height() ) {
<.*?><.*?> new _Api(
5428 <.*?>
< table.height() ) {
<.*?><.*?> _fnSettingsFromNode( this[ _ext.iApiIndex ] )
5429 <.*?>
< table.height() ) {
<.*?><.*?> ) :
5430 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( this );
5431 <.*?>
< table.height() ) {
<.*?><.*?> };
5432  
5433  
5434 <.*?>
< table.height() ) {
<.*?><.*?> /**
5435 <.*?>
< table.height() ) {
<.*?><.*?> * Add a single new row or multiple rows of data to the table. Please note
5436 <.*?>
< table.height() ) {
<.*?><.*?> * that this is suitable for client-side processing only - if you are using
5437 <.*?>
< table.height() ) {
<.*?><.*?> * server-side processing (i.e. "bServerSide": true), then to add data, you
5438 <.*?>
< table.height() ) {
<.*?><.*?> * must add it to the data source, i.e. the server-side, through an Ajax call.
5439 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object} data The data to be added to the table. This can be:
5440 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
5441 <.*?>
< table.height() ) {
<.*?><.*?> * <li>1D array of data - add a single row with the data provided</li>
5442 <.*?>
< table.height() ) {
<.*?><.*?> * <li>2D array of arrays - add multiple rows in a single call</li>
5443 <.*?>
< table.height() ) {
<.*?><.*?> * <li>object - data object when using <i>mData</i></li>
5444 <.*?>
< table.height() ) {
<.*?><.*?> * <li>array of objects - multiple data objects when using <i>mData</i></li>
5445 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
5446 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [redraw=true] redraw the table or not
5447 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array} An array of integers, representing the list of indexes in
5448 <.*?>
< table.height() ) {
<.*?><.*?> * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to
5449 <.*?>
< table.height() ) {
<.*?><.*?> * the table.
5450 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5451 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5452 <.*?>
< table.height() ) {
<.*?><.*?> *
5453 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5454 <.*?>
< table.height() ) {
<.*?><.*?> * // Global var for counter
5455 <.*?>
< table.height() ) {
<.*?><.*?> * var giCount = 2;
5456 <.*?>
< table.height() ) {
<.*?><.*?> *
5457 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5458 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable();
5459 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5460 <.*?>
< table.height() ) {
<.*?><.*?> *
5461 <.*?>
< table.height() ) {
<.*?><.*?> * function fnClickAddRow() {
5462 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable().fnAddData( [
5463 <.*?>
< table.height() ) {
<.*?><.*?> * giCount+".1",
5464 <.*?>
< table.height() ) {
<.*?><.*?> * giCount+".2",
5465 <.*?>
< table.height() ) {
<.*?><.*?> * giCount+".3",
5466 <.*?>
< table.height() ) {
<.*?><.*?> * giCount+".4" ]
5467 <.*?>
< table.height() ) {
<.*?><.*?> * );
5468 <.*?>
< table.height() ) {
<.*?><.*?> *
5469 <.*?>
< table.height() ) {
<.*?><.*?> * giCount++;
5470 <.*?>
< table.height() ) {
<.*?><.*?> * }
5471 <.*?>
< table.height() ) {
<.*?><.*?> */
5472 <.*?>
< table.height() ) {
<.*?><.*?> this.fnAddData = function( data, redraw )
5473 <.*?>
< table.height() ) {
<.*?><.*?> {
5474 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5475  
5476 <.*?>
< table.height() ) {
<.*?><.*?> /* Check if we want to add multiple rows or not */
5477 <.*?>
< table.height() ) {
<.*?><.*?> var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
5478 <.*?>
< table.height() ) {
<.*?><.*?> api.rows.add( data ) :
5479 <.*?>
< table.height() ) {
<.*?><.*?> api.row.add( data );
5480  
5481 <.*?>
< table.height() ) {
<.*?><.*?> if ( redraw === undefined || redraw ) {
5482 <.*?>
< table.height() ) {
<.*?><.*?> api.draw();
5483 <.*?>
< table.height() ) {
<.*?><.*?> }
5484  
5485 <.*?>
< table.height() ) {
<.*?><.*?> return rows.flatten().toArray();
5486 <.*?>
< table.height() ) {
<.*?><.*?> };
5487  
5488  
5489 <.*?>
< table.height() ) {
<.*?><.*?> /**
5490 <.*?>
< table.height() ) {
<.*?><.*?> * This function will make DataTables recalculate the column sizes, based on the data
5491 <.*?>
< table.height() ) {
<.*?><.*?> * contained in the table and the sizes applied to the columns (in the DOM, CSS or
5492 <.*?>
< table.height() ) {
<.*?><.*?> * through the sWidth parameter). This can be useful when the width of the table's
5493 <.*?>
< table.height() ) {
<.*?><.*?> * parent element changes (for example a window resize).
5494 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to
5495 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5496 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5497 <.*?>
< table.height() ) {
<.*?><.*?> *
5498 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5499 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5500 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable( {
5501 <.*?>
< table.height() ) {
<.*?><.*?> * "sScrollY": "200px",
5502 <.*?>
< table.height() ) {
<.*?><.*?> * "bPaginate": false
5503 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5504 <.*?>
< table.height() ) {
<.*?><.*?> *
5505 <.*?>
< table.height() ) {
<.*?><.*?> * $(window).bind('resize', function () {
5506 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnAdjustColumnSizing();
5507 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5508 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5509 <.*?>
< table.height() ) {
<.*?><.*?> */
5510 <.*?>
< table.height() ) {
<.*?><.*?> this.fnAdjustColumnSizing = function ( bRedraw )
5511 <.*?>
< table.height() ) {
<.*?><.*?> {
5512 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true ).columns.adjust();
5513 <.*?>
< table.height() ) {
<.*?><.*?> var settings = api.settings()[0];
5514 <.*?>
< table.height() ) {
<.*?><.*?> var scroll = settings.oScroll;
5515  
5516 <.*?>
< table.height() ) {
<.*?><.*?> if ( bRedraw === undefined || bRedraw ) {
5517 <.*?>
< table.height() ) {
<.*?><.*?> api.draw( false );
5518 <.*?>
< table.height() ) {
<.*?><.*?> }
5519 <.*?>
< table.height() ) {
<.*?><.*?> else if ( scroll.sX !== "" || scroll.sY !== "" ) {
5520 <.*?>
< table.height() ) {
<.*?><.*?> /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */
5521 <.*?>
< table.height() ) {
<.*?><.*?> _fnScrollDraw( settings );
5522 <.*?>
< table.height() ) {
<.*?><.*?> }
5523 <.*?>
< table.height() ) {
<.*?><.*?> };
5524  
5525  
5526 <.*?>
< table.height() ) {
<.*?><.*?> /**
5527 <.*?>
< table.height() ) {
<.*?><.*?> * Quickly and simply clear a table
5528 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bRedraw=true] redraw the table or not
5529 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5530 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5531 <.*?>
< table.height() ) {
<.*?><.*?> *
5532 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5533 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5534 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5535 <.*?>
< table.height() ) {
<.*?><.*?> *
5536 <.*?>
< table.height() ) {
<.*?><.*?> * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
5537 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnClearTable();
5538 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5539 <.*?>
< table.height() ) {
<.*?><.*?> */
5540 <.*?>
< table.height() ) {
<.*?><.*?> this.fnClearTable = function( bRedraw )
5541 <.*?>
< table.height() ) {
<.*?><.*?> {
5542 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true ).clear();
5543  
5544 <.*?>
< table.height() ) {
<.*?><.*?> if ( bRedraw === undefined || bRedraw ) {
5545 <.*?>
< table.height() ) {
<.*?><.*?> api.draw();
5546 <.*?>
< table.height() ) {
<.*?><.*?> }
5547 <.*?>
< table.height() ) {
<.*?><.*?> };
5548  
5549  
5550 <.*?>
< table.height() ) {
<.*?><.*?> /**
5551 <.*?>
< table.height() ) {
<.*?><.*?> * The exact opposite of 'opening' a row, this function will close any rows which
5552 <.*?>
< table.height() ) {
<.*?><.*?> * are currently 'open'.
5553 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} nTr the table row to 'close'
5554 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {int} 0 on success, or 1 if failed (can't find the row)
5555 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5556 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5557 <.*?>
< table.height() ) {
<.*?><.*?> *
5558 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5559 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5560 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable;
5561 <.*?>
< table.height() ) {
<.*?><.*?> *
5562 <.*?>
< table.height() ) {
<.*?><.*?> * // 'open' an information row when a row is clicked on
5563 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example tbody tr').click( function () {
5564 <.*?>
< table.height() ) {
<.*?><.*?> * if ( oTable.fnIsOpen(this) ) {
5565 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnClose( this );
5566 <.*?>
< table.height() ) {
<.*?><.*?> * } else {
5567 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnOpen( this, "Temporary row opened", "info_row" );
5568 <.*?>
< table.height() ) {
<.*?><.*?> * }
5569 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5570 <.*?>
< table.height() ) {
<.*?><.*?> *
5571 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5572 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5573 <.*?>
< table.height() ) {
<.*?><.*?> */
5574 <.*?>
< table.height() ) {
<.*?><.*?> this.fnClose = function( nTr )
5575 <.*?>
< table.height() ) {
<.*?><.*?> {
5576 <.*?>
< table.height() ) {
<.*?><.*?> this.api( true ).row( nTr ).child.hide();
5577 <.*?>
< table.height() ) {
<.*?><.*?> };
5578  
5579  
5580 <.*?>
< table.height() ) {
<.*?><.*?> /**
5581 <.*?>
< table.height() ) {
<.*?><.*?> * Remove a row for the table
5582 <.*?>
< table.height() ) {
<.*?><.*?> * @param {mixed} target The index of the row from aoData to be deleted, or
5583 <.*?>
< table.height() ) {
<.*?><.*?> * the TR element you want to delete
5584 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function|null} [callBack] Callback function
5585 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [redraw=true] Redraw the table or not
5586 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array} The row that was deleted
5587 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5588 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5589 <.*?>
< table.height() ) {
<.*?><.*?> *
5590 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5591 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5592 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5593 <.*?>
< table.height() ) {
<.*?><.*?> *
5594 <.*?>
< table.height() ) {
<.*?><.*?> * // Immediately remove the first row
5595 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnDeleteRow( 0 );
5596 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5597 <.*?>
< table.height() ) {
<.*?><.*?> */
5598 <.*?>
< table.height() ) {
<.*?><.*?> this.fnDeleteRow = function( target, callback, redraw )
5599 <.*?>
< table.height() ) {
<.*?><.*?> {
5600 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5601 <.*?>
< table.height() ) {
<.*?><.*?> var rows = api.rows( target );
5602 <.*?>
< table.height() ) {
<.*?><.*?> var settings = rows.settings()[0];
5603 <.*?>
< table.height() ) {
<.*?><.*?> var data = settings.aoData[ rows[0][0] ];
5604  
5605 <.*?>
< table.height() ) {
<.*?><.*?> rows.remove();
5606  
5607 <.*?>
< table.height() ) {
<.*?><.*?> if ( callback ) {
5608 <.*?>
< table.height() ) {
<.*?><.*?> callback.call( this, settings, data );
5609 <.*?>
< table.height() ) {
<.*?><.*?> }
5610  
5611 <.*?>
< table.height() ) {
<.*?><.*?> if ( redraw === undefined || redraw ) {
5612 <.*?>
< table.height() ) {
<.*?><.*?> api.draw();
5613 <.*?>
< table.height() ) {
<.*?><.*?> }
5614  
5615 <.*?>
< table.height() ) {
<.*?><.*?> return data;
5616 <.*?>
< table.height() ) {
<.*?><.*?> };
5617  
5618  
5619 <.*?>
< table.height() ) {
<.*?><.*?> /**
5620 <.*?>
< table.height() ) {
<.*?><.*?> * Restore the table to it's original state in the DOM by removing all of DataTables
5621 <.*?>
< table.height() ) {
<.*?><.*?> * enhancements, alterations to the DOM structure of the table and event listeners.
5622 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [remove=false] Completely remove the table from the DOM
5623 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5624 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5625 <.*?>
< table.height() ) {
<.*?><.*?> *
5626 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5627 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5628 <.*?>
< table.height() ) {
<.*?><.*?> * // This example is fairly pointless in reality, but shows how fnDestroy can be used
5629 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5630 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnDestroy();
5631 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5632 <.*?>
< table.height() ) {
<.*?><.*?> */
5633 <.*?>
< table.height() ) {
<.*?><.*?> this.fnDestroy = function ( remove )
5634 <.*?>
< table.height() ) {
<.*?><.*?> {
5635 <.*?>
< table.height() ) {
<.*?><.*?> this.api( true ).destroy( remove );
5636 <.*?>
< table.height() ) {
<.*?><.*?> };
5637  
5638  
5639 <.*?>
< table.height() ) {
<.*?><.*?> /**
5640 <.*?>
< table.height() ) {
<.*?><.*?> * Redraw the table
5641 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw.
5642 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5643 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5644 <.*?>
< table.height() ) {
<.*?><.*?> *
5645 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5646 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5647 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5648 <.*?>
< table.height() ) {
<.*?><.*?> *
5649 <.*?>
< table.height() ) {
<.*?><.*?> * // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
5650 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnDraw();
5651 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5652 <.*?>
< table.height() ) {
<.*?><.*?> */
5653 <.*?>
< table.height() ) {
<.*?><.*?> this.fnDraw = function( complete )
5654 <.*?>
< table.height() ) {
<.*?><.*?> {
5655 <.*?>
< table.height() ) {
<.*?><.*?> // Note that this isn't an exact match to the old call to _fnDraw - it takes
5656 <.*?>
< table.height() ) {
<.*?><.*?> // into account the new data, but can hold position.
5657 <.*?>
< table.height() ) {
<.*?><.*?> this.api( true ).draw( complete );
5658 <.*?>
< table.height() ) {
<.*?><.*?> };
5659  
5660  
5661 <.*?>
< table.height() ) {
<.*?><.*?> /**
5662 <.*?>
< table.height() ) {
<.*?><.*?> * Filter the input based on data
5663 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sInput String to filter the table on
5664 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int|null} [iColumn] Column to limit filtering to
5665 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bRegex=false] Treat as regular expression or not
5666 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bSmart=true] Perform smart filtering or not
5667 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)
5668 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)
5669 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5670 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5671 <.*?>
< table.height() ) {
<.*?><.*?> *
5672 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5673 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5674 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5675 <.*?>
< table.height() ) {
<.*?><.*?> *
5676 <.*?>
< table.height() ) {
<.*?><.*?> * // Sometime later - filter...
5677 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnFilter( 'test string' );
5678 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5679 <.*?>
< table.height() ) {
<.*?><.*?> */
5680 <.*?>
< table.height() ) {
<.*?><.*?> this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )
5681 <.*?>
< table.height() ) {
<.*?><.*?> {
5682 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5683  
5684 <.*?>
< table.height() ) {
<.*?><.*?> if ( iColumn === null || iColumn === undefined ) {
5685 <.*?>
< table.height() ) {
<.*?><.*?> api.search( sInput, bRegex, bSmart, bCaseInsensitive );
5686 <.*?>
< table.height() ) {
<.*?><.*?> }
5687 <.*?>
< table.height() ) {
<.*?><.*?> else {
5688 <.*?>
< table.height() ) {
<.*?><.*?> api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive );
5689 <.*?>
< table.height() ) {
<.*?><.*?> }
5690  
5691 <.*?>
< table.height() ) {
<.*?><.*?> api.draw();
5692 <.*?>
< table.height() ) {
<.*?><.*?> };
5693  
5694  
5695 <.*?>
< table.height() ) {
<.*?><.*?> /**
5696 <.*?>
< table.height() ) {
<.*?><.*?> * Get the data for the whole table, an individual row or an individual cell based on the
5697 <.*?>
< table.height() ) {
<.*?><.*?> * provided parameters.
5698 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as
5699 <.*?>
< table.height() ) {
<.*?><.*?> * a TR node then the data source for the whole row will be returned. If given as a
5700 <.*?>
< table.height() ) {
<.*?><.*?> * TD/TH cell node then iCol will be automatically calculated and the data for the
5701 <.*?>
< table.height() ) {
<.*?><.*?> * cell returned. If given as an integer, then this is treated as the aoData internal
5702 <.*?>
< table.height() ) {
<.*?><.*?> * data index for the row (see fnGetPosition) and the data for that row used.
5703 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} [col] Optional column index that you want the data of.
5704 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array|object|string} If mRow is undefined, then the data for all rows is
5705 <.*?>
< table.height() ) {
<.*?><.*?> * returned. If mRow is defined, just data for that row, and is iCol is
5706 <.*?>
< table.height() ) {
<.*?><.*?> * defined, only data for the designated cell is returned.
5707 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5708 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5709 <.*?>
< table.height() ) {
<.*?><.*?> *
5710 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5711 <.*?>
< table.height() ) {
<.*?><.*?> * // Row data
5712 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5713 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5714 <.*?>
< table.height() ) {
<.*?><.*?> *
5715 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.$('tr').click( function () {
5716 <.*?>
< table.height() ) {
<.*?><.*?> * var data = oTable.fnGetData( this );
5717 <.*?>
< table.height() ) {
<.*?><.*?> * // ... do something with the array / object of data for the row
5718 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5719 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5720 <.*?>
< table.height() ) {
<.*?><.*?> *
5721 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5722 <.*?>
< table.height() ) {
<.*?><.*?> * // Individual cell data
5723 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5724 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5725 <.*?>
< table.height() ) {
<.*?><.*?> *
5726 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.$('td').click( function () {
5727 <.*?>
< table.height() ) {
<.*?><.*?> * var sData = oTable.fnGetData( this );
5728 <.*?>
< table.height() ) {
<.*?><.*?> * alert( 'The cell clicked on had the value of '+sData );
5729 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5730 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5731 <.*?>
< table.height() ) {
<.*?><.*?> */
5732 <.*?>
< table.height() ) {
<.*?><.*?> this.fnGetData = function( src, col )
5733 <.*?>
< table.height() ) {
<.*?><.*?> {
5734 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5735  
5736 <.*?>
< table.height() ) {
<.*?><.*?> if ( src !== undefined ) {
5737 <.*?>
< table.height() ) {
<.*?><.*?> var type = src.nodeName ? src.nodeName.toLowerCase() : '';
5738  
5739 <.*?>
< table.height() ) {
<.*?><.*?> return col !== undefined || type == 'td' || type == 'th' ?
5740 <.*?>
< table.height() ) {
<.*?><.*?> api.cell( src, col ).data() :
5741 <.*?>
< table.height() ) {
<.*?><.*?> api.row( src ).data() || null;
5742 <.*?>
< table.height() ) {
<.*?><.*?> }
5743  
5744 <.*?>
< table.height() ) {
<.*?><.*?> return api.data().toArray();
5745 <.*?>
< table.height() ) {
<.*?><.*?> };
5746  
5747  
5748 <.*?>
< table.height() ) {
<.*?><.*?> /**
5749 <.*?>
< table.height() ) {
<.*?><.*?> * Get an array of the TR nodes that are used in the table's body. Note that you will
5750 <.*?>
< table.height() ) {
<.*?><.*?> * typically want to use the '$' API method in preference to this as it is more
5751 <.*?>
< table.height() ) {
<.*?><.*?> * flexible.
5752 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} [iRow] Optional row index for the TR element you want
5753 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array|node} If iRow is undefined, returns an array of all TR elements
5754 <.*?>
< table.height() ) {
<.*?><.*?> * in the table's body, or iRow is defined, just the TR element requested.
5755 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5756 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5757 <.*?>
< table.height() ) {
<.*?><.*?> *
5758 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5759 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5760 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5761 <.*?>
< table.height() ) {
<.*?><.*?> *
5762 <.*?>
< table.height() ) {
<.*?><.*?> * // Get the nodes from the table
5763 <.*?>
< table.height() ) {
<.*?><.*?> * var nNodes = oTable.fnGetNodes( );
5764 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5765 <.*?>
< table.height() ) {
<.*?><.*?> */
5766 <.*?>
< table.height() ) {
<.*?><.*?> this.fnGetNodes = function( iRow )
5767 <.*?>
< table.height() ) {
<.*?><.*?> {
5768 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5769  
5770 <.*?>
< table.height() ) {
<.*?><.*?> return iRow !== undefined ?
5771 <.*?>
< table.height() ) {
<.*?><.*?> api.row( iRow ).node() :
5772 <.*?>
< table.height() ) {
<.*?><.*?> api.rows().nodes().flatten().toArray();
5773 <.*?>
< table.height() ) {
<.*?><.*?> };
5774  
5775  
5776 <.*?>
< table.height() ) {
<.*?><.*?> /**
5777 <.*?>
< table.height() ) {
<.*?><.*?> * Get the array indexes of a particular cell from it's DOM element
5778 <.*?>
< table.height() ) {
<.*?><.*?> * and column index including hidden columns
5779 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} node this can either be a TR, TD or TH in the table's body
5780 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {int} If nNode is given as a TR, then a single index is returned, or
5781 <.*?>
< table.height() ) {
<.*?><.*?> * if given as a cell, an array of [row index, column index (visible),
5782 <.*?>
< table.height() ) {
<.*?><.*?> * column index (all)] is given.
5783 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5784 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5785 <.*?>
< table.height() ) {
<.*?><.*?> *
5786 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5787 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5788 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example tbody td').click( function () {
5789 <.*?>
< table.height() ) {
<.*?><.*?> * // Get the position of the current data from the node
5790 <.*?>
< table.height() ) {
<.*?><.*?> * var aPos = oTable.fnGetPosition( this );
5791 <.*?>
< table.height() ) {
<.*?><.*?> *
5792 <.*?>
< table.height() ) {
<.*?><.*?> * // Get the data array for this row
5793 <.*?>
< table.height() ) {
<.*?><.*?> * var aData = oTable.fnGetData( aPos[0] );
5794 <.*?>
< table.height() ) {
<.*?><.*?> *
5795 <.*?>
< table.height() ) {
<.*?><.*?> * // Update the data array and return the value
5796 <.*?>
< table.height() ) {
<.*?><.*?> * aData[ aPos[1] ] = 'clicked';
5797 <.*?>
< table.height() ) {
<.*?><.*?> * this.innerHTML = 'clicked';
5798 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5799 <.*?>
< table.height() ) {
<.*?><.*?> *
5800 <.*?>
< table.height() ) {
<.*?><.*?> * // Init DataTables
5801 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5802 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5803 <.*?>
< table.height() ) {
<.*?><.*?> */
5804 <.*?>
< table.height() ) {
<.*?><.*?> this.fnGetPosition = function( node )
5805 <.*?>
< table.height() ) {
<.*?><.*?> {
5806 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
5807 <.*?>
< table.height() ) {
<.*?><.*?> var nodeName = node.nodeName.toUpperCase();
5808  
5809 <.*?>
< table.height() ) {
<.*?><.*?> if ( nodeName == 'TR' ) {
5810 <.*?>
< table.height() ) {
<.*?><.*?> return api.row( node ).index();
5811 <.*?>
< table.height() ) {
<.*?><.*?> }
5812 <.*?>
< table.height() ) {
<.*?><.*?> else if ( nodeName == 'TD' || nodeName == 'TH' ) {
5813 <.*?>
< table.height() ) {
<.*?><.*?> var cell = api.cell( node ).index();
5814  
5815 <.*?>
< table.height() ) {
<.*?><.*?> return [
5816 <.*?>
< table.height() ) {
<.*?><.*?> cell.row,
5817 <.*?>
< table.height() ) {
<.*?><.*?> cell.columnVisible,
5818 <.*?>
< table.height() ) {
<.*?><.*?> cell.column
5819 <.*?>
< table.height() ) {
<.*?><.*?> ];
5820 <.*?>
< table.height() ) {
<.*?><.*?> }
5821 <.*?>
< table.height() ) {
<.*?><.*?> return null;
5822 <.*?>
< table.height() ) {
<.*?><.*?> };
5823  
5824  
5825 <.*?>
< table.height() ) {
<.*?><.*?> /**
5826 <.*?>
< table.height() ) {
<.*?><.*?> * Check to see if a row is 'open' or not.
5827 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} nTr the table row to check
5828 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {boolean} true if the row is currently open, false otherwise
5829 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5830 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5831 <.*?>
< table.height() ) {
<.*?><.*?> *
5832 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5833 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5834 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable;
5835 <.*?>
< table.height() ) {
<.*?><.*?> *
5836 <.*?>
< table.height() ) {
<.*?><.*?> * // 'open' an information row when a row is clicked on
5837 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example tbody tr').click( function () {
5838 <.*?>
< table.height() ) {
<.*?><.*?> * if ( oTable.fnIsOpen(this) ) {
5839 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnClose( this );
5840 <.*?>
< table.height() ) {
<.*?><.*?> * } else {
5841 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnOpen( this, "Temporary row opened", "info_row" );
5842 <.*?>
< table.height() ) {
<.*?><.*?> * }
5843 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5844 <.*?>
< table.height() ) {
<.*?><.*?> *
5845 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5846 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5847 <.*?>
< table.height() ) {
<.*?><.*?> */
5848 <.*?>
< table.height() ) {
<.*?><.*?> this.fnIsOpen = function( nTr )
5849 <.*?>
< table.height() ) {
<.*?><.*?> {
5850 <.*?>
< table.height() ) {
<.*?><.*?> return this.api( true ).row( nTr ).child.isShown();
5851 <.*?>
< table.height() ) {
<.*?><.*?> };
5852  
5853  
5854 <.*?>
< table.height() ) {
<.*?><.*?> /**
5855 <.*?>
< table.height() ) {
<.*?><.*?> * This function will place a new row directly after a row which is currently
5856 <.*?>
< table.height() ) {
<.*?><.*?> * on display on the page, with the HTML contents that is passed into the
5857 <.*?>
< table.height() ) {
<.*?><.*?> * function. This can be used, for example, to ask for confirmation that a
5858 <.*?>
< table.height() ) {
<.*?><.*?> * particular record should be deleted.
5859 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} nTr The table row to 'open'
5860 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|node|jQuery} mHtml The HTML to put into the row
5861 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sClass Class to give the new TD cell
5862 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {node} The row opened. Note that if the table row passed in as the
5863 <.*?>
< table.height() ) {
<.*?><.*?> * first parameter, is not found in the table, this method will silently
5864 <.*?>
< table.height() ) {
<.*?><.*?> * return.
5865 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5866 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5867 <.*?>
< table.height() ) {
<.*?><.*?> *
5868 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5869 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5870 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable;
5871 <.*?>
< table.height() ) {
<.*?><.*?> *
5872 <.*?>
< table.height() ) {
<.*?><.*?> * // 'open' an information row when a row is clicked on
5873 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example tbody tr').click( function () {
5874 <.*?>
< table.height() ) {
<.*?><.*?> * if ( oTable.fnIsOpen(this) ) {
5875 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnClose( this );
5876 <.*?>
< table.height() ) {
<.*?><.*?> * } else {
5877 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnOpen( this, "Temporary row opened", "info_row" );
5878 <.*?>
< table.height() ) {
<.*?><.*?> * }
5879 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5880 <.*?>
< table.height() ) {
<.*?><.*?> *
5881 <.*?>
< table.height() ) {
<.*?><.*?> * oTable = $('#example').dataTable();
5882 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5883 <.*?>
< table.height() ) {
<.*?><.*?> */
5884 <.*?>
< table.height() ) {
<.*?><.*?> this.fnOpen = function( nTr, mHtml, sClass )
5885 <.*?>
< table.height() ) {
<.*?><.*?> {
5886 <.*?>
< table.height() ) {
<.*?><.*?> return this.api( true )
5887 <.*?>
< table.height() ) {
<.*?><.*?> .row( nTr )
5888 <.*?>
< table.height() ) {
<.*?><.*?> .child( mHtml, sClass )
5889 <.*?>
< table.height() ) {
<.*?><.*?> .show()
5890 <.*?>
< table.height() ) {
<.*?><.*?> .child()[0];
5891 <.*?>
< table.height() ) {
<.*?><.*?> };
5892  
5893  
5894 <.*?>
< table.height() ) {
<.*?><.*?> /**
5895 <.*?>
< table.height() ) {
<.*?><.*?> * Change the pagination - provides the internal logic for pagination in a simple API
5896 <.*?>
< table.height() ) {
<.*?><.*?> * function. With this function you can have a DataTables table go to the next,
5897 <.*?>
< table.height() ) {
<.*?><.*?> * previous, first or last pages.
5898 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
5899 <.*?>
< table.height() ) {
<.*?><.*?> * or page number to jump to (integer), note that page 0 is the first page.
5900 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bRedraw=true] Redraw the table or not
5901 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5902 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5903 <.*?>
< table.height() ) {
<.*?><.*?> *
5904 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5905 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5906 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5907 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnPageChange( 'next' );
5908 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5909 <.*?>
< table.height() ) {
<.*?><.*?> */
5910 <.*?>
< table.height() ) {
<.*?><.*?> this.fnPageChange = function ( mAction, bRedraw )
5911 <.*?>
< table.height() ) {
<.*?><.*?> {
5912 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true ).page( mAction );
5913  
5914 <.*?>
< table.height() ) {
<.*?><.*?> if ( bRedraw === undefined || bRedraw ) {
5915 <.*?>
< table.height() ) {
<.*?><.*?> api.draw(false);
5916 <.*?>
< table.height() ) {
<.*?><.*?> }
5917 <.*?>
< table.height() ) {
<.*?><.*?> };
5918  
5919  
5920 <.*?>
< table.height() ) {
<.*?><.*?> /**
5921 <.*?>
< table.height() ) {
<.*?><.*?> * Show a particular column
5922 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} iCol The column whose display should be changed
5923 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} bShow Show (true) or hide (false) the column
5924 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bRedraw=true] Redraw the table or not
5925 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5926 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5927 <.*?>
< table.height() ) {
<.*?><.*?> *
5928 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5929 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5930 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5931 <.*?>
< table.height() ) {
<.*?><.*?> *
5932 <.*?>
< table.height() ) {
<.*?><.*?> * // Hide the second column after initialisation
5933 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnSetColumnVis( 1, false );
5934 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5935 <.*?>
< table.height() ) {
<.*?><.*?> */
5936 <.*?>
< table.height() ) {
<.*?><.*?> this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
5937 <.*?>
< table.height() ) {
<.*?><.*?> {
5938 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true ).column( iCol ).visible( bShow );
5939  
5940 <.*?>
< table.height() ) {
<.*?><.*?> if ( bRedraw === undefined || bRedraw ) {
5941 <.*?>
< table.height() ) {
<.*?><.*?> api.columns.adjust().draw();
5942 <.*?>
< table.height() ) {
<.*?><.*?> }
5943 <.*?>
< table.height() ) {
<.*?><.*?> };
5944  
5945  
5946 <.*?>
< table.height() ) {
<.*?><.*?> /**
5947 <.*?>
< table.height() ) {
<.*?><.*?> * Get the settings for a particular table for external manipulation
5948 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {object} DataTables settings object. See
5949 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.models.oSettings}
5950 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5951 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5952 <.*?>
< table.height() ) {
<.*?><.*?> *
5953 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5954 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5955 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5956 <.*?>
< table.height() ) {
<.*?><.*?> * var oSettings = oTable.fnSettings();
5957 <.*?>
< table.height() ) {
<.*?><.*?> *
5958 <.*?>
< table.height() ) {
<.*?><.*?> * // Show an example parameter from the settings
5959 <.*?>
< table.height() ) {
<.*?><.*?> * alert( oSettings._iDisplayStart );
5960 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5961 <.*?>
< table.height() ) {
<.*?><.*?> */
5962 <.*?>
< table.height() ) {
<.*?><.*?> this.fnSettings = function()
5963 <.*?>
< table.height() ) {
<.*?><.*?> {
5964 <.*?>
< table.height() ) {
<.*?><.*?> return _fnSettingsFromNode( this[_ext.iApiIndex] );
5965 <.*?>
< table.height() ) {
<.*?><.*?> };
5966  
5967  
5968 <.*?>
< table.height() ) {
<.*?><.*?> /**
5969 <.*?>
< table.height() ) {
<.*?><.*?> * Sort the table by a particular column
5970 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} iCol the data index to sort on. Note that this will not match the
5971 <.*?>
< table.height() ) {
<.*?><.*?> * 'display index' if you have hidden data entries
5972 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5973 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5974 <.*?>
< table.height() ) {
<.*?><.*?> *
5975 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5976 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5977 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
5978 <.*?>
< table.height() ) {
<.*?><.*?> *
5979 <.*?>
< table.height() ) {
<.*?><.*?> * // Sort immediately with columns 0 and 1
5980 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
5981 <.*?>
< table.height() ) {
<.*?><.*?> * } );
5982 <.*?>
< table.height() ) {
<.*?><.*?> */
5983 <.*?>
< table.height() ) {
<.*?><.*?> this.fnSort = function( aaSort )
5984 <.*?>
< table.height() ) {
<.*?><.*?> {
5985 <.*?>
< table.height() ) {
<.*?><.*?> this.api( true ).order( aaSort ).draw();
5986 <.*?>
< table.height() ) {
<.*?><.*?> };
5987  
5988  
5989 <.*?>
< table.height() ) {
<.*?><.*?> /**
5990 <.*?>
< table.height() ) {
<.*?><.*?> * Attach a sort listener to an element for a given column
5991 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} nNode the element to attach the sort listener to
5992 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} iColumn the column that a click on this node will sort on
5993 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} [fnCallback] callback function when sort is run
5994 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
5995 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
5996 <.*?>
< table.height() ) {
<.*?><.*?> *
5997 <.*?>
< table.height() ) {
<.*?><.*?> * @example
5998 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
5999 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
6000 <.*?>
< table.height() ) {
<.*?><.*?> *
6001 <.*?>
< table.height() ) {
<.*?><.*?> * // Sort on column 1, when 'sorter' is clicked on
6002 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnSortListener( document.getElementById('sorter'), 1 );
6003 <.*?>
< table.height() ) {
<.*?><.*?> * } );
6004 <.*?>
< table.height() ) {
<.*?><.*?> */
6005 <.*?>
< table.height() ) {
<.*?><.*?> this.fnSortListener = function( nNode, iColumn, fnCallback )
6006 <.*?>
< table.height() ) {
<.*?><.*?> {
6007 <.*?>
< table.height() ) {
<.*?><.*?> this.api( true ).order.listener( nNode, iColumn, fnCallback );
6008 <.*?>
< table.height() ) {
<.*?><.*?> };
6009  
6010  
6011 <.*?>
< table.height() ) {
<.*?><.*?> /**
6012 <.*?>
< table.height() ) {
<.*?><.*?> * Update a table cell or row - this method will accept either a single value to
6013 <.*?>
< table.height() ) {
<.*?><.*?> * update the cell with, an array of values with one element for each column or
6014 <.*?>
< table.height() ) {
<.*?><.*?> * an object in the same format as the original data source. The function is
6015 <.*?>
< table.height() ) {
<.*?><.*?> * self-referencing in order to make the multi column updates easier.
6016 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object|array|string} mData Data to update the cell/row with
6017 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node|int} mRow TR element you want to update or the aoData index
6018 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} [iColumn] The column to update, give as null or undefined to
6019 <.*?>
< table.height() ) {
<.*?><.*?> * update a whole row.
6020 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bRedraw=true] Redraw the table or not
6021 <.*?>
< table.height() ) {
<.*?><.*?> * @param {bool} [bAction=true] Perform pre-draw actions or not
6022 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {int} 0 on success, 1 on error
6023 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
6024 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
6025 <.*?>
< table.height() ) {
<.*?><.*?> *
6026 <.*?>
< table.height() ) {
<.*?><.*?> * @example
6027 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
6028 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
6029 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
6030 <.*?>
< table.height() ) {
<.*?><.*?> * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row
6031 <.*?>
< table.height() ) {
<.*?><.*?> * } );
6032 <.*?>
< table.height() ) {
<.*?><.*?> */
6033 <.*?>
< table.height() ) {
<.*?><.*?> this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
6034 <.*?>
< table.height() ) {
<.*?><.*?> {
6035 <.*?>
< table.height() ) {
<.*?><.*?> var api = this.api( true );
6036  
6037 <.*?>
< table.height() ) {
<.*?><.*?> if ( iColumn === undefined || iColumn === null ) {
6038 <.*?>
< table.height() ) {
<.*?><.*?> api.row( mRow ).data( mData );
6039 <.*?>
< table.height() ) {
<.*?><.*?> }
6040 <.*?>
< table.height() ) {
<.*?><.*?> else {
6041 <.*?>
< table.height() ) {
<.*?><.*?> api.cell( mRow, iColumn ).data( mData );
6042 <.*?>
< table.height() ) {
<.*?><.*?> }
6043  
6044 <.*?>
< table.height() ) {
<.*?><.*?> if ( bAction === undefined || bAction ) {
6045 <.*?>
< table.height() ) {
<.*?><.*?> api.columns.adjust();
6046 <.*?>
< table.height() ) {
<.*?><.*?> }
6047  
6048 <.*?>
< table.height() ) {
<.*?><.*?> if ( bRedraw === undefined || bRedraw ) {
6049 <.*?>
< table.height() ) {
<.*?><.*?> api.draw();
6050 <.*?>
< table.height() ) {
<.*?><.*?> }
6051 <.*?>
< table.height() ) {
<.*?><.*?> return 0;
6052 <.*?>
< table.height() ) {
<.*?><.*?> };
6053  
6054  
6055 <.*?>
< table.height() ) {
<.*?><.*?> /**
6056 <.*?>
< table.height() ) {
<.*?><.*?> * Provide a common method for plug-ins to check the version of DataTables being used, in order
6057 <.*?>
< table.height() ) {
<.*?><.*?> * to ensure compatibility.
6058 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
6059 <.*?>
< table.height() ) {
<.*?><.*?> * formats "X" and "X.Y" are also acceptable.
6060 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {boolean} true if this version of DataTables is greater or equal to the required
6061 <.*?>
< table.height() ) {
<.*?><.*?> * version, or false if this version of DataTales is not suitable
6062 <.*?>
< table.height() ) {
<.*?><.*?> * @method
6063 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API
6064 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
6065 <.*?>
< table.height() ) {
<.*?><.*?> *
6066 <.*?>
< table.height() ) {
<.*?><.*?> * @example
6067 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready(function() {
6068 <.*?>
< table.height() ) {
<.*?><.*?> * var oTable = $('#example').dataTable();
6069 <.*?>
< table.height() ) {
<.*?><.*?> * alert( oTable.fnVersionCheck( '1.9.0' ) );
6070 <.*?>
< table.height() ) {
<.*?><.*?> * } );
6071 <.*?>
< table.height() ) {
<.*?><.*?> */
6072 <.*?>
< table.height() ) {
<.*?><.*?> this.fnVersionCheck = _ext.fnVersionCheck;
6073  
6074  
6075 <.*?>
< table.height() ) {
<.*?><.*?> var _that = this;
6076 <.*?>
< table.height() ) {
<.*?><.*?> var emptyInit = options === undefined;
6077 <.*?>
< table.height() ) {
<.*?><.*?> var len = this.length;
6078  
6079 <.*?>
< table.height() ) {
<.*?><.*?> if ( emptyInit ) {
6080 <.*?>
< table.height() ) {
<.*?><.*?> options = {};
6081 <.*?>
< table.height() ) {
<.*?><.*?> }
6082  
6083 <.*?>
< table.height() ) {
<.*?><.*?> this.oApi = this.internal = _ext.internal;
6084  
6085 <.*?>
< table.height() ) {
<.*?><.*?> // Extend with old style plug-in API methods
6086 <.*?>
< table.height() ) {
<.*?><.*?> for ( var fn in DataTable.ext.internal ) {
6087 <.*?>
< table.height() ) {
<.*?><.*?> if ( fn ) {
6088 <.*?>
< table.height() ) {
<.*?><.*?> this[fn] = _fnExternApiFunc(fn);
6089 <.*?>
< table.height() ) {
<.*?><.*?> }
6090 <.*?>
< table.height() ) {
<.*?><.*?> }
6091  
6092 <.*?>
< table.height() ) {
<.*?><.*?> this.each(function() {
6093 <.*?>
< table.height() ) {
<.*?><.*?> // For each initialisation we want to give it a clean initialisation
6094 <.*?>
< table.height() ) {
<.*?><.*?> // object that can be bashed around
6095 <.*?>
< table.height() ) {
<.*?><.*?> var o = {};
6096 <.*?>
< table.height() ) {
<.*?><.*?> var oInit = len > 1 ? // optimisation for single table case
6097 <.*?>
< table.height() ) {
<.*?><.*?> _fnExtend( o, options, true ) :
6098 <.*?>
< table.height() ) {
<.*?><.*?> options;
6099  
6100 <.*?>
< table.height() ) {
<.*?><.*?> /*global oInit,_that,emptyInit*/
6101 <.*?>
< table.height() ) {
<.*?><.*?> var i=0, iLen, j, jLen, k, kLen;
6102 <.*?>
< table.height() ) {
<.*?><.*?> var sId = this.getAttribute( 'id' );
6103 <.*?>
< table.height() ) {
<.*?><.*?> var bInitHandedOff = false;
6104 <.*?>
< table.height() ) {
<.*?><.*?> var defaults = DataTable.defaults;
6105 <.*?>
< table.height() ) {
<.*?><.*?> var $this = $(this);
6106  
6107  
6108 <.*?>
< table.height() ) {
<.*?><.*?> /* Sanity check */
6109 <.*?>
< table.height() ) {
<.*?><.*?> if ( this.nodeName.toLowerCase() != 'table' )
6110 <.*?>
< table.height() ) {
<.*?><.*?> {
6111 <.*?>
< table.height() ) {
<.*?><.*?> _fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );
6112 <.*?>
< table.height() ) {
<.*?><.*?> return;
6113 <.*?>
< table.height() ) {
<.*?><.*?> }
6114  
6115 <.*?>
< table.height() ) {
<.*?><.*?> /* Backwards compatibility for the defaults */
6116 <.*?>
< table.height() ) {
<.*?><.*?> _fnCompatOpts( defaults );
6117 <.*?>
< table.height() ) {
<.*?><.*?> _fnCompatCols( defaults.column );
6118  
6119 <.*?>
< table.height() ) {
<.*?><.*?> /* Convert the camel-case defaults to Hungarian */
6120 <.*?>
< table.height() ) {
<.*?><.*?> _fnCamelToHungarian( defaults, defaults, true );
6121 <.*?>
< table.height() ) {
<.*?><.*?> _fnCamelToHungarian( defaults.column, defaults.column, true );
6122  
6123 <.*?>
< table.height() ) {
<.*?><.*?> /* Setting up the initialisation object */
6124 <.*?>
< table.height() ) {
<.*?><.*?> _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) );
6125  
6126  
6127  
6128 <.*?>
< table.height() ) {
<.*?><.*?> /* Check to see if we are re-initialising a table */
6129 <.*?>
< table.height() ) {
<.*?><.*?> var allSettings = DataTable.settings;
6130 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, iLen=allSettings.length ; i<iLen ; i++ )
6131 <.*?>
< table.height() ) {
<.*?><.*?> {
6132 <.*?>
< table.height() ) {
<.*?><.*?> var s = allSettings[i];
6133  
6134 <.*?>
< table.height() ) {
<.*?><.*?> /* Base check on table node */
6135 <.*?>
< table.height() ) {
<.*?><.*?> if ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) )
6136 <.*?>
< table.height() ) {
<.*?><.*?> {
6137 <.*?>
< table.height() ) {
<.*?><.*?> var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;
6138 <.*?>
< table.height() ) {
<.*?><.*?> var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;
6139  
6140 <.*?>
< table.height() ) {
<.*?><.*?> if ( emptyInit || bRetrieve )
6141 <.*?>
< table.height() ) {
<.*?><.*?> {
6142 <.*?>
< table.height() ) {
<.*?><.*?> return s.oInstance;
6143 <.*?>
< table.height() ) {
<.*?><.*?> }
6144 <.*?>
< table.height() ) {
<.*?><.*?> else if ( bDestroy )
6145 <.*?>
< table.height() ) {
<.*?><.*?> {
6146 <.*?>
< table.height() ) {
<.*?><.*?> s.oInstance.fnDestroy();
6147 <.*?>
< table.height() ) {
<.*?><.*?> break;
6148 <.*?>
< table.height() ) {
<.*?><.*?> }
6149 <.*?>
< table.height() ) {
<.*?><.*?> else
6150 <.*?>
< table.height() ) {
<.*?><.*?> {
6151 <.*?>
< table.height() ) {
<.*?><.*?> _fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );
6152 <.*?>
< table.height() ) {
<.*?><.*?> return;
6153 <.*?>
< table.height() ) {
<.*?><.*?> }
6154 <.*?>
< table.height() ) {
<.*?><.*?> }
6155  
6156 <.*?>
< table.height() ) {
<.*?><.*?> /* If the element we are initialising has the same ID as a table which was previously
6157 <.*?>
< table.height() ) {
<.*?><.*?> * initialised, but the table nodes don't match (from before) then we destroy the old
6158 <.*?>
< table.height() ) {
<.*?><.*?> * instance by simply deleting it. This is under the assumption that the table has been
6159 <.*?>
< table.height() ) {
<.*?><.*?> * destroyed by other methods. Anyone using non-id selectors will need to do this manually
6160 <.*?>
< table.height() ) {
<.*?><.*?> */
6161 <.*?>
< table.height() ) {
<.*?><.*?> if ( s.sTableId == this.id )
6162 <.*?>
< table.height() ) {
<.*?><.*?> {
6163 <.*?>
< table.height() ) {
<.*?><.*?> allSettings.splice( i, 1 );
6164 <.*?>
< table.height() ) {
<.*?><.*?> break;
6165 <.*?>
< table.height() ) {
<.*?><.*?> }
6166 <.*?>
< table.height() ) {
<.*?><.*?> }
6167  
6168 <.*?>
< table.height() ) {
<.*?><.*?> /* Ensure the table has an ID - required for accessibility */
6169 <.*?>
< table.height() ) {
<.*?><.*?> if ( sId === null || sId === "" )
6170 <.*?>
< table.height() ) {
<.*?><.*?> {
6171 <.*?>
< table.height() ) {
<.*?><.*?> sId = "DataTables_Table_"+(DataTable.ext._unique++);
6172 <.*?>
< table.height() ) {
<.*?><.*?> this.id = sId;
6173 <.*?>
< table.height() ) {
<.*?><.*?> }
6174  
6175 <.*?>
< table.height() ) {
<.*?><.*?> /* Create the settings object for this table and set some of the default parameters */
6176 <.*?>
< table.height() ) {
<.*?><.*?> var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
6177 <.*?>
< table.height() ) {
<.*?><.*?> "sDestroyWidth": $this[0].style.width,
6178 <.*?>
< table.height() ) {
<.*?><.*?> "sInstance": sId,
6179 <.*?>
< table.height() ) {
<.*?><.*?> "sTableId": sId
6180 <.*?>
< table.height() ) {
<.*?><.*?> } );
6181 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.nTable = this;
6182 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.oApi = _that.internal;
6183 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.oInit = oInit;
6184  
6185 <.*?>
< table.height() ) {
<.*?><.*?> allSettings.push( oSettings );
6186  
6187 <.*?>
< table.height() ) {
<.*?><.*?> // Need to add the instance after the instance after the settings object has been added
6188 <.*?>
< table.height() ) {
<.*?><.*?> // to the settings array, so we can self reference the table instance if more than one
6189 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();
6190  
6191 <.*?>
< table.height() ) {
<.*?><.*?> // Backwards compatibility, before we apply all the defaults
6192 <.*?>
< table.height() ) {
<.*?><.*?> _fnCompatOpts( oInit );
6193  
6194 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.oLanguage )
6195 <.*?>
< table.height() ) {
<.*?><.*?> {
6196 <.*?>
< table.height() ) {
<.*?><.*?> _fnLanguageCompat( oInit.oLanguage );
6197 <.*?>
< table.height() ) {
<.*?><.*?> }
6198  
6199 <.*?>
< table.height() ) {
<.*?><.*?> // If the length menu is given, but the init display length is not, use the length menu
6200 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
6201 <.*?>
< table.height() ) {
<.*?><.*?> {
6202 <.*?>
< table.height() ) {
<.*?><.*?> oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
6203 <.*?>
< table.height() ) {
<.*?><.*?> oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
6204 <.*?>
< table.height() ) {
<.*?><.*?> }
6205  
6206 <.*?>
< table.height() ) {
<.*?><.*?> // Apply the defaults and init options to make a single init object will all
6207 <.*?>
< table.height() ) {
<.*?><.*?> // options defined from defaults and instance options.
6208 <.*?>
< table.height() ) {
<.*?><.*?> oInit = _fnExtend( $.extend( true, {}, defaults ), oInit );
6209  
6210  
6211 <.*?>
< table.height() ) {
<.*?><.*?> // Map the initialisation options onto the settings object
6212 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( oSettings.oFeatures, oInit, [
6213 <.*?>
< table.height() ) {
<.*?><.*?> "bPaginate",
6214 <.*?>
< table.height() ) {
<.*?><.*?> "bLengthChange",
6215 <.*?>
< table.height() ) {
<.*?><.*?> "bFilter",
6216 <.*?>
< table.height() ) {
<.*?><.*?> "bSort",
6217 <.*?>
< table.height() ) {
<.*?><.*?> "bSortMulti",
6218 <.*?>
< table.height() ) {
<.*?><.*?> "bInfo",
6219 <.*?>
< table.height() ) {
<.*?><.*?> "bProcessing",
6220 <.*?>
< table.height() ) {
<.*?><.*?> "bAutoWidth",
6221 <.*?>
< table.height() ) {
<.*?><.*?> "bSortClasses",
6222 <.*?>
< table.height() ) {
<.*?><.*?> "bServerSide",
6223 <.*?>
< table.height() ) {
<.*?><.*?> "bDeferRender"
6224 <.*?>
< table.height() ) {
<.*?><.*?> ] );
6225 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( oSettings, oInit, [
6226 <.*?>
< table.height() ) {
<.*?><.*?> "asStripeClasses",
6227 <.*?>
< table.height() ) {
<.*?><.*?> "ajax",
6228 <.*?>
< table.height() ) {
<.*?><.*?> "fnServerData",
6229 <.*?>
< table.height() ) {
<.*?><.*?> "fnFormatNumber",
6230 <.*?>
< table.height() ) {
<.*?><.*?> "sServerMethod",
6231 <.*?>
< table.height() ) {
<.*?><.*?> "aaSorting",
6232 <.*?>
< table.height() ) {
<.*?><.*?> "aaSortingFixed",
6233 <.*?>
< table.height() ) {
<.*?><.*?> "aLengthMenu",
6234 <.*?>
< table.height() ) {
<.*?><.*?> "sPaginationType",
6235 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxSource",
6236 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxDataProp",
6237 <.*?>
< table.height() ) {
<.*?><.*?> "iStateDuration",
6238 <.*?>
< table.height() ) {
<.*?><.*?> "sDom",
6239 <.*?>
< table.height() ) {
<.*?><.*?> "bSortCellsTop",
6240 <.*?>
< table.height() ) {
<.*?><.*?> "iTabIndex",
6241 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateLoadCallback",
6242 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateSaveCallback",
6243 <.*?>
< table.height() ) {
<.*?><.*?> "renderer",
6244 <.*?>
< table.height() ) {
<.*?><.*?> "searchDelay",
6245 <.*?>
< table.height() ) {
<.*?><.*?> [ "iCookieDuration", "iStateDuration" ], // backwards compat
6246 <.*?>
< table.height() ) {
<.*?><.*?> [ "oSearch", "oPreviousSearch" ],
6247 <.*?>
< table.height() ) {
<.*?><.*?> [ "aoSearchCols", "aoPreSearchCols" ],
6248 <.*?>
< table.height() ) {
<.*?><.*?> [ "iDisplayLength", "_iDisplayLength" ],
6249 <.*?>
< table.height() ) {
<.*?><.*?> [ "bJQueryUI", "bJUI" ]
6250 <.*?>
< table.height() ) {
<.*?><.*?> ] );
6251 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( oSettings.oScroll, oInit, [
6252 <.*?>
< table.height() ) {
<.*?><.*?> [ "sScrollX", "sX" ],
6253 <.*?>
< table.height() ) {
<.*?><.*?> [ "sScrollXInner", "sXInner" ],
6254 <.*?>
< table.height() ) {
<.*?><.*?> [ "sScrollY", "sY" ],
6255 <.*?>
< table.height() ) {
<.*?><.*?> [ "bScrollCollapse", "bCollapse" ]
6256 <.*?>
< table.height() ) {
<.*?><.*?> ] );
6257 <.*?>
< table.height() ) {
<.*?><.*?> _fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
6258  
6259 <.*?>
< table.height() ) {
<.*?><.*?> /* Callback functions which are array driven */
6260 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );
6261 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );
6262 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );
6263 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );
6264 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );
6265 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );
6266 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );
6267 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );
6268 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );
6269 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
6270 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );
6271  
6272 <.*?>
< table.height() ) {
<.*?><.*?> var oClasses = oSettings.oClasses;
6273  
6274 <.*?>
< table.height() ) {
<.*?><.*?> // @todo Remove in 1.11
6275 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.bJQueryUI )
6276 <.*?>
< table.height() ) {
<.*?><.*?> {
6277 <.*?>
< table.height() ) {
<.*?><.*?> /* Use the JUI classes object for display. You could clone the oStdClasses object if
6278 <.*?>
< table.height() ) {
<.*?><.*?> * you want to have multiple tables with multiple independent classes
6279 <.*?>
< table.height() ) {
<.*?><.*?> */
6280 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );
6281  
6282 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" )
6283 <.*?>
< table.height() ) {
<.*?><.*?> {
6284 <.*?>
< table.height() ) {
<.*?><.*?> /* Set the DOM to use a layout suitable for jQuery UI's theming */
6285 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.sDom = '<"H"lfr>t<"F"ip>';
6286 <.*?>
< table.height() ) {
<.*?><.*?> }
6287  
6288 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! oSettings.renderer ) {
6289 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.renderer = 'jqueryui';
6290 <.*?>
< table.height() ) {
<.*?><.*?> }
6291 <.*?>
< table.height() ) {
<.*?><.*?> else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) {
6292 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.renderer.header = 'jqueryui';
6293 <.*?>
< table.height() ) {
<.*?><.*?> }
6294 <.*?>
< table.height() ) {
<.*?><.*?> }
6295 <.*?>
< table.height() ) {
<.*?><.*?> else
6296 <.*?>
< table.height() ) {
<.*?><.*?> {
6297 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
6298 <.*?>
< table.height() ) {
<.*?><.*?> }
6299 <.*?>
< table.height() ) {
<.*?><.*?> $this.addClass( oClasses.sTable );
6300  
6301 <.*?>
< table.height() ) {
<.*?><.*?> /* Calculate the scroll bar width and cache it for use later on */
6302 <.*?>
< table.height() ) {
<.*?><.*?> if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" )
6303 <.*?>
< table.height() ) {
<.*?><.*?> {
6304 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.oScroll.iBarWidth = _fnScrollBarWidth();
6305 <.*?>
< table.height() ) {
<.*?><.*?> }
6306 <.*?>
< table.height() ) {
<.*?><.*?> if ( oSettings.oScroll.sX === true ) { // Easy initialisation of x-scrolling
6307 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.oScroll.sX = '100%';
6308 <.*?>
< table.height() ) {
<.*?><.*?> }
6309  
6310 <.*?>
< table.height() ) {
<.*?><.*?> if ( oSettings.iInitDisplayStart === undefined )
6311 <.*?>
< table.height() ) {
<.*?><.*?> {
6312 <.*?>
< table.height() ) {
<.*?><.*?> /* Display start point, taking into account the save saving */
6313 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.iInitDisplayStart = oInit.iDisplayStart;
6314 <.*?>
< table.height() ) {
<.*?><.*?> oSettings._iDisplayStart = oInit.iDisplayStart;
6315 <.*?>
< table.height() ) {
<.*?><.*?> }
6316  
6317 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.iDeferLoading !== null )
6318 <.*?>
< table.height() ) {
<.*?><.*?> {
6319 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.bDeferLoading = true;
6320 <.*?>
< table.height() ) {
<.*?><.*?> var tmp = $.isArray( oInit.iDeferLoading );
6321 <.*?>
< table.height() ) {
<.*?><.*?> oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
6322 <.*?>
< table.height() ) {
<.*?><.*?> oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
6323 <.*?>
< table.height() ) {
<.*?><.*?> }
6324  
6325 <.*?>
< table.height() ) {
<.*?><.*?> /* Language definitions */
6326 <.*?>
< table.height() ) {
<.*?><.*?> var oLanguage = oSettings.oLanguage;
6327 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( true, oLanguage, oInit.oLanguage );
6328  
6329 <.*?>
< table.height() ) {
<.*?><.*?> if ( oLanguage.sUrl !== "" )
6330 <.*?>
< table.height() ) {
<.*?><.*?> {
6331 <.*?>
< table.height() ) {
<.*?><.*?> /* Get the language definitions from a file - because this Ajax call makes the language
6332 <.*?>
< table.height() ) {
<.*?><.*?> * get async to the remainder of this function we use bInitHandedOff to indicate that
6333 <.*?>
< table.height() ) {
<.*?><.*?> * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
6334 <.*?>
< table.height() ) {
<.*?><.*?> */
6335 <.*?>
< table.height() ) {
<.*?><.*?> $.ajax( {
6336 <.*?>
< table.height() ) {
<.*?><.*?> dataType: 'json',
6337 <.*?>
< table.height() ) {
<.*?><.*?> url: oLanguage.sUrl,
6338 <.*?>
< table.height() ) {
<.*?><.*?> success: function ( json ) {
6339 <.*?>
< table.height() ) {
<.*?><.*?> _fnLanguageCompat( json );
6340 <.*?>
< table.height() ) {
<.*?><.*?> _fnCamelToHungarian( defaults.oLanguage, json );
6341 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( true, oLanguage, json );
6342 <.*?>
< table.height() ) {
<.*?><.*?> _fnInitialise( oSettings );
6343 <.*?>
< table.height() ) {
<.*?><.*?> },
6344 <.*?>
< table.height() ) {
<.*?><.*?> error: function () {
6345 <.*?>
< table.height() ) {
<.*?><.*?> // Error occurred loading language file, continue on as best we can
6346 <.*?>
< table.height() ) {
<.*?><.*?> _fnInitialise( oSettings );
6347 <.*?>
< table.height() ) {
<.*?><.*?> }
6348 <.*?>
< table.height() ) {
<.*?><.*?> } );
6349 <.*?>
< table.height() ) {
<.*?><.*?> bInitHandedOff = true;
6350 <.*?>
< table.height() ) {
<.*?><.*?> }
6351  
6352 <.*?>
< table.height() ) {
<.*?><.*?> /*
6353 <.*?>
< table.height() ) {
<.*?><.*?> * Stripes
6354 <.*?>
< table.height() ) {
<.*?><.*?> */
6355 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.asStripeClasses === null )
6356 <.*?>
< table.height() ) {
<.*?><.*?> {
6357 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.asStripeClasses =[
6358 <.*?>
< table.height() ) {
<.*?><.*?> oClasses.sStripeOdd,
6359 <.*?>
< table.height() ) {
<.*?><.*?> oClasses.sStripeEven
6360 <.*?>
< table.height() ) {
<.*?><.*?> ];
6361 <.*?>
< table.height() ) {
<.*?><.*?> }
6362  
6363 <.*?>
< table.height() ) {
<.*?><.*?> /* Remove row stripe classes if they are already on the table row */
6364 <.*?>
< table.height() ) {
<.*?><.*?> var stripeClasses = oSettings.asStripeClasses;
6365 <.*?>
< table.height() ) {
<.*?><.*?> var rowOne = $this.children('tbody').find('tr').eq(0);
6366 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.inArray( true, $.map( stripeClasses, function(el, i) {
6367 <.*?>
< table.height() ) {
<.*?><.*?> return rowOne.hasClass(el);
6368 <.*?>
< table.height() ) {
<.*?><.*?> } ) ) !== -1 ) {
6369 <.*?>
< table.height() ) {
<.*?><.*?> $('tbody tr', this).removeClass( stripeClasses.join(' ') );
6370 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.asDestroyStripes = stripeClasses.slice();
6371 <.*?>
< table.height() ) {
<.*?><.*?> }
6372  
6373 <.*?>
< table.height() ) {
<.*?><.*?> /*
6374 <.*?>
< table.height() ) {
<.*?><.*?> * Columns
6375 <.*?>
< table.height() ) {
<.*?><.*?> * See if we should load columns automatically or use defined ones
6376 <.*?>
< table.height() ) {
<.*?><.*?> */
6377 <.*?>
< table.height() ) {
<.*?><.*?> var anThs = [];
6378 <.*?>
< table.height() ) {
<.*?><.*?> var aoColumnsInit;
6379 <.*?>
< table.height() ) {
<.*?><.*?> var nThead = this.getElementsByTagName('thead');
6380 <.*?>
< table.height() ) {
<.*?><.*?> if ( nThead.length !== 0 )
6381 <.*?>
< table.height() ) {
<.*?><.*?> {
6382 <.*?>
< table.height() ) {
<.*?><.*?> _fnDetectHeader( oSettings.aoHeader, nThead[0] );
6383 <.*?>
< table.height() ) {
<.*?><.*?> anThs = _fnGetUniqueThs( oSettings );
6384 <.*?>
< table.height() ) {
<.*?><.*?> }
6385  
6386 <.*?>
< table.height() ) {
<.*?><.*?> /* If not given a column array, generate one with nulls */
6387 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.aoColumns === null )
6388 <.*?>
< table.height() ) {
<.*?><.*?> {
6389 <.*?>
< table.height() ) {
<.*?><.*?> aoColumnsInit = [];
6390 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
6391 <.*?>
< table.height() ) {
<.*?><.*?> {
6392 <.*?>
< table.height() ) {
<.*?><.*?> aoColumnsInit.push( null );
6393 <.*?>
< table.height() ) {
<.*?><.*?> }
6394 <.*?>
< table.height() ) {
<.*?><.*?> }
6395 <.*?>
< table.height() ) {
<.*?><.*?> else
6396 <.*?>
< table.height() ) {
<.*?><.*?> {
6397 <.*?>
< table.height() ) {
<.*?><.*?> aoColumnsInit = oInit.aoColumns;
6398 <.*?>
< table.height() ) {
<.*?><.*?> }
6399  
6400 <.*?>
< table.height() ) {
<.*?><.*?> /* Add the columns */
6401 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
6402 <.*?>
< table.height() ) {
<.*?><.*?> {
6403 <.*?>
< table.height() ) {
<.*?><.*?> _fnAddColumn( oSettings, anThs ? anThs[i] : null );
6404 <.*?>
< table.height() ) {
<.*?><.*?> }
6405  
6406 <.*?>
< table.height() ) {
<.*?><.*?> /* Apply the column definitions */
6407 <.*?>
< table.height() ) {
<.*?><.*?> _fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
6408 <.*?>
< table.height() ) {
<.*?><.*?> _fnColumnOptions( oSettings, iCol, oDef );
6409 <.*?>
< table.height() ) {
<.*?><.*?> } );
6410  
6411 <.*?>
< table.height() ) {
<.*?><.*?> /* HTML5 attribute detection - build an mData object automatically if the
6412 <.*?>
< table.height() ) {
<.*?><.*?> * attributes are found
6413 <.*?>
< table.height() ) {
<.*?><.*?> */
6414 <.*?>
< table.height() ) {
<.*?><.*?> if ( rowOne.length ) {
6415 <.*?>
< table.height() ) {
<.*?><.*?> var a = function ( cell, name ) {
6416 <.*?>
< table.height() ) {
<.*?><.*?> return cell.getAttribute( 'data-'+name ) !== null ? name : null;
6417 <.*?>
< table.height() ) {
<.*?><.*?> };
6418  
6419 <.*?>
< table.height() ) {
<.*?><.*?> $.each( _fnGetRowElements( oSettings, rowOne[0] ).cells, function (i, cell) {
6420 <.*?>
< table.height() ) {
<.*?><.*?> var col = oSettings.aoColumns[i];
6421  
6422 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.mData === i ) {
6423 <.*?>
< table.height() ) {
<.*?><.*?> var sort = a( cell, 'sort' ) || a( cell, 'order' );
6424 <.*?>
< table.height() ) {
<.*?><.*?> var filter = a( cell, 'filter' ) || a( cell, 'search' );
6425  
6426 <.*?>
< table.height() ) {
<.*?><.*?> if ( sort !== null || filter !== null ) {
6427 <.*?>
< table.height() ) {
<.*?><.*?> col.mData = {
6428 <.*?>
< table.height() ) {
<.*?><.*?> _: i+'.display',
6429 <.*?>
< table.height() ) {
<.*?><.*?> sort: sort !== null ? i+'.@data-'+sort : undefined,
6430 <.*?>
< table.height() ) {
<.*?><.*?> type: sort !== null ? i+'.@data-'+sort : undefined,
6431 <.*?>
< table.height() ) {
<.*?><.*?> filter: filter !== null ? i+'.@data-'+filter : undefined
6432 <.*?>
< table.height() ) {
<.*?><.*?> };
6433  
6434 <.*?>
< table.height() ) {
<.*?><.*?> _fnColumnOptions( oSettings, i );
6435 <.*?>
< table.height() ) {
<.*?><.*?> }
6436 <.*?>
< table.height() ) {
<.*?><.*?> }
6437 <.*?>
< table.height() ) {
<.*?><.*?> } );
6438 <.*?>
< table.height() ) {
<.*?><.*?> }
6439  
6440 <.*?>
< table.height() ) {
<.*?><.*?> var features = oSettings.oFeatures;
6441  
6442 <.*?>
< table.height() ) {
<.*?><.*?> /* Must be done after everything which can be overridden by the state saving! */
6443 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.bStateSave )
6444 <.*?>
< table.height() ) {
<.*?><.*?> {
6445 <.*?>
< table.height() ) {
<.*?><.*?> features.bStateSave = true;
6446 <.*?>
< table.height() ) {
<.*?><.*?> _fnLoadState( oSettings, oInit );
6447 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
6448 <.*?>
< table.height() ) {
<.*?><.*?> }
6449  
6450  
6451 <.*?>
< table.height() ) {
<.*?><.*?> /*
6452 <.*?>
< table.height() ) {
<.*?><.*?> * Sorting
6453 <.*?>
< table.height() ) {
<.*?><.*?> * @todo For modularisation (1.11) this needs to do into a sort start up handler
6454 <.*?>
< table.height() ) {
<.*?><.*?> */
6455  
6456 <.*?>
< table.height() ) {
<.*?><.*?> // If aaSorting is not defined, then we use the first indicator in asSorting
6457 <.*?>
< table.height() ) {
<.*?><.*?> // in case that has been altered, so the default sort reflects that option
6458 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.aaSorting === undefined )
6459 <.*?>
< table.height() ) {
<.*?><.*?> {
6460 <.*?>
< table.height() ) {
<.*?><.*?> var sorting = oSettings.aaSorting;
6461 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, iLen=sorting.length ; i<iLen ; i++ )
6462 <.*?>
< table.height() ) {
<.*?><.*?> {
6463 <.*?>
< table.height() ) {
<.*?><.*?> sorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];
6464 <.*?>
< table.height() ) {
<.*?><.*?> }
6465 <.*?>
< table.height() ) {
<.*?><.*?> }
6466  
6467 <.*?>
< table.height() ) {
<.*?><.*?> /* Do a first pass on the sorting classes (allows any size changes to be taken into
6468 <.*?>
< table.height() ) {
<.*?><.*?> * account, and also will apply sorting disabled classes if disabled
6469 <.*?>
< table.height() ) {
<.*?><.*?> */
6470 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortingClasses( oSettings );
6471  
6472 <.*?>
< table.height() ) {
<.*?><.*?> if ( features.bSort )
6473 <.*?>
< table.height() ) {
<.*?><.*?> {
6474 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
6475 <.*?>
< table.height() ) {
<.*?><.*?> if ( oSettings.bSorted ) {
6476 <.*?>
< table.height() ) {
<.*?><.*?> var aSort = _fnSortFlatten( oSettings );
6477 <.*?>
< table.height() ) {
<.*?><.*?> var sortedColumns = {};
6478  
6479 <.*?>
< table.height() ) {
<.*?><.*?> $.each( aSort, function (i, val) {
6480 <.*?>
< table.height() ) {
<.*?><.*?> sortedColumns[ val.src ] = val.dir;
6481 <.*?>
< table.height() ) {
<.*?><.*?> } );
6482  
6483 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
6484 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortAria( oSettings );
6485 <.*?>
< table.height() ) {
<.*?><.*?> }
6486 <.*?>
< table.height() ) {
<.*?><.*?> } );
6487 <.*?>
< table.height() ) {
<.*?><.*?> }
6488  
6489 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
6490 <.*?>
< table.height() ) {
<.*?><.*?> if ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {
6491 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortingClasses( oSettings );
6492 <.*?>
< table.height() ) {
<.*?><.*?> }
6493 <.*?>
< table.height() ) {
<.*?><.*?> }, 'sc' );
6494  
6495  
6496 <.*?>
< table.height() ) {
<.*?><.*?> /*
6497 <.*?>
< table.height() ) {
<.*?><.*?> * Final init
6498 <.*?>
< table.height() ) {
<.*?><.*?> * Cache the header, body and footer as required, creating them if needed
6499 <.*?>
< table.height() ) {
<.*?><.*?> */
6500  
6501 <.*?>
< table.height() ) {
<.*?><.*?> /* Browser support detection */
6502 <.*?>
< table.height() ) {
<.*?><.*?> _fnBrowserDetect( oSettings );
6503  
6504 <.*?>
< table.height() ) {
<.*?><.*?> // Work around for Webkit bug 83867 - store the caption-side before removing from doc
6505 <.*?>
< table.height() ) {
<.*?><.*?> var captions = $this.children('caption').each( function () {
6506 <.*?>
< table.height() ) {
<.*?><.*?> this._captionSide = $this.css('caption-side');
6507 <.*?>
< table.height() ) {
<.*?><.*?> } );
6508  
6509 <.*?>
< table.height() ) {
<.*?><.*?> var thead = $this.children('thead');
6510 <.*?>
< table.height() ) {
<.*?><.*?> if ( thead.length === 0 )
6511 <.*?>
< table.height() ) {
<.*?><.*?> {
6512 <.*?>
< table.height() ) {
<.*?><.*?> thead = $('<thead/>').appendTo(this);
6513 <.*?>
< table.height() ) {
<.*?><.*?> }
6514 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.nTHead = thead[0];
6515  
6516 <.*?>
< table.height() ) {
<.*?><.*?> var tbody = $this.children('tbody');
6517 <.*?>
< table.height() ) {
<.*?><.*?> if ( tbody.length === 0 )
6518 <.*?>
< table.height() ) {
<.*?><.*?> {
6519 <.*?>
< table.height() ) {
<.*?><.*?> tbody = $('<tbody/>').appendTo(this);
6520 <.*?>
< table.height() ) {
<.*?><.*?> }
6521 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.nTBody = tbody[0];
6522  
6523 <.*?>
< table.height() ) {
<.*?><.*?> var tfoot = $this.children('tfoot');
6524 <.*?>
< table.height() ) {
<.*?><.*?> if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") )
6525 <.*?>
< table.height() ) {
<.*?><.*?> {
6526 <.*?>
< table.height() ) {
<.*?><.*?> // If we are a scrolling table, and no footer has been given, then we need to create
6527 <.*?>
< table.height() ) {
<.*?><.*?> // a tfoot element for the caption element to be appended to
6528 <.*?>
< table.height() ) {
<.*?><.*?> tfoot = $('<tfoot/>').appendTo(this);
6529 <.*?>
< table.height() ) {
<.*?><.*?> }
6530  
6531 <.*?>
< table.height() ) {
<.*?><.*?> if ( tfoot.length === 0 || tfoot.children().length === 0 ) {
6532 <.*?>
< table.height() ) {
<.*?><.*?> $this.addClass( oClasses.sNoFooter );
6533 <.*?>
< table.height() ) {
<.*?><.*?> }
6534 <.*?>
< table.height() ) {
<.*?><.*?> else if ( tfoot.length > 0 ) {
6535 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.nTFoot = tfoot[0];
6536 <.*?>
< table.height() ) {
<.*?><.*?> _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
6537 <.*?>
< table.height() ) {
<.*?><.*?> }
6538  
6539 <.*?>
< table.height() ) {
<.*?><.*?> /* Check if there is data passing into the constructor */
6540 <.*?>
< table.height() ) {
<.*?><.*?> if ( oInit.aaData )
6541 <.*?>
< table.height() ) {
<.*?><.*?> {
6542 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0 ; i<oInit.aaData.length ; i++ )
6543 <.*?>
< table.height() ) {
<.*?><.*?> {
6544 <.*?>
< table.height() ) {
<.*?><.*?> _fnAddData( oSettings, oInit.aaData[ i ] );
6545 <.*?>
< table.height() ) {
<.*?><.*?> }
6546 <.*?>
< table.height() ) {
<.*?><.*?> }
6547 <.*?>
< table.height() ) {
<.*?><.*?> else if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' )
6548 <.*?>
< table.height() ) {
<.*?><.*?> {
6549 <.*?>
< table.height() ) {
<.*?><.*?> /* Grab the data from the page - only do this when deferred loading or no Ajax
6550 <.*?>
< table.height() ) {
<.*?><.*?> * source since there is no point in reading the DOM data if we are then going
6551 <.*?>
< table.height() ) {
<.*?><.*?> * to replace it with Ajax data
6552 <.*?>
< table.height() ) {
<.*?><.*?> */
6553 <.*?>
< table.height() ) {
<.*?><.*?> _fnAddTr( oSettings, $(oSettings.nTBody).children('tr') );
6554 <.*?>
< table.height() ) {
<.*?><.*?> }
6555  
6556 <.*?>
< table.height() ) {
<.*?><.*?> /* Copy the data index array */
6557 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
6558  
6559 <.*?>
< table.height() ) {
<.*?><.*?> /* Initialisation complete - table can be drawn */
6560 <.*?>
< table.height() ) {
<.*?><.*?> oSettings.bInitialised = true;
6561  
6562 <.*?>
< table.height() ) {
<.*?><.*?> /* Check if we need to initialise the table (it might not have been handed off to the
6563 <.*?>
< table.height() ) {
<.*?><.*?> * language processor)
6564 <.*?>
< table.height() ) {
<.*?><.*?> */
6565 <.*?>
< table.height() ) {
<.*?><.*?> if ( bInitHandedOff === false )
6566 <.*?>
< table.height() ) {
<.*?><.*?> {
6567 <.*?>
< table.height() ) {
<.*?><.*?> _fnInitialise( oSettings );
6568 <.*?>
< table.height() ) {
<.*?><.*?> }
6569 <.*?>
< table.height() ) {
<.*?><.*?> } );
6570 <.*?>
< table.height() ) {
<.*?><.*?> _that = null;
6571 <.*?>
< table.height() ) {
<.*?><.*?> return this;
6572 <.*?>
< table.height() ) {
<.*?><.*?> };
6573  
6574  
6575  
6576 <.*?>
< table.height() ) {
<.*?><.*?> /**
6577 <.*?>
< table.height() ) {
<.*?><.*?> * Computed structure of the DataTables API, defined by the options passed to
6578 <.*?>
< table.height() ) {
<.*?><.*?> * `DataTable.Api.register()` when building the API.
6579 <.*?>
< table.height() ) {
<.*?><.*?> *
6580 <.*?>
< table.height() ) {
<.*?><.*?> * The structure is built in order to speed creation and extension of the Api
6581 <.*?>
< table.height() ) {
<.*?><.*?> * objects since the extensions are effectively pre-parsed.
6582 <.*?>
< table.height() ) {
<.*?><.*?> *
6583 <.*?>
< table.height() ) {
<.*?><.*?> * The array is an array of objects with the following structure, where this
6584 <.*?>
< table.height() ) {
<.*?><.*?> * base array represents the Api prototype base:
6585 <.*?>
< table.height() ) {
<.*?><.*?> *
6586 <.*?>
< table.height() ) {
<.*?><.*?> * [
6587 <.*?>
< table.height() ) {
<.*?><.*?> * {
6588 <.*?>
< table.height() ) {
<.*?><.*?> * name: 'data' -- string - Property name
6589 <.*?>
< table.height() ) {
<.*?><.*?> * val: function () {}, -- function - Api method (or undefined if just an object
6590 <.*?>
< table.height() ) {
<.*?><.*?> * methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
6591 <.*?>
< table.height() ) {
<.*?><.*?> * propExt: [ ... ] -- array - Array of Api object definitions to extend the property
6592 <.*?>
< table.height() ) {
<.*?><.*?> * },
6593 <.*?>
< table.height() ) {
<.*?><.*?> * {
6594 <.*?>
< table.height() ) {
<.*?><.*?> * name: 'row'
6595 <.*?>
< table.height() ) {
<.*?><.*?> * val: {},
6596 <.*?>
< table.height() ) {
<.*?><.*?> * methodExt: [ ... ],
6597 <.*?>
< table.height() ) {
<.*?><.*?> * propExt: [
6598 <.*?>
< table.height() ) {
<.*?><.*?> * {
6599 <.*?>
< table.height() ) {
<.*?><.*?> * name: 'data'
6600 <.*?>
< table.height() ) {
<.*?><.*?> * val: function () {},
6601 <.*?>
< table.height() ) {
<.*?><.*?> * methodExt: [ ... ],
6602 <.*?>
< table.height() ) {
<.*?><.*?> * propExt: [ ... ]
6603 <.*?>
< table.height() ) {
<.*?><.*?> * },
6604 <.*?>
< table.height() ) {
<.*?><.*?> * ...
6605 <.*?>
< table.height() ) {
<.*?><.*?> * ]
6606 <.*?>
< table.height() ) {
<.*?><.*?> * }
6607 <.*?>
< table.height() ) {
<.*?><.*?> * ]
6608 <.*?>
< table.height() ) {
<.*?><.*?> *
6609 <.*?>
< table.height() ) {
<.*?><.*?> * @type {Array}
6610 <.*?>
< table.height() ) {
<.*?><.*?> * @ignore
6611 <.*?>
< table.height() ) {
<.*?><.*?> */
6612 <.*?>
< table.height() ) {
<.*?><.*?> var __apiStruct = [];
6613  
6614  
6615 <.*?>
< table.height() ) {
<.*?><.*?> /**
6616 <.*?>
< table.height() ) {
<.*?><.*?> * `Array.prototype` reference.
6617 <.*?>
< table.height() ) {
<.*?><.*?> *
6618 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
6619 <.*?>
< table.height() ) {
<.*?><.*?> * @ignore
6620 <.*?>
< table.height() ) {
<.*?><.*?> */
6621 <.*?>
< table.height() ) {
<.*?><.*?> var __arrayProto = Array.prototype;
6622  
6623  
6624 <.*?>
< table.height() ) {
<.*?><.*?> /**
6625 <.*?>
< table.height() ) {
<.*?><.*?> * Abstraction for `context` parameter of the `Api` constructor to allow it to
6626 <.*?>
< table.height() ) {
<.*?><.*?> * take several different forms for ease of use.
6627 <.*?>
< table.height() ) {
<.*?><.*?> *
6628 <.*?>
< table.height() ) {
<.*?><.*?> * Each of the input parameter types will be converted to a DataTables settings
6629 <.*?>
< table.height() ) {
<.*?><.*?> * object where possible.
6630 <.*?>
< table.height() ) {
<.*?><.*?> *
6631 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|node|jQuery|object} mixed DataTable identifier. Can be one
6632 <.*?>
< table.height() ) {
<.*?><.*?> * of:
6633 <.*?>
< table.height() ) {
<.*?><.*?> *
6634 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - jQuery selector. Any DataTables' matching the given selector
6635 <.*?>
< table.height() ) {
<.*?><.*?> * with be found and used.
6636 <.*?>
< table.height() ) {
<.*?><.*?> * * `node` - `TABLE` node which has already been formed into a DataTable.
6637 <.*?>
< table.height() ) {
<.*?><.*?> * * `jQuery` - A jQuery object of `TABLE` nodes.
6638 <.*?>
< table.height() ) {
<.*?><.*?> * * `object` - DataTables settings object
6639 <.*?>
< table.height() ) {
<.*?><.*?> * * `DataTables.Api` - API instance
6640 <.*?>
< table.height() ) {
<.*?><.*?> * @return {array|null} Matching DataTables settings objects. `null` or
6641 <.*?>
< table.height() ) {
<.*?><.*?> * `undefined` is returned if no matching DataTable is found.
6642 <.*?>
< table.height() ) {
<.*?><.*?> * @ignore
6643 <.*?>
< table.height() ) {
<.*?><.*?> */
6644 <.*?>
< table.height() ) {
<.*?><.*?> var _toSettings = function ( mixed )
6645 <.*?>
< table.height() ) {
<.*?><.*?> {
6646 <.*?>
< table.height() ) {
<.*?><.*?> var idx, jq;
6647 <.*?>
< table.height() ) {
<.*?><.*?> var settings = DataTable.settings;
6648 <.*?>
< table.height() ) {
<.*?><.*?> var tables = $.map( settings, function (el, i) {
6649 <.*?>
< table.height() ) {
<.*?><.*?> return el.nTable;
6650 <.*?>
< table.height() ) {
<.*?><.*?> } );
6651  
6652 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! mixed ) {
6653 <.*?>
< table.height() ) {
<.*?><.*?> return [];
6654 <.*?>
< table.height() ) {
<.*?><.*?> }
6655 <.*?>
< table.height() ) {
<.*?><.*?> else if ( mixed.nTable && mixed.oApi ) {
6656 <.*?>
< table.height() ) {
<.*?><.*?> // DataTables settings object
6657 <.*?>
< table.height() ) {
<.*?><.*?> return [ mixed ];
6658 <.*?>
< table.height() ) {
<.*?><.*?> }
6659 <.*?>
< table.height() ) {
<.*?><.*?> else if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {
6660 <.*?>
< table.height() ) {
<.*?><.*?> // Table node
6661 <.*?>
< table.height() ) {
<.*?><.*?> idx = $.inArray( mixed, tables );
6662 <.*?>
< table.height() ) {
<.*?><.*?> return idx !== -1 ? [ settings[idx] ] : null;
6663 <.*?>
< table.height() ) {
<.*?><.*?> }
6664 <.*?>
< table.height() ) {
<.*?><.*?> else if ( mixed && typeof mixed.settings === 'function' ) {
6665 <.*?>
< table.height() ) {
<.*?><.*?> return mixed.settings().toArray();
6666 <.*?>
< table.height() ) {
<.*?><.*?> }
6667 <.*?>
< table.height() ) {
<.*?><.*?> else if ( typeof mixed === 'string' ) {
6668 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery selector
6669 <.*?>
< table.height() ) {
<.*?><.*?> jq = $(mixed);
6670 <.*?>
< table.height() ) {
<.*?><.*?> }
6671 <.*?>
< table.height() ) {
<.*?><.*?> else if ( mixed instanceof $ ) {
6672 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery object (also DataTables instance)
6673 <.*?>
< table.height() ) {
<.*?><.*?> jq = mixed;
6674 <.*?>
< table.height() ) {
<.*?><.*?> }
6675  
6676 <.*?>
< table.height() ) {
<.*?><.*?> if ( jq ) {
6677 <.*?>
< table.height() ) {
<.*?><.*?> return jq.map( function(i) {
6678 <.*?>
< table.height() ) {
<.*?><.*?> idx = $.inArray( this, tables );
6679 <.*?>
< table.height() ) {
<.*?><.*?> return idx !== -1 ? settings[idx] : null;
6680 <.*?>
< table.height() ) {
<.*?><.*?> } ).toArray();
6681 <.*?>
< table.height() ) {
<.*?><.*?> }
6682 <.*?>
< table.height() ) {
<.*?><.*?> };
6683  
6684  
6685 <.*?>
< table.height() ) {
<.*?><.*?> /**
6686 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables API class - used to control and interface with one or more
6687 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables enhanced tables.
6688 <.*?>
< table.height() ) {
<.*?><.*?> *
6689 <.*?>
< table.height() ) {
<.*?><.*?> * The API class is heavily based on jQuery, presenting a chainable interface
6690 <.*?>
< table.height() ) {
<.*?><.*?> * that you can use to interact with tables. Each instance of the API class has
6691 <.*?>
< table.height() ) {
<.*?><.*?> * a "context" - i.e. the tables that it will operate on. This could be a single
6692 <.*?>
< table.height() ) {
<.*?><.*?> * table, all tables on a page or a sub-set thereof.
6693 <.*?>
< table.height() ) {
<.*?><.*?> *
6694 <.*?>
< table.height() ) {
<.*?><.*?> * Additionally the API is designed to allow you to easily work with the data in
6695 <.*?>
< table.height() ) {
<.*?><.*?> * the tables, retrieving and manipulating it as required. This is done by
6696 <.*?>
< table.height() ) {
<.*?><.*?> * presenting the API class as an array like interface. The contents of the
6697 <.*?>
< table.height() ) {
<.*?><.*?> * array depend upon the actions requested by each method (for example
6698 <.*?>
< table.height() ) {
<.*?><.*?> * `rows().nodes()` will return an array of nodes, while `rows().data()` will
6699 <.*?>
< table.height() ) {
<.*?><.*?> * return an array of objects or arrays depending upon your table's
6700 <.*?>
< table.height() ) {
<.*?><.*?> * configuration). The API object has a number of array like methods (`push`,
6701 <.*?>
< table.height() ) {
<.*?><.*?> * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,
6702 <.*?>
< table.height() ) {
<.*?><.*?> * `unique` etc) to assist your working with the data held in a table.
6703 <.*?>
< table.height() ) {
<.*?><.*?> *
6704 <.*?>
< table.height() ) {
<.*?><.*?> * Most methods (those which return an Api instance) are chainable, which means
6705 <.*?>
< table.height() ) {
<.*?><.*?> * the return from a method call also has all of the methods available that the
6706 <.*?>
< table.height() ) {
<.*?><.*?> * top level object had. For example, these two calls are equivalent:
6707 <.*?>
< table.height() ) {
<.*?><.*?> *
6708 <.*?>
< table.height() ) {
<.*?><.*?> * // Not chained
6709 <.*?>
< table.height() ) {
<.*?><.*?> * api.row.add( {...} );
6710 <.*?>
< table.height() ) {
<.*?><.*?> * api.draw();
6711 <.*?>
< table.height() ) {
<.*?><.*?> *
6712 <.*?>
< table.height() ) {
<.*?><.*?> * // Chained
6713 <.*?>
< table.height() ) {
<.*?><.*?> * api.row.add( {...} ).draw();
6714 <.*?>
< table.height() ) {
<.*?><.*?> *
6715 <.*?>
< table.height() ) {
<.*?><.*?> * @class DataTable.Api
6716 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object|string|jQuery} context DataTable identifier. This is
6717 <.*?>
< table.height() ) {
<.*?><.*?> * used to define which DataTables enhanced tables this API will operate on.
6718 <.*?>
< table.height() ) {
<.*?><.*?> * Can be one of:
6719 <.*?>
< table.height() ) {
<.*?><.*?> *
6720 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - jQuery selector. Any DataTables' matching the given selector
6721 <.*?>
< table.height() ) {
<.*?><.*?> * with be found and used.
6722 <.*?>
< table.height() ) {
<.*?><.*?> * * `node` - `TABLE` node which has already been formed into a DataTable.
6723 <.*?>
< table.height() ) {
<.*?><.*?> * * `jQuery` - A jQuery object of `TABLE` nodes.
6724 <.*?>
< table.height() ) {
<.*?><.*?> * * `object` - DataTables settings object
6725 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} [data] Data to initialise the Api instance with.
6726 <.*?>
< table.height() ) {
<.*?><.*?> *
6727 <.*?>
< table.height() ) {
<.*?><.*?> * @example
6728 <.*?>
< table.height() ) {
<.*?><.*?> * // Direct initialisation during DataTables construction
6729 <.*?>
< table.height() ) {
<.*?><.*?> * var api = $('#example').DataTable();
6730 <.*?>
< table.height() ) {
<.*?><.*?> *
6731 <.*?>
< table.height() ) {
<.*?><.*?> * @example
6732 <.*?>
< table.height() ) {
<.*?><.*?> * // Initialisation using a DataTables jQuery object
6733 <.*?>
< table.height() ) {
<.*?><.*?> * var api = $('#example').dataTable().api();
6734 <.*?>
< table.height() ) {
<.*?><.*?> *
6735 <.*?>
< table.height() ) {
<.*?><.*?> * @example
6736 <.*?>
< table.height() ) {
<.*?><.*?> * // Initialisation as a constructor
6737 <.*?>
< table.height() ) {
<.*?><.*?> * var api = new $.fn.DataTable.Api( 'table.dataTable' );
6738 <.*?>
< table.height() ) {
<.*?><.*?> */
6739 <.*?>
< table.height() ) {
<.*?><.*?> _Api = function ( context, data )
6740 <.*?>
< table.height() ) {
<.*?><.*?> {
6741 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! (this instanceof _Api) ) {
6742 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( context, data );
6743 <.*?>
< table.height() ) {
<.*?><.*?> }
6744  
6745 <.*?>
< table.height() ) {
<.*?><.*?> var settings = [];
6746 <.*?>
< table.height() ) {
<.*?><.*?> var ctxSettings = function ( o ) {
6747 <.*?>
< table.height() ) {
<.*?><.*?> var a = _toSettings( o );
6748 <.*?>
< table.height() ) {
<.*?><.*?> if ( a ) {
6749 <.*?>
< table.height() ) {
<.*?><.*?> settings.push.apply( settings, a );
6750 <.*?>
< table.height() ) {
<.*?><.*?> }
6751 <.*?>
< table.height() ) {
<.*?><.*?> };
6752  
6753 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isArray( context ) ) {
6754 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=context.length ; i<ien ; i++ ) {
6755 <.*?>
< table.height() ) {
<.*?><.*?> ctxSettings( context[i] );
6756 <.*?>
< table.height() ) {
<.*?><.*?> }
6757 <.*?>
< table.height() ) {
<.*?><.*?> }
6758 <.*?>
< table.height() ) {
<.*?><.*?> else {
6759 <.*?>
< table.height() ) {
<.*?><.*?> ctxSettings( context );
6760 <.*?>
< table.height() ) {
<.*?><.*?> }
6761  
6762 <.*?>
< table.height() ) {
<.*?><.*?> // Remove duplicates
6763 <.*?>
< table.height() ) {
<.*?><.*?> this.context = _unique( settings );
6764  
6765 <.*?>
< table.height() ) {
<.*?><.*?> // Initial data
6766 <.*?>
< table.height() ) {
<.*?><.*?> if ( data ) {
6767 <.*?>
< table.height() ) {
<.*?><.*?> this.push.apply( this, data.toArray ? data.toArray() : data );
6768 <.*?>
< table.height() ) {
<.*?><.*?> }
6769  
6770 <.*?>
< table.height() ) {
<.*?><.*?> // selector
6771 <.*?>
< table.height() ) {
<.*?><.*?> this.selector = {
6772 <.*?>
< table.height() ) {
<.*?><.*?> rows: null,
6773 <.*?>
< table.height() ) {
<.*?><.*?> cols: null,
6774 <.*?>
< table.height() ) {
<.*?><.*?> opts: null
6775 <.*?>
< table.height() ) {
<.*?><.*?> };
6776  
6777 <.*?>
< table.height() ) {
<.*?><.*?> _Api.extend( this, this, __apiStruct );
6778 <.*?>
< table.height() ) {
<.*?><.*?> };
6779  
6780 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.Api = _Api;
6781  
6782 <.*?>
< table.height() ) {
<.*?><.*?> _Api.prototype = /** @lends DataTables.Api */{
6783 <.*?>
< table.height() ) {
<.*?><.*?> any: function ()
6784 <.*?>
< table.height() ) {
<.*?><.*?> {
6785 <.*?>
< table.height() ) {
<.*?><.*?> return this.flatten().length !== 0;
6786 <.*?>
< table.height() ) {
<.*?><.*?> },
6787  
6788  
6789 <.*?>
< table.height() ) {
<.*?><.*?> concat: __arrayProto.concat,
6790  
6791  
6792 <.*?>
< table.height() ) {
<.*?><.*?> context: [], // array of table settings objects
6793  
6794  
6795 <.*?>
< table.height() ) {
<.*?><.*?> each: function ( fn )
6796 <.*?>
< table.height() ) {
<.*?><.*?> {
6797 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=this.length ; i<ien; i++ ) {
6798 <.*?>
< table.height() ) {
<.*?><.*?> fn.call( this, this[i], i, this );
6799 <.*?>
< table.height() ) {
<.*?><.*?> }
6800  
6801 <.*?>
< table.height() ) {
<.*?><.*?> return this;
6802 <.*?>
< table.height() ) {
<.*?><.*?> },
6803  
6804  
6805 <.*?>
< table.height() ) {
<.*?><.*?> eq: function ( idx )
6806 <.*?>
< table.height() ) {
<.*?><.*?> {
6807 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
6808  
6809 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length > idx ?
6810 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( ctx[idx], this[idx] ) :
6811 <.*?>
< table.height() ) {
<.*?><.*?> null;
6812 <.*?>
< table.height() ) {
<.*?><.*?> },
6813  
6814  
6815 <.*?>
< table.height() ) {
<.*?><.*?> filter: function ( fn )
6816 <.*?>
< table.height() ) {
<.*?><.*?> {
6817 <.*?>
< table.height() ) {
<.*?><.*?> var a = [];
6818  
6819 <.*?>
< table.height() ) {
<.*?><.*?> if ( __arrayProto.filter ) {
6820 <.*?>
< table.height() ) {
<.*?><.*?> a = __arrayProto.filter.call( this, fn, this );
6821 <.*?>
< table.height() ) {
<.*?><.*?> }
6822 <.*?>
< table.height() ) {
<.*?><.*?> else {
6823 <.*?>
< table.height() ) {
<.*?><.*?> // Compatibility for browsers without EMCA-252-5 (JS 1.6)
6824 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=this.length ; i<ien ; i++ ) {
6825 <.*?>
< table.height() ) {
<.*?><.*?> if ( fn.call( this, this[i], i, this ) ) {
6826 <.*?>
< table.height() ) {
<.*?><.*?> a.push( this[i] );
6827 <.*?>
< table.height() ) {
<.*?><.*?> }
6828 <.*?>
< table.height() ) {
<.*?><.*?> }
6829 <.*?>
< table.height() ) {
<.*?><.*?> }
6830  
6831 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( this.context, a );
6832 <.*?>
< table.height() ) {
<.*?><.*?> },
6833  
6834  
6835 <.*?>
< table.height() ) {
<.*?><.*?> flatten: function ()
6836 <.*?>
< table.height() ) {
<.*?><.*?> {
6837 <.*?>
< table.height() ) {
<.*?><.*?> var a = [];
6838 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( this.context, a.concat.apply( a, this.toArray() ) );
6839 <.*?>
< table.height() ) {
<.*?><.*?> },
6840  
6841  
6842 <.*?>
< table.height() ) {
<.*?><.*?> join: __arrayProto.join,
6843  
6844  
6845 <.*?>
< table.height() ) {
<.*?><.*?> indexOf: __arrayProto.indexOf || function (obj, start)
6846 <.*?>
< table.height() ) {
<.*?><.*?> {
6847 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) {
6848 <.*?>
< table.height() ) {
<.*?><.*?> if ( this[i] === obj ) {
6849 <.*?>
< table.height() ) {
<.*?><.*?> return i;
6850 <.*?>
< table.height() ) {
<.*?><.*?> }
6851 <.*?>
< table.height() ) {
<.*?><.*?> }
6852 <.*?>
< table.height() ) {
<.*?><.*?> return -1;
6853 <.*?>
< table.height() ) {
<.*?><.*?> },
6854  
6855 <.*?>
< table.height() ) {
<.*?><.*?> iterator: function ( flatten, type, fn, alwaysNew ) {
6856 <.*?>
< table.height() ) {
<.*?><.*?> var
6857 <.*?>
< table.height() ) {
<.*?><.*?> a = [], ret,
6858 <.*?>
< table.height() ) {
<.*?><.*?> i, ien, j, jen,
6859 <.*?>
< table.height() ) {
<.*?><.*?> context = this.context,
6860 <.*?>
< table.height() ) {
<.*?><.*?> rows, items, item,
6861 <.*?>
< table.height() ) {
<.*?><.*?> selector = this.selector;
6862  
6863 <.*?>
< table.height() ) {
<.*?><.*?> // Argument shifting
6864 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof flatten === 'string' ) {
6865 <.*?>
< table.height() ) {
<.*?><.*?> alwaysNew = fn;
6866 <.*?>
< table.height() ) {
<.*?><.*?> fn = type;
6867 <.*?>
< table.height() ) {
<.*?><.*?> type = flatten;
6868 <.*?>
< table.height() ) {
<.*?><.*?> flatten = false;
6869 <.*?>
< table.height() ) {
<.*?><.*?> }
6870  
6871 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=context.length ; i<ien ; i++ ) {
6872 <.*?>
< table.height() ) {
<.*?><.*?> var apiInst = new _Api( context[i] );
6873  
6874 <.*?>
< table.height() ) {
<.*?><.*?> if ( type === 'table' ) {
6875 <.*?>
< table.height() ) {
<.*?><.*?> ret = fn.call( apiInst, context[i], i );
6876  
6877 <.*?>
< table.height() ) {
<.*?><.*?> if ( ret !== undefined ) {
6878 <.*?>
< table.height() ) {
<.*?><.*?> a.push( ret );
6879 <.*?>
< table.height() ) {
<.*?><.*?> }
6880 <.*?>
< table.height() ) {
<.*?><.*?> }
6881 <.*?>
< table.height() ) {
<.*?><.*?> else if ( type === 'columns' || type === 'rows' ) {
6882 <.*?>
< table.height() ) {
<.*?><.*?> // this has same length as context - one entry for each table
6883 <.*?>
< table.height() ) {
<.*?><.*?> ret = fn.call( apiInst, context[i], this[i], i );
6884  
6885 <.*?>
< table.height() ) {
<.*?><.*?> if ( ret !== undefined ) {
6886 <.*?>
< table.height() ) {
<.*?><.*?> a.push( ret );
6887 <.*?>
< table.height() ) {
<.*?><.*?> }
6888 <.*?>
< table.height() ) {
<.*?><.*?> }
6889 <.*?>
< table.height() ) {
<.*?><.*?> else if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {
6890 <.*?>
< table.height() ) {
<.*?><.*?> // columns and rows share the same structure.
6891 <.*?>
< table.height() ) {
<.*?><.*?> // 'this' is an array of column indexes for each context
6892 <.*?>
< table.height() ) {
<.*?><.*?> items = this[i];
6893  
6894 <.*?>
< table.height() ) {
<.*?><.*?> if ( type === 'column-rows' ) {
6895 <.*?>
< table.height() ) {
<.*?><.*?> rows = _selector_row_indexes( context[i], selector.opts );
6896 <.*?>
< table.height() ) {
<.*?><.*?> }
6897  
6898 <.*?>
< table.height() ) {
<.*?><.*?> for ( j=0, jen=items.length ; j<jen ; j++ ) {
6899 <.*?>
< table.height() ) {
<.*?><.*?> item = items[j];
6900  
6901 <.*?>
< table.height() ) {
<.*?><.*?> if ( type === 'cell' ) {
6902 <.*?>
< table.height() ) {
<.*?><.*?> ret = fn.call( apiInst, context[i], item.row, item.column, i, j );
6903 <.*?>
< table.height() ) {
<.*?><.*?> }
6904 <.*?>
< table.height() ) {
<.*?><.*?> else {
6905 <.*?>
< table.height() ) {
<.*?><.*?> ret = fn.call( apiInst, context[i], item, i, j, rows );
6906 <.*?>
< table.height() ) {
<.*?><.*?> }
6907  
6908 <.*?>
< table.height() ) {
<.*?><.*?> if ( ret !== undefined ) {
6909 <.*?>
< table.height() ) {
<.*?><.*?> a.push( ret );
6910 <.*?>
< table.height() ) {
<.*?><.*?> }
6911 <.*?>
< table.height() ) {
<.*?><.*?> }
6912 <.*?>
< table.height() ) {
<.*?><.*?> }
6913 <.*?>
< table.height() ) {
<.*?><.*?> }
6914  
6915 <.*?>
< table.height() ) {
<.*?><.*?> if ( a.length || alwaysNew ) {
6916 <.*?>
< table.height() ) {
<.*?><.*?> var api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );
6917 <.*?>
< table.height() ) {
<.*?><.*?> var apiSelector = api.selector;
6918 <.*?>
< table.height() ) {
<.*?><.*?> apiSelector.rows = selector.rows;
6919 <.*?>
< table.height() ) {
<.*?><.*?> apiSelector.cols = selector.cols;
6920 <.*?>
< table.height() ) {
<.*?><.*?> apiSelector.opts = selector.opts;
6921 <.*?>
< table.height() ) {
<.*?><.*?> return api;
6922 <.*?>
< table.height() ) {
<.*?><.*?> }
6923 <.*?>
< table.height() ) {
<.*?><.*?> return this;
6924 <.*?>
< table.height() ) {
<.*?><.*?> },
6925  
6926  
6927 <.*?>
< table.height() ) {
<.*?><.*?> lastIndexOf: __arrayProto.lastIndexOf || function (obj, start)
6928 <.*?>
< table.height() ) {
<.*?><.*?> {
6929 <.*?>
< table.height() ) {
<.*?><.*?> // Bit cheeky...
6930 <.*?>
< table.height() ) {
<.*?><.*?> return this.indexOf.apply( this.toArray.reverse(), arguments );
6931 <.*?>
< table.height() ) {
<.*?><.*?> },
6932  
6933  
6934 <.*?>
< table.height() ) {
<.*?><.*?> length: 0,
6935  
6936  
6937 <.*?>
< table.height() ) {
<.*?><.*?> map: function ( fn )
6938 <.*?>
< table.height() ) {
<.*?><.*?> {
6939 <.*?>
< table.height() ) {
<.*?><.*?> var a = [];
6940  
6941 <.*?>
< table.height() ) {
<.*?><.*?> if ( __arrayProto.map ) {
6942 <.*?>
< table.height() ) {
<.*?><.*?> a = __arrayProto.map.call( this, fn, this );
6943 <.*?>
< table.height() ) {
<.*?><.*?> }
6944 <.*?>
< table.height() ) {
<.*?><.*?> else {
6945 <.*?>
< table.height() ) {
<.*?><.*?> // Compatibility for browsers without EMCA-252-5 (JS 1.6)
6946 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=this.length ; i<ien ; i++ ) {
6947 <.*?>
< table.height() ) {
<.*?><.*?> a.push( fn.call( this, this[i], i ) );
6948 <.*?>
< table.height() ) {
<.*?><.*?> }
6949 <.*?>
< table.height() ) {
<.*?><.*?> }
6950  
6951 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( this.context, a );
6952 <.*?>
< table.height() ) {
<.*?><.*?> },
6953  
6954  
6955 <.*?>
< table.height() ) {
<.*?><.*?> pluck: function ( prop )
6956 <.*?>
< table.height() ) {
<.*?><.*?> {
6957 <.*?>
< table.height() ) {
<.*?><.*?> return this.map( function ( el ) {
6958 <.*?>
< table.height() ) {
<.*?><.*?> return el[ prop ];
6959 <.*?>
< table.height() ) {
<.*?><.*?> } );
6960 <.*?>
< table.height() ) {
<.*?><.*?> },
6961  
6962 <.*?>
< table.height() ) {
<.*?><.*?> pop: __arrayProto.pop,
6963  
6964  
6965 <.*?>
< table.height() ) {
<.*?><.*?> push: __arrayProto.push,
6966  
6967  
6968 <.*?>
< table.height() ) {
<.*?><.*?> // Does not return an API instance
6969 <.*?>
< table.height() ) {
<.*?><.*?> reduce: __arrayProto.reduce || function ( fn, init )
6970 <.*?>
< table.height() ) {
<.*?><.*?> {
6971 <.*?>
< table.height() ) {
<.*?><.*?> return _fnReduce( this, fn, init, 0, this.length, 1 );
6972 <.*?>
< table.height() ) {
<.*?><.*?> },
6973  
6974  
6975 <.*?>
< table.height() ) {
<.*?><.*?> reduceRight: __arrayProto.reduceRight || function ( fn, init )
6976 <.*?>
< table.height() ) {
<.*?><.*?> {
6977 <.*?>
< table.height() ) {
<.*?><.*?> return _fnReduce( this, fn, init, this.length-1, -1, -1 );
6978 <.*?>
< table.height() ) {
<.*?><.*?> },
6979  
6980  
6981 <.*?>
< table.height() ) {
<.*?><.*?> reverse: __arrayProto.reverse,
6982  
6983  
6984 <.*?>
< table.height() ) {
<.*?><.*?> // Object with rows, columns and opts
6985 <.*?>
< table.height() ) {
<.*?><.*?> selector: null,
6986  
6987  
6988 <.*?>
< table.height() ) {
<.*?><.*?> shift: __arrayProto.shift,
6989  
6990  
6991 <.*?>
< table.height() ) {
<.*?><.*?> sort: __arrayProto.sort, // ? name - order?
6992  
6993  
6994 <.*?>
< table.height() ) {
<.*?><.*?> splice: __arrayProto.splice,
6995  
6996  
6997 <.*?>
< table.height() ) {
<.*?><.*?> toArray: function ()
6998 <.*?>
< table.height() ) {
<.*?><.*?> {
6999 <.*?>
< table.height() ) {
<.*?><.*?> return __arrayProto.slice.call( this );
7000 <.*?>
< table.height() ) {
<.*?><.*?> },
7001  
7002  
7003 <.*?>
< table.height() ) {
<.*?><.*?> to$: function ()
7004 <.*?>
< table.height() ) {
<.*?><.*?> {
7005 <.*?>
< table.height() ) {
<.*?><.*?> return $( this );
7006 <.*?>
< table.height() ) {
<.*?><.*?> },
7007  
7008  
7009 <.*?>
< table.height() ) {
<.*?><.*?> toJQuery: function ()
7010 <.*?>
< table.height() ) {
<.*?><.*?> {
7011 <.*?>
< table.height() ) {
<.*?><.*?> return $( this );
7012 <.*?>
< table.height() ) {
<.*?><.*?> },
7013  
7014  
7015 <.*?>
< table.height() ) {
<.*?><.*?> unique: function ()
7016 <.*?>
< table.height() ) {
<.*?><.*?> {
7017 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( this.context, _unique(this) );
7018 <.*?>
< table.height() ) {
<.*?><.*?> },
7019  
7020  
7021 <.*?>
< table.height() ) {
<.*?><.*?> unshift: __arrayProto.unshift
7022 <.*?>
< table.height() ) {
<.*?><.*?> };
7023  
7024  
7025 <.*?>
< table.height() ) {
<.*?><.*?> _Api.extend = function ( scope, obj, ext )
7026 <.*?>
< table.height() ) {
<.*?><.*?> {
7027 <.*?>
< table.height() ) {
<.*?><.*?> // Only extend API instances and static properties of the API
7028 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {
7029 <.*?>
< table.height() ) {
<.*?><.*?> return;
7030 <.*?>
< table.height() ) {
<.*?><.*?> }
7031  
7032 <.*?>
< table.height() ) {
<.*?><.*?> var
7033 <.*?>
< table.height() ) {
<.*?><.*?> i, ien,
7034 <.*?>
< table.height() ) {
<.*?><.*?> j, jen,
7035 <.*?>
< table.height() ) {
<.*?><.*?> struct, inner,
7036 <.*?>
< table.height() ) {
<.*?><.*?> methodScoping = function ( scope, fn, struc ) {
7037 <.*?>
< table.height() ) {
<.*?><.*?> return function () {
7038 <.*?>
< table.height() ) {
<.*?><.*?> var ret = fn.apply( scope, arguments );
7039  
7040 <.*?>
< table.height() ) {
<.*?><.*?> // Method extension
7041 <.*?>
< table.height() ) {
<.*?><.*?> _Api.extend( ret, ret, struc.methodExt );
7042 <.*?>
< table.height() ) {
<.*?><.*?> return ret;
7043 <.*?>
< table.height() ) {
<.*?><.*?> };
7044 <.*?>
< table.height() ) {
<.*?><.*?> };
7045  
7046 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=ext.length ; i<ien ; i++ ) {
7047 <.*?>
< table.height() ) {
<.*?><.*?> struct = ext[i];
7048  
7049 <.*?>
< table.height() ) {
<.*?><.*?> // Value
7050 <.*?>
< table.height() ) {
<.*?><.*?> obj[ struct.name ] = typeof struct.val === 'function' ?
7051 <.*?>
< table.height() ) {
<.*?><.*?> methodScoping( scope, struct.val, struct ) :
7052 <.*?>
< table.height() ) {
<.*?><.*?> $.isPlainObject( struct.val ) ?
7053 <.*?>
< table.height() ) {
<.*?><.*?> {} :
7054 <.*?>
< table.height() ) {
<.*?><.*?> struct.val;
7055  
7056 <.*?>
< table.height() ) {
<.*?><.*?> obj[ struct.name ].__dt_wrapper = true;
7057  
7058 <.*?>
< table.height() ) {
<.*?><.*?> // Property extension
7059 <.*?>
< table.height() ) {
<.*?><.*?> _Api.extend( scope, obj[ struct.name ], struct.propExt );
7060 <.*?>
< table.height() ) {
<.*?><.*?> }
7061 <.*?>
< table.height() ) {
<.*?><.*?> };
7062  
7063  
7064 <.*?>
< table.height() ) {
<.*?><.*?> // @todo - Is there need for an augment function?
7065 <.*?>
< table.height() ) {
<.*?><.*?> // _Api.augment = function ( inst, name )
7066 <.*?>
< table.height() ) {
<.*?><.*?> // {
7067 <.*?>
< table.height() ) {
<.*?><.*?> // // Find src object in the structure from the name
7068 <.*?>
< table.height() ) {
<.*?><.*?> // var parts = name.split('.');
7069  
7070 <.*?>
< table.height() ) {
<.*?><.*?> // _Api.extend( inst, obj );
7071 <.*?>
< table.height() ) {
<.*?><.*?> // };
7072  
7073  
7074 <.*?>
< table.height() ) {
<.*?><.*?> // [
7075 <.*?>
< table.height() ) {
<.*?><.*?> // {
7076 <.*?>
< table.height() ) {
<.*?><.*?> // name: 'data' -- string - Property name
7077 <.*?>
< table.height() ) {
<.*?><.*?> // val: function () {}, -- function - Api method (or undefined if just an object
7078 <.*?>
< table.height() ) {
<.*?><.*?> // methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
7079 <.*?>
< table.height() ) {
<.*?><.*?> // propExt: [ ... ] -- array - Array of Api object definitions to extend the property
7080 <.*?>
< table.height() ) {
<.*?><.*?> // },
7081 <.*?>
< table.height() ) {
<.*?><.*?> // {
7082 <.*?>
< table.height() ) {
<.*?><.*?> // name: 'row'
7083 <.*?>
< table.height() ) {
<.*?><.*?> // val: {},
7084 <.*?>
< table.height() ) {
<.*?><.*?> // methodExt: [ ... ],
7085 <.*?>
< table.height() ) {
<.*?><.*?> // propExt: [
7086 <.*?>
< table.height() ) {
<.*?><.*?> // {
7087 <.*?>
< table.height() ) {
<.*?><.*?> // name: 'data'
7088 <.*?>
< table.height() ) {
<.*?><.*?> // val: function () {},
7089 <.*?>
< table.height() ) {
<.*?><.*?> // methodExt: [ ... ],
7090 <.*?>
< table.height() ) {
<.*?><.*?> // propExt: [ ... ]
7091 <.*?>
< table.height() ) {
<.*?><.*?> // },
7092 <.*?>
< table.height() ) {
<.*?><.*?> // ...
7093 <.*?>
< table.height() ) {
<.*?><.*?> // ]
7094 <.*?>
< table.height() ) {
<.*?><.*?> // }
7095 <.*?>
< table.height() ) {
<.*?><.*?> // ]
7096  
7097 <.*?>
< table.height() ) {
<.*?><.*?> _Api.register = _api_register = function ( name, val )
7098 <.*?>
< table.height() ) {
<.*?><.*?> {
7099 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isArray( name ) ) {
7100 <.*?>
< table.height() ) {
<.*?><.*?> for ( var j=0, jen=name.length ; j<jen ; j++ ) {
7101 <.*?>
< table.height() ) {
<.*?><.*?> _Api.register( name[j], val );
7102 <.*?>
< table.height() ) {
<.*?><.*?> }
7103 <.*?>
< table.height() ) {
<.*?><.*?> return;
7104 <.*?>
< table.height() ) {
<.*?><.*?> }
7105  
7106 <.*?>
< table.height() ) {
<.*?><.*?> var
7107 <.*?>
< table.height() ) {
<.*?><.*?> i, ien,
7108 <.*?>
< table.height() ) {
<.*?><.*?> heir = name.split('.'),
7109 <.*?>
< table.height() ) {
<.*?><.*?> struct = __apiStruct,
7110 <.*?>
< table.height() ) {
<.*?><.*?> key, method;
7111  
7112 <.*?>
< table.height() ) {
<.*?><.*?> var find = function ( src, name ) {
7113 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=src.length ; i<ien ; i++ ) {
7114 <.*?>
< table.height() ) {
<.*?><.*?> if ( src[i].name === name ) {
7115 <.*?>
< table.height() ) {
<.*?><.*?> return src[i];
7116 <.*?>
< table.height() ) {
<.*?><.*?> }
7117 <.*?>
< table.height() ) {
<.*?><.*?> }
7118 <.*?>
< table.height() ) {
<.*?><.*?> return null;
7119 <.*?>
< table.height() ) {
<.*?><.*?> };
7120  
7121 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=heir.length ; i<ien ; i++ ) {
7122 <.*?>
< table.height() ) {
<.*?><.*?> method = heir[i].indexOf('()') !== -1;
7123 <.*?>
< table.height() ) {
<.*?><.*?> key = method ?
7124 <.*?>
< table.height() ) {
<.*?><.*?> heir[i].replace('()', '') :
7125 <.*?>
< table.height() ) {
<.*?><.*?> heir[i];
7126  
7127 <.*?>
< table.height() ) {
<.*?><.*?> var src = find( struct, key );
7128 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! src ) {
7129 <.*?>
< table.height() ) {
<.*?><.*?> src = {
7130 <.*?>
< table.height() ) {
<.*?><.*?> name: key,
7131 <.*?>
< table.height() ) {
<.*?><.*?> val: {},
7132 <.*?>
< table.height() ) {
<.*?><.*?> methodExt: [],
7133 <.*?>
< table.height() ) {
<.*?><.*?> propExt: []
7134 <.*?>
< table.height() ) {
<.*?><.*?> };
7135 <.*?>
< table.height() ) {
<.*?><.*?> struct.push( src );
7136 <.*?>
< table.height() ) {
<.*?><.*?> }
7137  
7138 <.*?>
< table.height() ) {
<.*?><.*?> if ( i === ien-1 ) {
7139 <.*?>
< table.height() ) {
<.*?><.*?> src.val = val;
7140 <.*?>
< table.height() ) {
<.*?><.*?> }
7141 <.*?>
< table.height() ) {
<.*?><.*?> else {
7142 <.*?>
< table.height() ) {
<.*?><.*?> struct = method ?
7143 <.*?>
< table.height() ) {
<.*?><.*?> src.methodExt :
7144 <.*?>
< table.height() ) {
<.*?><.*?> src.propExt;
7145 <.*?>
< table.height() ) {
<.*?><.*?> }
7146 <.*?>
< table.height() ) {
<.*?><.*?> }
7147 <.*?>
< table.height() ) {
<.*?><.*?> };
7148  
7149  
7150 <.*?>
< table.height() ) {
<.*?><.*?> _Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {
7151 <.*?>
< table.height() ) {
<.*?><.*?> _Api.register( pluralName, val );
7152  
7153 <.*?>
< table.height() ) {
<.*?><.*?> _Api.register( singularName, function () {
7154 <.*?>
< table.height() ) {
<.*?><.*?> var ret = val.apply( this, arguments );
7155  
7156 <.*?>
< table.height() ) {
<.*?><.*?> if ( ret === this ) {
7157 <.*?>
< table.height() ) {
<.*?><.*?> // Returned item is the API instance that was passed in, return it
7158 <.*?>
< table.height() ) {
<.*?><.*?> return this;
7159 <.*?>
< table.height() ) {
<.*?><.*?> }
7160 <.*?>
< table.height() ) {
<.*?><.*?> else if ( ret instanceof _Api ) {
7161 <.*?>
< table.height() ) {
<.*?><.*?> // New API instance returned, want the value from the first item
7162 <.*?>
< table.height() ) {
<.*?><.*?> // in the returned array for the singular result.
7163 <.*?>
< table.height() ) {
<.*?><.*?> return ret.length ?
7164 <.*?>
< table.height() ) {
<.*?><.*?> $.isArray( ret[0] ) ?
7165 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
7166 <.*?>
< table.height() ) {
<.*?><.*?> ret[0] :
7167 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
7168 <.*?>
< table.height() ) {
<.*?><.*?> }
7169  
7170 <.*?>
< table.height() ) {
<.*?><.*?> // Non-API return - just fire it back
7171 <.*?>
< table.height() ) {
<.*?><.*?> return ret;
7172 <.*?>
< table.height() ) {
<.*?><.*?> } );
7173 <.*?>
< table.height() ) {
<.*?><.*?> };
7174  
7175  
7176 <.*?>
< table.height() ) {
<.*?><.*?> /**
7177 <.*?>
< table.height() ) {
<.*?><.*?> * Selector for HTML tables. Apply the given selector to the give array of
7178 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables settings objects.
7179 <.*?>
< table.height() ) {
<.*?><.*?> *
7180 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|integer} [selector] jQuery selector string or integer
7181 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} Array of DataTables settings objects to be filtered
7182 <.*?>
< table.height() ) {
<.*?><.*?> * @return {array}
7183 <.*?>
< table.height() ) {
<.*?><.*?> * @ignore
7184 <.*?>
< table.height() ) {
<.*?><.*?> */
7185 <.*?>
< table.height() ) {
<.*?><.*?> var __table_selector = function ( selector, a )
7186 <.*?>
< table.height() ) {
<.*?><.*?> {
7187 <.*?>
< table.height() ) {
<.*?><.*?> // Integer is used to pick out a table by index
7188 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof selector === 'number' ) {
7189 <.*?>
< table.height() ) {
<.*?><.*?> return [ a[ selector ] ];
7190 <.*?>
< table.height() ) {
<.*?><.*?> }
7191  
7192 <.*?>
< table.height() ) {
<.*?><.*?> // Perform a jQuery selector on the table nodes
7193 <.*?>
< table.height() ) {
<.*?><.*?> var nodes = $.map( a, function (el, i) {
7194 <.*?>
< table.height() ) {
<.*?><.*?> return el.nTable;
7195 <.*?>
< table.height() ) {
<.*?><.*?> } );
7196  
7197 <.*?>
< table.height() ) {
<.*?><.*?> return $(nodes)
7198 <.*?>
< table.height() ) {
<.*?><.*?> .filter( selector )
7199 <.*?>
< table.height() ) {
<.*?><.*?> .map( function (i) {
7200 <.*?>
< table.height() ) {
<.*?><.*?> // Need to translate back from the table node to the settings
7201 <.*?>
< table.height() ) {
<.*?><.*?> var idx = $.inArray( this, nodes );
7202 <.*?>
< table.height() ) {
<.*?><.*?> return a[ idx ];
7203 <.*?>
< table.height() ) {
<.*?><.*?> } )
7204 <.*?>
< table.height() ) {
<.*?><.*?> .toArray();
7205 <.*?>
< table.height() ) {
<.*?><.*?> };
7206  
7207  
7208  
7209 <.*?>
< table.height() ) {
<.*?><.*?> /**
7210 <.*?>
< table.height() ) {
<.*?><.*?> * Context selector for the API's context (i.e. the tables the API instance
7211 <.*?>
< table.height() ) {
<.*?><.*?> * refers to.
7212 <.*?>
< table.height() ) {
<.*?><.*?> *
7213 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.Api#tables
7214 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string|integer} [selector] Selector to pick which tables the iterator
7215 <.*?>
< table.height() ) {
<.*?><.*?> * should operate on. If not given, all tables in the current context are
7216 <.*?>
< table.height() ) {
<.*?><.*?> * used. This can be given as a jQuery selector (for example `':gt(0)'`) to
7217 <.*?>
< table.height() ) {
<.*?><.*?> * select multiple tables or as an integer to select a single table.
7218 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTable.Api} Returns a new API instance if a selector is given.
7219 <.*?>
< table.height() ) {
<.*?><.*?> */
7220 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'tables()', function ( selector ) {
7221 <.*?>
< table.height() ) {
<.*?><.*?> // A new instance is created if there was a selector specified
7222 <.*?>
< table.height() ) {
<.*?><.*?> return selector ?
7223 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( __table_selector( selector, this.context ) ) :
7224 <.*?>
< table.height() ) {
<.*?><.*?> this;
7225 <.*?>
< table.height() ) {
<.*?><.*?> } );
7226  
7227  
7228 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'table()', function ( selector ) {
7229 <.*?>
< table.height() ) {
<.*?><.*?> var tables = this.tables( selector );
7230 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = tables.context;
7231  
7232 <.*?>
< table.height() ) {
<.*?><.*?> // Truncate to the first matched table
7233 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length ?
7234 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( ctx[0] ) :
7235 <.*?>
< table.height() ) {
<.*?><.*?> tables;
7236 <.*?>
< table.height() ) {
<.*?><.*?> } );
7237  
7238  
7239 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'tables().nodes()', 'table().node()' , function () {
7240 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7241 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.nTable;
7242 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7243 <.*?>
< table.height() ) {
<.*?><.*?> } );
7244  
7245  
7246 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'tables().body()', 'table().body()' , function () {
7247 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7248 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.nTBody;
7249 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7250 <.*?>
< table.height() ) {
<.*?><.*?> } );
7251  
7252  
7253 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'tables().header()', 'table().header()' , function () {
7254 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7255 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.nTHead;
7256 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7257 <.*?>
< table.height() ) {
<.*?><.*?> } );
7258  
7259  
7260 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'tables().footer()', 'table().footer()' , function () {
7261 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7262 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.nTFoot;
7263 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7264 <.*?>
< table.height() ) {
<.*?><.*?> } );
7265  
7266  
7267 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'tables().containers()', 'table().container()' , function () {
7268 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7269 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.nTableWrapper;
7270 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7271 <.*?>
< table.height() ) {
<.*?><.*?> } );
7272  
7273  
7274  
7275 <.*?>
< table.height() ) {
<.*?><.*?> /**
7276 <.*?>
< table.height() ) {
<.*?><.*?> * Redraw the tables in the current context.
7277 <.*?>
< table.height() ) {
<.*?><.*?> *
7278 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [reset=true] Reset (default) or hold the current paging
7279 <.*?>
< table.height() ) {
<.*?><.*?> * position. A full re-sort and re-filter is performed when this method is
7280 <.*?>
< table.height() ) {
<.*?><.*?> * called, which is why the pagination reset is the default action.
7281 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7282 <.*?>
< table.height() ) {
<.*?><.*?> */
7283 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'draw()', function ( resetPaging ) {
7284 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
7285 <.*?>
< table.height() ) {
<.*?><.*?> _fnReDraw( settings, resetPaging===false );
7286 <.*?>
< table.height() ) {
<.*?><.*?> } );
7287 <.*?>
< table.height() ) {
<.*?><.*?> } );
7288  
7289  
7290  
7291 <.*?>
< table.height() ) {
<.*?><.*?> /**
7292 <.*?>
< table.height() ) {
<.*?><.*?> * Get the current page index.
7293 <.*?>
< table.height() ) {
<.*?><.*?> *
7294 <.*?>
< table.height() ) {
<.*?><.*?> * @return {integer} Current page index (zero based)
7295 <.*?>
< table.height() ) {
<.*?><.*?> *//**
7296 <.*?>
< table.height() ) {
<.*?><.*?> * Set the current page.
7297 <.*?>
< table.height() ) {
<.*?><.*?> *
7298 <.*?>
< table.height() ) {
<.*?><.*?> * Note that if you attempt to show a page which does not exist, DataTables will
7299 <.*?>
< table.height() ) {
<.*?><.*?> * not throw an error, but rather reset the paging.
7300 <.*?>
< table.height() ) {
<.*?><.*?> *
7301 <.*?>
< table.height() ) {
<.*?><.*?> * @param {integer|string} action The paging action to take. This can be one of:
7302 <.*?>
< table.height() ) {
<.*?><.*?> * * `integer` - The page index to jump to
7303 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - An action to take:
7304 <.*?>
< table.height() ) {
<.*?><.*?> * * `first` - Jump to first page.
7305 <.*?>
< table.height() ) {
<.*?><.*?> * * `next` - Jump to the next page
7306 <.*?>
< table.height() ) {
<.*?><.*?> * * `previous` - Jump to previous page
7307 <.*?>
< table.height() ) {
<.*?><.*?> * * `last` - Jump to the last page.
7308 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7309 <.*?>
< table.height() ) {
<.*?><.*?> */
7310 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'page()', function ( action ) {
7311 <.*?>
< table.height() ) {
<.*?><.*?> if ( action === undefined ) {
7312 <.*?>
< table.height() ) {
<.*?><.*?> return this.page.info().page; // not an expensive call
7313 <.*?>
< table.height() ) {
<.*?><.*?> }
7314  
7315 <.*?>
< table.height() ) {
<.*?><.*?> // else, have an action to take on all tables
7316 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
7317 <.*?>
< table.height() ) {
<.*?><.*?> _fnPageChange( settings, action );
7318 <.*?>
< table.height() ) {
<.*?><.*?> } );
7319 <.*?>
< table.height() ) {
<.*?><.*?> } );
7320  
7321  
7322 <.*?>
< table.height() ) {
<.*?><.*?> /**
7323 <.*?>
< table.height() ) {
<.*?><.*?> * Paging information for the first table in the current context.
7324 <.*?>
< table.height() ) {
<.*?><.*?> *
7325 <.*?>
< table.height() ) {
<.*?><.*?> * If you require paging information for another table, use the `table()` method
7326 <.*?>
< table.height() ) {
<.*?><.*?> * with a suitable selector.
7327 <.*?>
< table.height() ) {
<.*?><.*?> *
7328 <.*?>
< table.height() ) {
<.*?><.*?> * @return {object} Object with the following properties set:
7329 <.*?>
< table.height() ) {
<.*?><.*?> * * `page` - Current page index (zero based - i.e. the first page is `0`)
7330 <.*?>
< table.height() ) {
<.*?><.*?> * * `pages` - Total number of pages
7331 <.*?>
< table.height() ) {
<.*?><.*?> * * `start` - Display index for the first record shown on the current page
7332 <.*?>
< table.height() ) {
<.*?><.*?> * * `end` - Display index for the last record shown on the current page
7333 <.*?>
< table.height() ) {
<.*?><.*?> * * `length` - Display length (number of records). Note that generally `start
7334 <.*?>
< table.height() ) {
<.*?><.*?> * + length = end`, but this is not always true, for example if there are
7335 <.*?>
< table.height() ) {
<.*?><.*?> * only 2 records to show on the final page, with a length of 10.
7336 <.*?>
< table.height() ) {
<.*?><.*?> * * `recordsTotal` - Full data set length
7337 <.*?>
< table.height() ) {
<.*?><.*?> * * `recordsDisplay` - Data set length once the current filtering criterion
7338 <.*?>
< table.height() ) {
<.*?><.*?> * are applied.
7339 <.*?>
< table.height() ) {
<.*?><.*?> */
7340 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'page.info()', function ( action ) {
7341 <.*?>
< table.height() ) {
<.*?><.*?> if ( this.context.length === 0 ) {
7342 <.*?>
< table.height() ) {
<.*?><.*?> return undefined;
7343 <.*?>
< table.height() ) {
<.*?><.*?> }
7344  
7345 <.*?>
< table.height() ) {
<.*?><.*?> var
7346 <.*?>
< table.height() ) {
<.*?><.*?> settings = this.context[0],
7347 <.*?>
< table.height() ) {
<.*?><.*?> start = settings._iDisplayStart,
7348 <.*?>
< table.height() ) {
<.*?><.*?> len = settings._iDisplayLength,
7349 <.*?>
< table.height() ) {
<.*?><.*?> visRecords = settings.fnRecordsDisplay(),
7350 <.*?>
< table.height() ) {
<.*?><.*?> all = len === -1;
7351  
7352 <.*?>
< table.height() ) {
<.*?><.*?> return {
7353 <.*?>
< table.height() ) {
<.*?><.*?> "page": all ? 0 : Math.floor( start / len ),
7354 <.*?>
< table.height() ) {
<.*?><.*?> "pages": all ? 1 : Math.ceil( visRecords / len ),
7355 <.*?>
< table.height() ) {
<.*?><.*?> "start": start,
7356 <.*?>
< table.height() ) {
<.*?><.*?> "end": settings.fnDisplayEnd(),
7357 <.*?>
< table.height() ) {
<.*?><.*?> "length": len,
7358 <.*?>
< table.height() ) {
<.*?><.*?> "recordsTotal": settings.fnRecordsTotal(),
7359 <.*?>
< table.height() ) {
<.*?><.*?> "recordsDisplay": visRecords
7360 <.*?>
< table.height() ) {
<.*?><.*?> };
7361 <.*?>
< table.height() ) {
<.*?><.*?> } );
7362  
7363  
7364 <.*?>
< table.height() ) {
<.*?><.*?> /**
7365 <.*?>
< table.height() ) {
<.*?><.*?> * Get the current page length.
7366 <.*?>
< table.height() ) {
<.*?><.*?> *
7367 <.*?>
< table.height() ) {
<.*?><.*?> * @return {integer} Current page length. Note `-1` indicates that all records
7368 <.*?>
< table.height() ) {
<.*?><.*?> * are to be shown.
7369 <.*?>
< table.height() ) {
<.*?><.*?> *//**
7370 <.*?>
< table.height() ) {
<.*?><.*?> * Set the current page length.
7371 <.*?>
< table.height() ) {
<.*?><.*?> *
7372 <.*?>
< table.height() ) {
<.*?><.*?> * @param {integer} Page length to set. Use `-1` to show all records.
7373 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7374 <.*?>
< table.height() ) {
<.*?><.*?> */
7375 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'page.len()', function ( len ) {
7376 <.*?>
< table.height() ) {
<.*?><.*?> // Note that we can't call this function 'length()' because `length`
7377 <.*?>
< table.height() ) {
<.*?><.*?> // is a Javascript property of functions which defines how many arguments
7378 <.*?>
< table.height() ) {
<.*?><.*?> // the function expects.
7379 <.*?>
< table.height() ) {
<.*?><.*?> if ( len === undefined ) {
7380 <.*?>
< table.height() ) {
<.*?><.*?> return this.context.length !== 0 ?
7381 <.*?>
< table.height() ) {
<.*?><.*?> this.context[0]._iDisplayLength :
7382 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
7383 <.*?>
< table.height() ) {
<.*?><.*?> }
7384  
7385 <.*?>
< table.height() ) {
<.*?><.*?> // else, set the page length
7386 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
7387 <.*?>
< table.height() ) {
<.*?><.*?> _fnLengthChange( settings, len );
7388 <.*?>
< table.height() ) {
<.*?><.*?> } );
7389 <.*?>
< table.height() ) {
<.*?><.*?> } );
7390  
7391  
7392  
7393 <.*?>
< table.height() ) {
<.*?><.*?> var __reload = function ( settings, holdPosition, callback ) {
7394 <.*?>
< table.height() ) {
<.*?><.*?> // Use the draw event to trigger a callback
7395 <.*?>
< table.height() ) {
<.*?><.*?> if ( callback ) {
7396 <.*?>
< table.height() ) {
<.*?><.*?> var api = new _Api( settings );
7397  
7398 <.*?>
< table.height() ) {
<.*?><.*?> api.one( 'draw', function () {
7399 <.*?>
< table.height() ) {
<.*?><.*?> callback( api.ajax.json() );
7400 <.*?>
< table.height() ) {
<.*?><.*?> } );
7401 <.*?>
< table.height() ) {
<.*?><.*?> }
7402  
7403 <.*?>
< table.height() ) {
<.*?><.*?> if ( _fnDataSource( settings ) == 'ssp' ) {
7404 <.*?>
< table.height() ) {
<.*?><.*?> _fnReDraw( settings, holdPosition );
7405 <.*?>
< table.height() ) {
<.*?><.*?> }
7406 <.*?>
< table.height() ) {
<.*?><.*?> else {
7407 <.*?>
< table.height() ) {
<.*?><.*?> // Trigger xhr
7408 <.*?>
< table.height() ) {
<.*?><.*?> _fnProcessingDisplay( settings, true );
7409  
7410 <.*?>
< table.height() ) {
<.*?><.*?> _fnBuildAjax( settings, [], function( json ) {
7411 <.*?>
< table.height() ) {
<.*?><.*?> _fnClearTable( settings );
7412  
7413 <.*?>
< table.height() ) {
<.*?><.*?> var data = _fnAjaxDataSrc( settings, json );
7414 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=data.length ; i<ien ; i++ ) {
7415 <.*?>
< table.height() ) {
<.*?><.*?> _fnAddData( settings, data[i] );
7416 <.*?>
< table.height() ) {
<.*?><.*?> }
7417  
7418 <.*?>
< table.height() ) {
<.*?><.*?> _fnReDraw( settings, holdPosition );
7419 <.*?>
< table.height() ) {
<.*?><.*?> _fnProcessingDisplay( settings, false );
7420 <.*?>
< table.height() ) {
<.*?><.*?> } );
7421 <.*?>
< table.height() ) {
<.*?><.*?> }
7422 <.*?>
< table.height() ) {
<.*?><.*?> };
7423  
7424  
7425 <.*?>
< table.height() ) {
<.*?><.*?> /**
7426 <.*?>
< table.height() ) {
<.*?><.*?> * Get the JSON response from the last Ajax request that DataTables made to the
7427 <.*?>
< table.height() ) {
<.*?><.*?> * server. Note that this returns the JSON from the first table in the current
7428 <.*?>
< table.height() ) {
<.*?><.*?> * context.
7429 <.*?>
< table.height() ) {
<.*?><.*?> *
7430 <.*?>
< table.height() ) {
<.*?><.*?> * @return {object} JSON received from the server.
7431 <.*?>
< table.height() ) {
<.*?><.*?> */
7432 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'ajax.json()', function () {
7433 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
7434  
7435 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length > 0 ) {
7436 <.*?>
< table.height() ) {
<.*?><.*?> return ctx[0].json;
7437 <.*?>
< table.height() ) {
<.*?><.*?> }
7438  
7439 <.*?>
< table.height() ) {
<.*?><.*?> // else return undefined;
7440 <.*?>
< table.height() ) {
<.*?><.*?> } );
7441  
7442  
7443 <.*?>
< table.height() ) {
<.*?><.*?> /**
7444 <.*?>
< table.height() ) {
<.*?><.*?> * Get the data submitted in the last Ajax request
7445 <.*?>
< table.height() ) {
<.*?><.*?> */
7446 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'ajax.params()', function () {
7447 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
7448  
7449 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length > 0 ) {
7450 <.*?>
< table.height() ) {
<.*?><.*?> return ctx[0].oAjaxData;
7451 <.*?>
< table.height() ) {
<.*?><.*?> }
7452  
7453 <.*?>
< table.height() ) {
<.*?><.*?> // else return undefined;
7454 <.*?>
< table.height() ) {
<.*?><.*?> } );
7455  
7456  
7457 <.*?>
< table.height() ) {
<.*?><.*?> /**
7458 <.*?>
< table.height() ) {
<.*?><.*?> * Reload tables from the Ajax data source. Note that this function will
7459 <.*?>
< table.height() ) {
<.*?><.*?> * automatically re-draw the table when the remote data has been loaded.
7460 <.*?>
< table.height() ) {
<.*?><.*?> *
7461 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [reset=true] Reset (default) or hold the current paging
7462 <.*?>
< table.height() ) {
<.*?><.*?> * position. A full re-sort and re-filter is performed when this method is
7463 <.*?>
< table.height() ) {
<.*?><.*?> * called, which is why the pagination reset is the default action.
7464 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7465 <.*?>
< table.height() ) {
<.*?><.*?> */
7466 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'ajax.reload()', function ( callback, resetPaging ) {
7467 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function (settings) {
7468 <.*?>
< table.height() ) {
<.*?><.*?> __reload( settings, resetPaging===false, callback );
7469 <.*?>
< table.height() ) {
<.*?><.*?> } );
7470 <.*?>
< table.height() ) {
<.*?><.*?> } );
7471  
7472  
7473 <.*?>
< table.height() ) {
<.*?><.*?> /**
7474 <.*?>
< table.height() ) {
<.*?><.*?> * Get the current Ajax URL. Note that this returns the URL from the first
7475 <.*?>
< table.height() ) {
<.*?><.*?> * table in the current context.
7476 <.*?>
< table.height() ) {
<.*?><.*?> *
7477 <.*?>
< table.height() ) {
<.*?><.*?> * @return {string} Current Ajax source URL
7478 <.*?>
< table.height() ) {
<.*?><.*?> *//**
7479 <.*?>
< table.height() ) {
<.*?><.*?> * Set the Ajax URL. Note that this will set the URL for all tables in the
7480 <.*?>
< table.height() ) {
<.*?><.*?> * current context.
7481 <.*?>
< table.height() ) {
<.*?><.*?> *
7482 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} url URL to set.
7483 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7484 <.*?>
< table.height() ) {
<.*?><.*?> */
7485 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'ajax.url()', function ( url ) {
7486 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
7487  
7488 <.*?>
< table.height() ) {
<.*?><.*?> if ( url === undefined ) {
7489 <.*?>
< table.height() ) {
<.*?><.*?> // get
7490 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length === 0 ) {
7491 <.*?>
< table.height() ) {
<.*?><.*?> return undefined;
7492 <.*?>
< table.height() ) {
<.*?><.*?> }
7493 <.*?>
< table.height() ) {
<.*?><.*?> ctx = ctx[0];
7494  
7495 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.ajax ?
7496 <.*?>
< table.height() ) {
<.*?><.*?> $.isPlainObject( ctx.ajax ) ?
7497 <.*?>
< table.height() ) {
<.*?><.*?> ctx.ajax.url :
7498 <.*?>
< table.height() ) {
<.*?><.*?> ctx.ajax :
7499 <.*?>
< table.height() ) {
<.*?><.*?> ctx.sAjaxSource;
7500 <.*?>
< table.height() ) {
<.*?><.*?> }
7501  
7502 <.*?>
< table.height() ) {
<.*?><.*?> // set
7503 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
7504 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( settings.ajax ) ) {
7505 <.*?>
< table.height() ) {
<.*?><.*?> settings.ajax.url = url;
7506 <.*?>
< table.height() ) {
<.*?><.*?> }
7507 <.*?>
< table.height() ) {
<.*?><.*?> else {
7508 <.*?>
< table.height() ) {
<.*?><.*?> settings.ajax = url;
7509 <.*?>
< table.height() ) {
<.*?><.*?> }
7510 <.*?>
< table.height() ) {
<.*?><.*?> // No need to consider sAjaxSource here since DataTables gives priority
7511 <.*?>
< table.height() ) {
<.*?><.*?> // to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
7512 <.*?>
< table.height() ) {
<.*?><.*?> // value of `sAjaxSource` redundant.
7513 <.*?>
< table.height() ) {
<.*?><.*?> } );
7514 <.*?>
< table.height() ) {
<.*?><.*?> } );
7515  
7516  
7517 <.*?>
< table.height() ) {
<.*?><.*?> /**
7518 <.*?>
< table.height() ) {
<.*?><.*?> * Load data from the newly set Ajax URL. Note that this method is only
7519 <.*?>
< table.height() ) {
<.*?><.*?> * available when `ajax.url()` is used to set a URL. Additionally, this method
7520 <.*?>
< table.height() ) {
<.*?><.*?> * has the same effect as calling `ajax.reload()` but is provided for
7521 <.*?>
< table.height() ) {
<.*?><.*?> * convenience when setting a new URL. Like `ajax.reload()` it will
7522 <.*?>
< table.height() ) {
<.*?><.*?> * automatically redraw the table once the remote data has been loaded.
7523 <.*?>
< table.height() ) {
<.*?><.*?> *
7524 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
7525 <.*?>
< table.height() ) {
<.*?><.*?> */
7526 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'ajax.url().load()', function ( callback, resetPaging ) {
7527 <.*?>
< table.height() ) {
<.*?><.*?> // Same as a reload, but makes sense to present it for easy access after a
7528 <.*?>
< table.height() ) {
<.*?><.*?> // url change
7529 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( ctx ) {
7530 <.*?>
< table.height() ) {
<.*?><.*?> __reload( ctx, resetPaging===false, callback );
7531 <.*?>
< table.height() ) {
<.*?><.*?> } );
7532 <.*?>
< table.height() ) {
<.*?><.*?> } );
7533  
7534  
7535  
7536  
7537 <.*?>
< table.height() ) {
<.*?><.*?> var _selector_run = function ( type, selector, selectFn, settings, opts )
7538 <.*?>
< table.height() ) {
<.*?><.*?> {
7539 <.*?>
< table.height() ) {
<.*?><.*?> var
7540 <.*?>
< table.height() ) {
<.*?><.*?> out = [], res,
7541 <.*?>
< table.height() ) {
<.*?><.*?> a, i, ien, j, jen,
7542 <.*?>
< table.height() ) {
<.*?><.*?> selectorType = typeof selector;
7543  
7544 <.*?>
< table.height() ) {
<.*?><.*?> // Can't just check for isArray here, as an API or jQuery instance might be
7545 <.*?>
< table.height() ) {
<.*?><.*?> // given with their array like look
7546 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {
7547 <.*?>
< table.height() ) {
<.*?><.*?> selector = [ selector ];
7548 <.*?>
< table.height() ) {
<.*?><.*?> }
7549  
7550 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=selector.length ; i<ien ; i++ ) {
7551 <.*?>
< table.height() ) {
<.*?><.*?> a = selector[i] && selector[i].split ?
7552 <.*?>
< table.height() ) {
<.*?><.*?> selector[i].split(',') :
7553 <.*?>
< table.height() ) {
<.*?><.*?> [ selector[i] ];
7554  
7555 <.*?>
< table.height() ) {
<.*?><.*?> for ( j=0, jen=a.length ; j<jen ; j++ ) {
7556 <.*?>
< table.height() ) {
<.*?><.*?> res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );
7557  
7558 <.*?>
< table.height() ) {
<.*?><.*?> if ( res && res.length ) {
7559 <.*?>
< table.height() ) {
<.*?><.*?> out.push.apply( out, res );
7560 <.*?>
< table.height() ) {
<.*?><.*?> }
7561 <.*?>
< table.height() ) {
<.*?><.*?> }
7562 <.*?>
< table.height() ) {
<.*?><.*?> }
7563  
7564 <.*?>
< table.height() ) {
<.*?><.*?> // selector extensions
7565 <.*?>
< table.height() ) {
<.*?><.*?> var ext = _ext.selector[ type ];
7566 <.*?>
< table.height() ) {
<.*?><.*?> if ( ext.length ) {
7567 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=ext.length ; i<ien ; i++ ) {
7568 <.*?>
< table.height() ) {
<.*?><.*?> out = ext[i]( settings, opts, out );
7569 <.*?>
< table.height() ) {
<.*?><.*?> }
7570 <.*?>
< table.height() ) {
<.*?><.*?> }
7571  
7572 <.*?>
< table.height() ) {
<.*?><.*?> return out;
7573 <.*?>
< table.height() ) {
<.*?><.*?> };
7574  
7575  
7576 <.*?>
< table.height() ) {
<.*?><.*?> var _selector_opts = function ( opts )
7577 <.*?>
< table.height() ) {
<.*?><.*?> {
7578 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! opts ) {
7579 <.*?>
< table.height() ) {
<.*?><.*?> opts = {};
7580 <.*?>
< table.height() ) {
<.*?><.*?> }
7581  
7582 <.*?>
< table.height() ) {
<.*?><.*?> // Backwards compatibility for 1.9- which used the terminology filter rather
7583 <.*?>
< table.height() ) {
<.*?><.*?> // than search
7584 <.*?>
< table.height() ) {
<.*?><.*?> if ( opts.filter && opts.search === undefined ) {
7585 <.*?>
< table.height() ) {
<.*?><.*?> opts.search = opts.filter;
7586 <.*?>
< table.height() ) {
<.*?><.*?> }
7587  
7588 <.*?>
< table.height() ) {
<.*?><.*?> return $.extend( {
7589 <.*?>
< table.height() ) {
<.*?><.*?> search: 'none',
7590 <.*?>
< table.height() ) {
<.*?><.*?> order: 'current',
7591 <.*?>
< table.height() ) {
<.*?><.*?> page: 'all'
7592 <.*?>
< table.height() ) {
<.*?><.*?> }, opts );
7593 <.*?>
< table.height() ) {
<.*?><.*?> };
7594  
7595  
7596 <.*?>
< table.height() ) {
<.*?><.*?> var _selector_first = function ( inst )
7597 <.*?>
< table.height() ) {
<.*?><.*?> {
7598 <.*?>
< table.height() ) {
<.*?><.*?> // Reduce the API instance to the first item found
7599 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=inst.length ; i<ien ; i++ ) {
7600 <.*?>
< table.height() ) {
<.*?><.*?> if ( inst[i].length > 0 ) {
7601 <.*?>
< table.height() ) {
<.*?><.*?> // Assign the first element to the first item in the instance
7602 <.*?>
< table.height() ) {
<.*?><.*?> // and truncate the instance and context
7603 <.*?>
< table.height() ) {
<.*?><.*?> inst[0] = inst[i];
7604 <.*?>
< table.height() ) {
<.*?><.*?> inst[0].length = 1;
7605 <.*?>
< table.height() ) {
<.*?><.*?> inst.length = 1;
7606 <.*?>
< table.height() ) {
<.*?><.*?> inst.context = [ inst.context[i] ];
7607  
7608 <.*?>
< table.height() ) {
<.*?><.*?> return inst;
7609 <.*?>
< table.height() ) {
<.*?><.*?> }
7610 <.*?>
< table.height() ) {
<.*?><.*?> }
7611  
7612 <.*?>
< table.height() ) {
<.*?><.*?> // Not found - return an empty instance
7613 <.*?>
< table.height() ) {
<.*?><.*?> inst.length = 0;
7614 <.*?>
< table.height() ) {
<.*?><.*?> return inst;
7615 <.*?>
< table.height() ) {
<.*?><.*?> };
7616  
7617  
7618 <.*?>
< table.height() ) {
<.*?><.*?> var _selector_row_indexes = function ( settings, opts )
7619 <.*?>
< table.height() ) {
<.*?><.*?> {
7620 <.*?>
< table.height() ) {
<.*?><.*?> var
7621 <.*?>
< table.height() ) {
<.*?><.*?> i, ien, tmp, a=[],
7622 <.*?>
< table.height() ) {
<.*?><.*?> displayFiltered = settings.aiDisplay,
7623 <.*?>
< table.height() ) {
<.*?><.*?> displayMaster = settings.aiDisplayMaster;
7624  
7625 <.*?>
< table.height() ) {
<.*?><.*?> var
7626 <.*?>
< table.height() ) {
<.*?><.*?> search = opts.search, // none, applied, removed
7627 <.*?>
< table.height() ) {
<.*?><.*?> order = opts.order, // applied, current, index (original - compatibility with 1.9)
7628 <.*?>
< table.height() ) {
<.*?><.*?> page = opts.page; // all, current
7629  
7630 <.*?>
< table.height() ) {
<.*?><.*?> if ( _fnDataSource( settings ) == 'ssp' ) {
7631 <.*?>
< table.height() ) {
<.*?><.*?> // In server-side processing mode, most options are irrelevant since
7632 <.*?>
< table.height() ) {
<.*?><.*?> // rows not shown don't exist and the index order is the applied order
7633 <.*?>
< table.height() ) {
<.*?><.*?> // Removed is a special case - for consistency just return an empty
7634 <.*?>
< table.height() ) {
<.*?><.*?> // array
7635 <.*?>
< table.height() ) {
<.*?><.*?> return search === 'removed' ?
7636 <.*?>
< table.height() ) {
<.*?><.*?> [] :
7637 <.*?>
< table.height() ) {
<.*?><.*?> _range( 0, displayMaster.length );
7638 <.*?>
< table.height() ) {
<.*?><.*?> }
7639 <.*?>
< table.height() ) {
<.*?><.*?> else if ( page == 'current' ) {
7640 <.*?>
< table.height() ) {
<.*?><.*?> // Current page implies that order=current and fitler=applied, since it is
7641 <.*?>
< table.height() ) {
<.*?><.*?> // fairly senseless otherwise, regardless of what order and search actually
7642 <.*?>
< table.height() ) {
<.*?><.*?> // are
7643 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {
7644 <.*?>
< table.height() ) {
<.*?><.*?> a.push( displayFiltered[i] );
7645 <.*?>
< table.height() ) {
<.*?><.*?> }
7646 <.*?>
< table.height() ) {
<.*?><.*?> }
7647 <.*?>
< table.height() ) {
<.*?><.*?> else if ( order == 'current' || order == 'applied' ) {
7648 <.*?>
< table.height() ) {
<.*?><.*?> a = search == 'none' ?
7649 <.*?>
< table.height() ) {
<.*?><.*?> displayMaster.slice() : // no search
7650 <.*?>
< table.height() ) {
<.*?><.*?> search == 'applied' ?
7651 <.*?>
< table.height() ) {
<.*?><.*?> displayFiltered.slice() : // applied search
7652 <.*?>
< table.height() ) {
<.*?><.*?> $.map( displayMaster, function (el, i) { // removed search
7653 <.*?>
< table.height() ) {
<.*?><.*?> return $.inArray( el, displayFiltered ) === -1 ? el : null;
7654 <.*?>
< table.height() ) {
<.*?><.*?> } );
7655 <.*?>
< table.height() ) {
<.*?><.*?> }
7656 <.*?>
< table.height() ) {
<.*?><.*?> else if ( order == 'index' || order == 'original' ) {
7657 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
7658 <.*?>
< table.height() ) {
<.*?><.*?> if ( search == 'none' ) {
7659 <.*?>
< table.height() ) {
<.*?><.*?> a.push( i );
7660 <.*?>
< table.height() ) {
<.*?><.*?> }
7661 <.*?>
< table.height() ) {
<.*?><.*?> else { // applied | removed
7662 <.*?>
< table.height() ) {
<.*?><.*?> tmp = $.inArray( i, displayFiltered );
7663  
7664 <.*?>
< table.height() ) {
<.*?><.*?> if ((tmp === -1 && search == 'removed') ||
7665 <.*?>
< table.height() ) {
<.*?><.*?> (tmp >= 0 && search == 'applied') )
7666 <.*?>
< table.height() ) {
<.*?><.*?> {
7667 <.*?>
< table.height() ) {
<.*?><.*?> a.push( i );
7668 <.*?>
< table.height() ) {
<.*?><.*?> }
7669 <.*?>
< table.height() ) {
<.*?><.*?> }
7670 <.*?>
< table.height() ) {
<.*?><.*?> }
7671 <.*?>
< table.height() ) {
<.*?><.*?> }
7672  
7673 <.*?>
< table.height() ) {
<.*?><.*?> return a;
7674 <.*?>
< table.height() ) {
<.*?><.*?> };
7675  
7676  
7677 <.*?>
< table.height() ) {
<.*?><.*?> /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
7678 <.*?>
< table.height() ) {
<.*?><.*?> * Rows
7679 <.*?>
< table.height() ) {
<.*?><.*?> *
7680 <.*?>
< table.height() ) {
<.*?><.*?> * {} - no selector - use all available rows
7681 <.*?>
< table.height() ) {
<.*?><.*?> * {integer} - row aoData index
7682 <.*?>
< table.height() ) {
<.*?><.*?> * {node} - TR node
7683 <.*?>
< table.height() ) {
<.*?><.*?> * {string} - jQuery selector to apply to the TR elements
7684 <.*?>
< table.height() ) {
<.*?><.*?> * {array} - jQuery array of nodes, or simply an array of TR nodes
7685 <.*?>
< table.height() ) {
<.*?><.*?> *
7686 <.*?>
< table.height() ) {
<.*?><.*?> */
7687  
7688  
7689 <.*?>
< table.height() ) {
<.*?><.*?> var __row_selector = function ( settings, selector, opts )
7690 <.*?>
< table.height() ) {
<.*?><.*?> {
7691 <.*?>
< table.height() ) {
<.*?><.*?> var run = function ( sel ) {
7692 <.*?>
< table.height() ) {
<.*?><.*?> var selInt = _intVal( sel );
7693 <.*?>
< table.height() ) {
<.*?><.*?> var i, ien;
7694  
7695 <.*?>
< table.height() ) {
<.*?><.*?> // Short cut - selector is a number and no options provided (default is
7696 <.*?>
< table.height() ) {
<.*?><.*?> // all records, so no need to check if the index is in there, since it
7697 <.*?>
< table.height() ) {
<.*?><.*?> // must be - dev error if the index doesn't exist).
7698 <.*?>
< table.height() ) {
<.*?><.*?> if ( selInt !== null && ! opts ) {
7699 <.*?>
< table.height() ) {
<.*?><.*?> return [ selInt ];
7700 <.*?>
< table.height() ) {
<.*?><.*?> }
7701  
7702 <.*?>
< table.height() ) {
<.*?><.*?> var rows = _selector_row_indexes( settings, opts );
7703  
7704 <.*?>
< table.height() ) {
<.*?><.*?> if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {
7705 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - integer
7706 <.*?>
< table.height() ) {
<.*?><.*?> return [ selInt ];
7707 <.*?>
< table.height() ) {
<.*?><.*?> }
7708 <.*?>
< table.height() ) {
<.*?><.*?> else if ( ! sel ) {
7709 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - none
7710 <.*?>
< table.height() ) {
<.*?><.*?> return rows;
7711 <.*?>
< table.height() ) {
<.*?><.*?> }
7712  
7713 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - function
7714 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof sel === 'function' ) {
7715 <.*?>
< table.height() ) {
<.*?><.*?> return $.map( rows, function (idx) {
7716 <.*?>
< table.height() ) {
<.*?><.*?> var row = settings.aoData[ idx ];
7717 <.*?>
< table.height() ) {
<.*?><.*?> return sel( idx, row._aData, row.nTr ) ? idx : null;
7718 <.*?>
< table.height() ) {
<.*?><.*?> } );
7719 <.*?>
< table.height() ) {
<.*?><.*?> }
7720  
7721 <.*?>
< table.height() ) {
<.*?><.*?> // Get nodes in the order from the `rows` array with null values removed
7722 <.*?>
< table.height() ) {
<.*?><.*?> var nodes = _removeEmpty(
7723 <.*?>
< table.height() ) {
<.*?><.*?> _pluck_order( settings.aoData, rows, 'nTr' )
7724 <.*?>
< table.height() ) {
<.*?><.*?> );
7725  
7726 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - node
7727 <.*?>
< table.height() ) {
<.*?><.*?> if ( sel.nodeName ) {
7728 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.inArray( sel, nodes ) !== -1 ) {
7729 <.*?>
< table.height() ) {
<.*?><.*?> return [ sel._DT_RowIndex ]; // sel is a TR node that is in the table
7730 <.*?>
< table.height() ) {
<.*?><.*?> // and DataTables adds a prop for fast lookup
7731 <.*?>
< table.height() ) {
<.*?><.*?> }
7732 <.*?>
< table.height() ) {
<.*?><.*?> }
7733  
7734 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - jQuery selector string, array of nodes or jQuery object/
7735 <.*?>
< table.height() ) {
<.*?><.*?> // As jQuery's .filter() allows jQuery objects to be passed in filter,
7736 <.*?>
< table.height() ) {
<.*?><.*?> // it also allows arrays, so this will cope with all three options
7737 <.*?>
< table.height() ) {
<.*?><.*?> return $(nodes)
7738 <.*?>
< table.height() ) {
<.*?><.*?> .filter( sel )
7739 <.*?>
< table.height() ) {
<.*?><.*?> .map( function () {
7740 <.*?>
< table.height() ) {
<.*?><.*?> return this._DT_RowIndex;
7741 <.*?>
< table.height() ) {
<.*?><.*?> } )
7742 <.*?>
< table.height() ) {
<.*?><.*?> .toArray();
7743 <.*?>
< table.height() ) {
<.*?><.*?> };
7744  
7745 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_run( 'row', selector, run, settings, opts );
7746 <.*?>
< table.height() ) {
<.*?><.*?> };
7747  
7748  
7749 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'rows()', function ( selector, opts ) {
7750 <.*?>
< table.height() ) {
<.*?><.*?> // argument shifting
7751 <.*?>
< table.height() ) {
<.*?><.*?> if ( selector === undefined ) {
7752 <.*?>
< table.height() ) {
<.*?><.*?> selector = '';
7753 <.*?>
< table.height() ) {
<.*?><.*?> }
7754 <.*?>
< table.height() ) {
<.*?><.*?> else if ( $.isPlainObject( selector ) ) {
7755 <.*?>
< table.height() ) {
<.*?><.*?> opts = selector;
7756 <.*?>
< table.height() ) {
<.*?><.*?> selector = '';
7757 <.*?>
< table.height() ) {
<.*?><.*?> }
7758  
7759 <.*?>
< table.height() ) {
<.*?><.*?> opts = _selector_opts( opts );
7760  
7761 <.*?>
< table.height() ) {
<.*?><.*?> var inst = this.iterator( 'table', function ( settings ) {
7762 <.*?>
< table.height() ) {
<.*?><.*?> return __row_selector( settings, selector, opts );
7763 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7764  
7765 <.*?>
< table.height() ) {
<.*?><.*?> // Want argument shifting here and in __row_selector?
7766 <.*?>
< table.height() ) {
<.*?><.*?> inst.selector.rows = selector;
7767 <.*?>
< table.height() ) {
<.*?><.*?> inst.selector.opts = opts;
7768  
7769 <.*?>
< table.height() ) {
<.*?><.*?> return inst;
7770 <.*?>
< table.height() ) {
<.*?><.*?> } );
7771  
7772 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'rows().nodes()', function () {
7773 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'row', function ( settings, row ) {
7774 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoData[ row ].nTr || undefined;
7775 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7776 <.*?>
< table.height() ) {
<.*?><.*?> } );
7777  
7778 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'rows().data()', function () {
7779 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( true, 'rows', function ( settings, rows ) {
7780 <.*?>
< table.height() ) {
<.*?><.*?> return _pluck_order( settings.aoData, rows, '_aData' );
7781 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7782 <.*?>
< table.height() ) {
<.*?><.*?> } );
7783  
7784 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {
7785 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'row', function ( settings, row ) {
7786 <.*?>
< table.height() ) {
<.*?><.*?> var r = settings.aoData[ row ];
7787 <.*?>
< table.height() ) {
<.*?><.*?> return type === 'search' ? r._aFilterData : r._aSortData;
7788 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7789 <.*?>
< table.height() ) {
<.*?><.*?> } );
7790  
7791 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {
7792 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'row', function ( settings, row ) {
7793 <.*?>
< table.height() ) {
<.*?><.*?> _fnInvalidate( settings, row, src );
7794 <.*?>
< table.height() ) {
<.*?><.*?> } );
7795 <.*?>
< table.height() ) {
<.*?><.*?> } );
7796  
7797 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'rows().indexes()', 'row().index()', function () {
7798 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'row', function ( settings, row ) {
7799 <.*?>
< table.height() ) {
<.*?><.*?> return row;
7800 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7801 <.*?>
< table.height() ) {
<.*?><.*?> } );
7802  
7803 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'rows().remove()', 'row().remove()', function () {
7804 <.*?>
< table.height() ) {
<.*?><.*?> var that = this;
7805  
7806 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'row', function ( settings, row, thatIdx ) {
7807 <.*?>
< table.height() ) {
<.*?><.*?> var data = settings.aoData;
7808  
7809 <.*?>
< table.height() ) {
<.*?><.*?> data.splice( row, 1 );
7810  
7811 <.*?>
< table.height() ) {
<.*?><.*?> // Update the _DT_RowIndex parameter on all rows in the table
7812 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=data.length ; i<ien ; i++ ) {
7813 <.*?>
< table.height() ) {
<.*?><.*?> if ( data[i].nTr !== null ) {
7814 <.*?>
< table.height() ) {
<.*?><.*?> data[i].nTr._DT_RowIndex = i;
7815 <.*?>
< table.height() ) {
<.*?><.*?> }
7816 <.*?>
< table.height() ) {
<.*?><.*?> }
7817  
7818 <.*?>
< table.height() ) {
<.*?><.*?> // Remove the target row from the search array
7819 <.*?>
< table.height() ) {
<.*?><.*?> var displayIndex = $.inArray( row, settings.aiDisplay );
7820  
7821 <.*?>
< table.height() ) {
<.*?><.*?> // Delete from the display arrays
7822 <.*?>
< table.height() ) {
<.*?><.*?> _fnDeleteIndex( settings.aiDisplayMaster, row );
7823 <.*?>
< table.height() ) {
<.*?><.*?> _fnDeleteIndex( settings.aiDisplay, row );
7824 <.*?>
< table.height() ) {
<.*?><.*?> _fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes
7825  
7826 <.*?>
< table.height() ) {
<.*?><.*?> // Check for an 'overflow' they case for displaying the table
7827 <.*?>
< table.height() ) {
<.*?><.*?> _fnLengthOverflow( settings );
7828 <.*?>
< table.height() ) {
<.*?><.*?> } );
7829 <.*?>
< table.height() ) {
<.*?><.*?> } );
7830  
7831  
7832 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'rows.add()', function ( rows ) {
7833 <.*?>
< table.height() ) {
<.*?><.*?> var newRows = this.iterator( 'table', function ( settings ) {
7834 <.*?>
< table.height() ) {
<.*?><.*?> var row, i, ien;
7835 <.*?>
< table.height() ) {
<.*?><.*?> var out = [];
7836  
7837 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=rows.length ; i<ien ; i++ ) {
7838 <.*?>
< table.height() ) {
<.*?><.*?> row = rows[i];
7839  
7840 <.*?>
< table.height() ) {
<.*?><.*?> if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
7841 <.*?>
< table.height() ) {
<.*?><.*?> out.push( _fnAddTr( settings, row )[0] );
7842 <.*?>
< table.height() ) {
<.*?><.*?> }
7843 <.*?>
< table.height() ) {
<.*?><.*?> else {
7844 <.*?>
< table.height() ) {
<.*?><.*?> out.push( _fnAddData( settings, row ) );
7845 <.*?>
< table.height() ) {
<.*?><.*?> }
7846 <.*?>
< table.height() ) {
<.*?><.*?> }
7847  
7848 <.*?>
< table.height() ) {
<.*?><.*?> return out;
7849 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
7850  
7851 <.*?>
< table.height() ) {
<.*?><.*?> // Return an Api.rows() extended instance, so rows().nodes() etc can be used
7852 <.*?>
< table.height() ) {
<.*?><.*?> var modRows = this.rows( -1 );
7853 <.*?>
< table.height() ) {
<.*?><.*?> modRows.pop();
7854 <.*?>
< table.height() ) {
<.*?><.*?> modRows.push.apply( modRows, newRows.toArray() );
7855  
7856 <.*?>
< table.height() ) {
<.*?><.*?> return modRows;
7857 <.*?>
< table.height() ) {
<.*?><.*?> } );
7858  
7859  
7860  
7861  
7862  
7863 <.*?>
< table.height() ) {
<.*?><.*?> /**
7864 <.*?>
< table.height() ) {
<.*?><.*?> *
7865 <.*?>
< table.height() ) {
<.*?><.*?> */
7866 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'row()', function ( selector, opts ) {
7867 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_first( this.rows( selector, opts ) );
7868 <.*?>
< table.height() ) {
<.*?><.*?> } );
7869  
7870  
7871 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'row().data()', function ( data ) {
7872 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
7873  
7874 <.*?>
< table.height() ) {
<.*?><.*?> if ( data === undefined ) {
7875 <.*?>
< table.height() ) {
<.*?><.*?> // Get
7876 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length && this.length ?
7877 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].aoData[ this[0] ]._aData :
7878 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
7879 <.*?>
< table.height() ) {
<.*?><.*?> }
7880  
7881 <.*?>
< table.height() ) {
<.*?><.*?> // Set
7882 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].aoData[ this[0] ]._aData = data;
7883  
7884 <.*?>
< table.height() ) {
<.*?><.*?> // Automatically invalidate
7885 <.*?>
< table.height() ) {
<.*?><.*?> _fnInvalidate( ctx[0], this[0], 'data' );
7886  
7887 <.*?>
< table.height() ) {
<.*?><.*?> return this;
7888 <.*?>
< table.height() ) {
<.*?><.*?> } );
7889  
7890  
7891 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'row().node()', function () {
7892 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
7893  
7894 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length && this.length ?
7895 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].aoData[ this[0] ].nTr || null :
7896 <.*?>
< table.height() ) {
<.*?><.*?> null;
7897 <.*?>
< table.height() ) {
<.*?><.*?> } );
7898  
7899  
7900 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'row.add()', function ( row ) {
7901 <.*?>
< table.height() ) {
<.*?><.*?> // Allow a jQuery object to be passed in - only a single row is added from
7902 <.*?>
< table.height() ) {
<.*?><.*?> // it though - the first element in the set
7903 <.*?>
< table.height() ) {
<.*?><.*?> if ( row instanceof $ && row.length ) {
7904 <.*?>
< table.height() ) {
<.*?><.*?> row = row[0];
7905 <.*?>
< table.height() ) {
<.*?><.*?> }
7906  
7907 <.*?>
< table.height() ) {
<.*?><.*?> var rows = this.iterator( 'table', function ( settings ) {
7908 <.*?>
< table.height() ) {
<.*?><.*?> if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
7909 <.*?>
< table.height() ) {
<.*?><.*?> return _fnAddTr( settings, row )[0];
7910 <.*?>
< table.height() ) {
<.*?><.*?> }
7911 <.*?>
< table.height() ) {
<.*?><.*?> return _fnAddData( settings, row );
7912 <.*?>
< table.height() ) {
<.*?><.*?> } );
7913  
7914 <.*?>
< table.height() ) {
<.*?><.*?> // Return an Api.rows() extended instance, with the newly added row selected
7915 <.*?>
< table.height() ) {
<.*?><.*?> return this.row( rows[0] );
7916 <.*?>
< table.height() ) {
<.*?><.*?> } );
7917  
7918  
7919  
7920 <.*?>
< table.height() ) {
<.*?><.*?> var __details_add = function ( ctx, row, data, klass )
7921 <.*?>
< table.height() ) {
<.*?><.*?> {
7922 <.*?>
< table.height() ) {
<.*?><.*?> // Convert to array of TR elements
7923 <.*?>
< table.height() ) {
<.*?><.*?> var rows = [];
7924 <.*?>
< table.height() ) {
<.*?><.*?> var addRow = function ( r, k ) {
7925 <.*?>
< table.height() ) {
<.*?><.*?> // Recursion to allow for arrays of jQuery objects
7926 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isArray( r ) || r instanceof $ ) {
7927 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=r.length ; i<ien ; i++ ) {
7928 <.*?>
< table.height() ) {
<.*?><.*?> addRow( r[i], k );
7929 <.*?>
< table.height() ) {
<.*?><.*?> }
7930 <.*?>
< table.height() ) {
<.*?><.*?> return;
7931 <.*?>
< table.height() ) {
<.*?><.*?> }
7932  
7933 <.*?>
< table.height() ) {
<.*?><.*?> // If we get a TR element, then just add it directly - up to the dev
7934 <.*?>
< table.height() ) {
<.*?><.*?> // to add the correct number of columns etc
7935 <.*?>
< table.height() ) {
<.*?><.*?> if ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {
7936 <.*?>
< table.height() ) {
<.*?><.*?> rows.push( r );
7937 <.*?>
< table.height() ) {
<.*?><.*?> }
7938 <.*?>
< table.height() ) {
<.*?><.*?> else {
7939 <.*?>
< table.height() ) {
<.*?><.*?> // Otherwise create a row with a wrapper
7940 <.*?>
< table.height() ) {
<.*?><.*?> var created = $('<tr><td/></tr>').addClass( k );
7941 <.*?>
< table.height() ) {
<.*?><.*?> $('td', created)
7942 <.*?>
< table.height() ) {
<.*?><.*?> .addClass( k )
7943 <.*?>
< table.height() ) {
<.*?><.*?> .html( r )
7944 <.*?>
< table.height() ) {
<.*?><.*?> [0].colSpan = _fnVisbleColumns( ctx );
7945  
7946 <.*?>
< table.height() ) {
<.*?><.*?> rows.push( created[0] );
7947 <.*?>
< table.height() ) {
<.*?><.*?> }
7948 <.*?>
< table.height() ) {
<.*?><.*?> };
7949  
7950 <.*?>
< table.height() ) {
<.*?><.*?> addRow( data, klass );
7951  
7952 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._details ) {
7953 <.*?>
< table.height() ) {
<.*?><.*?> row._details.remove();
7954 <.*?>
< table.height() ) {
<.*?><.*?> }
7955  
7956 <.*?>
< table.height() ) {
<.*?><.*?> row._details = $(rows);
7957  
7958 <.*?>
< table.height() ) {
<.*?><.*?> // If the children were already shown, that state should be retained
7959 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._detailsShow ) {
7960 <.*?>
< table.height() ) {
<.*?><.*?> row._details.insertAfter( row.nTr );
7961 <.*?>
< table.height() ) {
<.*?><.*?> }
7962 <.*?>
< table.height() ) {
<.*?><.*?> };
7963  
7964  
7965 <.*?>
< table.height() ) {
<.*?><.*?> var __details_remove = function ( api, idx )
7966 <.*?>
< table.height() ) {
<.*?><.*?> {
7967 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = api.context;
7968  
7969 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length ) {
7970 <.*?>
< table.height() ) {
<.*?><.*?> var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];
7971  
7972 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._details ) {
7973 <.*?>
< table.height() ) {
<.*?><.*?> row._details.remove();
7974  
7975 <.*?>
< table.height() ) {
<.*?><.*?> row._detailsShow = undefined;
7976 <.*?>
< table.height() ) {
<.*?><.*?> row._details = undefined;
7977 <.*?>
< table.height() ) {
<.*?><.*?> }
7978 <.*?>
< table.height() ) {
<.*?><.*?> }
7979 <.*?>
< table.height() ) {
<.*?><.*?> };
7980  
7981  
7982 <.*?>
< table.height() ) {
<.*?><.*?> var __details_display = function ( api, show ) {
7983 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = api.context;
7984  
7985 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length && api.length ) {
7986 <.*?>
< table.height() ) {
<.*?><.*?> var row = ctx[0].aoData[ api[0] ];
7987  
7988 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._details ) {
7989 <.*?>
< table.height() ) {
<.*?><.*?> row._detailsShow = show;
7990  
7991 <.*?>
< table.height() ) {
<.*?><.*?> if ( show ) {
7992 <.*?>
< table.height() ) {
<.*?><.*?> row._details.insertAfter( row.nTr );
7993 <.*?>
< table.height() ) {
<.*?><.*?> }
7994 <.*?>
< table.height() ) {
<.*?><.*?> else {
7995 <.*?>
< table.height() ) {
<.*?><.*?> row._details.detach();
7996 <.*?>
< table.height() ) {
<.*?><.*?> }
7997  
7998 <.*?>
< table.height() ) {
<.*?><.*?> __details_events( ctx[0] );
7999 <.*?>
< table.height() ) {
<.*?><.*?> }
8000 <.*?>
< table.height() ) {
<.*?><.*?> }
8001 <.*?>
< table.height() ) {
<.*?><.*?> };
8002  
8003  
8004 <.*?>
< table.height() ) {
<.*?><.*?> var __details_events = function ( settings )
8005 <.*?>
< table.height() ) {
<.*?><.*?> {
8006 <.*?>
< table.height() ) {
<.*?><.*?> var api = new _Api( settings );
8007 <.*?>
< table.height() ) {
<.*?><.*?> var namespace = '.dt.DT_details';
8008 <.*?>
< table.height() ) {
<.*?><.*?> var drawEvent = 'draw'+namespace;
8009 <.*?>
< table.height() ) {
<.*?><.*?> var colvisEvent = 'column-visibility'+namespace;
8010 <.*?>
< table.height() ) {
<.*?><.*?> var destroyEvent = 'destroy'+namespace;
8011 <.*?>
< table.height() ) {
<.*?><.*?> var data = settings.aoData;
8012  
8013 <.*?>
< table.height() ) {
<.*?><.*?> api.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );
8014  
8015 <.*?>
< table.height() ) {
<.*?><.*?> if ( _pluck( data, '_details' ).length > 0 ) {
8016 <.*?>
< table.height() ) {
<.*?><.*?> // On each draw, insert the required elements into the document
8017 <.*?>
< table.height() ) {
<.*?><.*?> api.on( drawEvent, function ( e, ctx ) {
8018 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings !== ctx ) {
8019 <.*?>
< table.height() ) {
<.*?><.*?> return;
8020 <.*?>
< table.height() ) {
<.*?><.*?> }
8021  
8022 <.*?>
< table.height() ) {
<.*?><.*?> api.rows( {page:'current'} ).eq(0).each( function (idx) {
8023 <.*?>
< table.height() ) {
<.*?><.*?> // Internal data grab
8024 <.*?>
< table.height() ) {
<.*?><.*?> var row = data[ idx ];
8025  
8026 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._detailsShow ) {
8027 <.*?>
< table.height() ) {
<.*?><.*?> row._details.insertAfter( row.nTr );
8028 <.*?>
< table.height() ) {
<.*?><.*?> }
8029 <.*?>
< table.height() ) {
<.*?><.*?> } );
8030 <.*?>
< table.height() ) {
<.*?><.*?> } );
8031  
8032 <.*?>
< table.height() ) {
<.*?><.*?> // Column visibility change - update the colspan
8033 <.*?>
< table.height() ) {
<.*?><.*?> api.on( colvisEvent, function ( e, ctx, idx, vis ) {
8034 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings !== ctx ) {
8035 <.*?>
< table.height() ) {
<.*?><.*?> return;
8036 <.*?>
< table.height() ) {
<.*?><.*?> }
8037  
8038 <.*?>
< table.height() ) {
<.*?><.*?> // Update the colspan for the details rows (note, only if it already has
8039 <.*?>
< table.height() ) {
<.*?><.*?> // a colspan)
8040 <.*?>
< table.height() ) {
<.*?><.*?> var row, visible = _fnVisbleColumns( ctx );
8041  
8042 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=data.length ; i<ien ; i++ ) {
8043 <.*?>
< table.height() ) {
<.*?><.*?> row = data[i];
8044  
8045 <.*?>
< table.height() ) {
<.*?><.*?> if ( row._details ) {
8046 <.*?>
< table.height() ) {
<.*?><.*?> row._details.children('td[colspan]').attr('colspan', visible );
8047 <.*?>
< table.height() ) {
<.*?><.*?> }
8048 <.*?>
< table.height() ) {
<.*?><.*?> }
8049 <.*?>
< table.height() ) {
<.*?><.*?> } );
8050  
8051 <.*?>
< table.height() ) {
<.*?><.*?> // Table destroyed - nuke any child rows
8052 <.*?>
< table.height() ) {
<.*?><.*?> api.on( destroyEvent, function ( e, ctx ) {
8053 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings !== ctx ) {
8054 <.*?>
< table.height() ) {
<.*?><.*?> return;
8055 <.*?>
< table.height() ) {
<.*?><.*?> }
8056  
8057 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, ien=data.length ; i<ien ; i++ ) {
8058 <.*?>
< table.height() ) {
<.*?><.*?> if ( data[i]._details ) {
8059 <.*?>
< table.height() ) {
<.*?><.*?> __details_remove( api, i );
8060 <.*?>
< table.height() ) {
<.*?><.*?> }
8061 <.*?>
< table.height() ) {
<.*?><.*?> }
8062 <.*?>
< table.height() ) {
<.*?><.*?> } );
8063 <.*?>
< table.height() ) {
<.*?><.*?> }
8064 <.*?>
< table.height() ) {
<.*?><.*?> };
8065  
8066 <.*?>
< table.height() ) {
<.*?><.*?> // Strings for the method names to help minification
8067 <.*?>
< table.height() ) {
<.*?><.*?> var _emp = '';
8068 <.*?>
< table.height() ) {
<.*?><.*?> var _child_obj = _emp+'row().child';
8069 <.*?>
< table.height() ) {
<.*?><.*?> var _child_mth = _child_obj+'()';
8070  
8071 <.*?>
< table.height() ) {
<.*?><.*?> // data can be:
8072 <.*?>
< table.height() ) {
<.*?><.*?> // tr
8073 <.*?>
< table.height() ) {
<.*?><.*?> // string
8074 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery or array of any of the above
8075 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( _child_mth, function ( data, klass ) {
8076 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8077  
8078 <.*?>
< table.height() ) {
<.*?><.*?> if ( data === undefined ) {
8079 <.*?>
< table.height() ) {
<.*?><.*?> // get
8080 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length && this.length ?
8081 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].aoData[ this[0] ]._details :
8082 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
8083 <.*?>
< table.height() ) {
<.*?><.*?> }
8084 <.*?>
< table.height() ) {
<.*?><.*?> else if ( data === true ) {
8085 <.*?>
< table.height() ) {
<.*?><.*?> // show
8086 <.*?>
< table.height() ) {
<.*?><.*?> this.child.show();
8087 <.*?>
< table.height() ) {
<.*?><.*?> }
8088 <.*?>
< table.height() ) {
<.*?><.*?> else if ( data === false ) {
8089 <.*?>
< table.height() ) {
<.*?><.*?> // remove
8090 <.*?>
< table.height() ) {
<.*?><.*?> __details_remove( this );
8091 <.*?>
< table.height() ) {
<.*?><.*?> }
8092 <.*?>
< table.height() ) {
<.*?><.*?> else if ( ctx.length && this.length ) {
8093 <.*?>
< table.height() ) {
<.*?><.*?> // set
8094 <.*?>
< table.height() ) {
<.*?><.*?> __details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );
8095 <.*?>
< table.height() ) {
<.*?><.*?> }
8096  
8097 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8098 <.*?>
< table.height() ) {
<.*?><.*?> } );
8099  
8100  
8101 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( [
8102 <.*?>
< table.height() ) {
<.*?><.*?> _child_obj+'.show()',
8103 <.*?>
< table.height() ) {
<.*?><.*?> _child_mth+'.show()' // only when `child()` was called with parameters (without
8104 <.*?>
< table.height() ) {
<.*?><.*?> ], function ( show ) { // it returns an object and this method is not executed)
8105 <.*?>
< table.height() ) {
<.*?><.*?> __details_display( this, true );
8106 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8107 <.*?>
< table.height() ) {
<.*?><.*?> } );
8108  
8109  
8110 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( [
8111 <.*?>
< table.height() ) {
<.*?><.*?> _child_obj+'.hide()',
8112 <.*?>
< table.height() ) {
<.*?><.*?> _child_mth+'.hide()' // only when `child()` was called with parameters (without
8113 <.*?>
< table.height() ) {
<.*?><.*?> ], function () { // it returns an object and this method is not executed)
8114 <.*?>
< table.height() ) {
<.*?><.*?> __details_display( this, false );
8115 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8116 <.*?>
< table.height() ) {
<.*?><.*?> } );
8117  
8118  
8119 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( [
8120 <.*?>
< table.height() ) {
<.*?><.*?> _child_obj+'.remove()',
8121 <.*?>
< table.height() ) {
<.*?><.*?> _child_mth+'.remove()' // only when `child()` was called with parameters (without
8122 <.*?>
< table.height() ) {
<.*?><.*?> ], function () { // it returns an object and this method is not executed)
8123 <.*?>
< table.height() ) {
<.*?><.*?> __details_remove( this );
8124 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8125 <.*?>
< table.height() ) {
<.*?><.*?> } );
8126  
8127  
8128 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( _child_obj+'.isShown()', function () {
8129 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8130  
8131 <.*?>
< table.height() ) {
<.*?><.*?> if ( ctx.length && this.length ) {
8132 <.*?>
< table.height() ) {
<.*?><.*?> // _detailsShown as false or undefined will fall through to return false
8133 <.*?>
< table.height() ) {
<.*?><.*?> return ctx[0].aoData[ this[0] ]._detailsShow || false;
8134 <.*?>
< table.height() ) {
<.*?><.*?> }
8135 <.*?>
< table.height() ) {
<.*?><.*?> return false;
8136 <.*?>
< table.height() ) {
<.*?><.*?> } );
8137  
8138  
8139  
8140 <.*?>
< table.height() ) {
<.*?><.*?> /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
8141 <.*?>
< table.height() ) {
<.*?><.*?> * Columns
8142 <.*?>
< table.height() ) {
<.*?><.*?> *
8143 <.*?>
< table.height() ) {
<.*?><.*?> * {integer} - column index (>=0 count from left, <0 count from right)
8144 <.*?>
< table.height() ) {
<.*?><.*?> * "{integer}:visIdx" - visible column index (i.e. translate to column index) (>=0 count from left, <0 count from right)
8145 <.*?>
< table.height() ) {
<.*?><.*?> * "{integer}:visible" - alias for {integer}:visIdx (>=0 count from left, <0 count from right)
8146 <.*?>
< table.height() ) {
<.*?><.*?> * "{string}:name" - column name
8147 <.*?>
< table.height() ) {
<.*?><.*?> * "{string}" - jQuery selector on column header nodes
8148 <.*?>
< table.height() ) {
<.*?><.*?> *
8149 <.*?>
< table.height() ) {
<.*?><.*?> */
8150  
8151 <.*?>
< table.height() ) {
<.*?><.*?> // can be an array of these items, comma separated list, or an array of comma
8152 <.*?>
< table.height() ) {
<.*?><.*?> // separated lists
8153  
8154 <.*?>
< table.height() ) {
<.*?><.*?> var __re_column_selector = /^(.+):(name|visIdx|visible)$/;
8155  
8156  
8157 <.*?>
< table.height() ) {
<.*?><.*?> // r1 and r2 are redundant - but it means that the parameters match for the
8158 <.*?>
< table.height() ) {
<.*?><.*?> // iterator callback in columns().data()
8159 <.*?>
< table.height() ) {
<.*?><.*?> var __columnData = function ( settings, column, r1, r2, rows ) {
8160 <.*?>
< table.height() ) {
<.*?><.*?> var a = [];
8161 <.*?>
< table.height() ) {
<.*?><.*?> for ( var row=0, ien=rows.length ; row<ien ; row++ ) {
8162 <.*?>
< table.height() ) {
<.*?><.*?> a.push( _fnGetCellData( settings, rows[row], column ) );
8163 <.*?>
< table.height() ) {
<.*?><.*?> }
8164 <.*?>
< table.height() ) {
<.*?><.*?> return a;
8165 <.*?>
< table.height() ) {
<.*?><.*?> };
8166  
8167  
8168 <.*?>
< table.height() ) {
<.*?><.*?> var __column_selector = function ( settings, selector, opts )
8169 <.*?>
< table.height() ) {
<.*?><.*?> {
8170 <.*?>
< table.height() ) {
<.*?><.*?> var
8171 <.*?>
< table.height() ) {
<.*?><.*?> columns = settings.aoColumns,
8172 <.*?>
< table.height() ) {
<.*?><.*?> names = _pluck( columns, 'sName' ),
8173 <.*?>
< table.height() ) {
<.*?><.*?> nodes = _pluck( columns, 'nTh' );
8174  
8175 <.*?>
< table.height() ) {
<.*?><.*?> var run = function ( s ) {
8176 <.*?>
< table.height() ) {
<.*?><.*?> var selInt = _intVal( s );
8177  
8178 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - all
8179 <.*?>
< table.height() ) {
<.*?><.*?> if ( s === '' ) {
8180 <.*?>
< table.height() ) {
<.*?><.*?> return _range( columns.length );
8181 <.*?>
< table.height() ) {
<.*?><.*?> }
8182  
8183 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - index
8184 <.*?>
< table.height() ) {
<.*?><.*?> if ( selInt !== null ) {
8185 <.*?>
< table.height() ) {
<.*?><.*?> return [ selInt >= 0 ?
8186 <.*?>
< table.height() ) {
<.*?><.*?> selInt : // Count from left
8187 <.*?>
< table.height() ) {
<.*?><.*?> columns.length + selInt // Count from right (+ because its a negative value)
8188 <.*?>
< table.height() ) {
<.*?><.*?> ];
8189 <.*?>
< table.height() ) {
<.*?><.*?> }
8190  
8191 <.*?>
< table.height() ) {
<.*?><.*?> // Selector = function
8192 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof s === 'function' ) {
8193 <.*?>
< table.height() ) {
<.*?><.*?> var rows = _selector_row_indexes( settings, opts );
8194  
8195 <.*?>
< table.height() ) {
<.*?><.*?> return $.map( columns, function (col, idx) {
8196 <.*?>
< table.height() ) {
<.*?><.*?> return s(
8197 <.*?>
< table.height() ) {
<.*?><.*?> idx,
8198 <.*?>
< table.height() ) {
<.*?><.*?> __columnData( settings, idx, 0, 0, rows ),
8199 <.*?>
< table.height() ) {
<.*?><.*?> nodes[ idx ]
8200 <.*?>
< table.height() ) {
<.*?><.*?> ) ? idx : null;
8201 <.*?>
< table.height() ) {
<.*?><.*?> } );
8202 <.*?>
< table.height() ) {
<.*?><.*?> }
8203  
8204 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery or string selector
8205 <.*?>
< table.height() ) {
<.*?><.*?> var match = typeof s === 'string' ?
8206 <.*?>
< table.height() ) {
<.*?><.*?> s.match( __re_column_selector ) :
8207 <.*?>
< table.height() ) {
<.*?><.*?> '';
8208  
8209 <.*?>
< table.height() ) {
<.*?><.*?> if ( match ) {
8210 <.*?>
< table.height() ) {
<.*?><.*?> switch( match[2] ) {
8211 <.*?>
< table.height() ) {
<.*?><.*?> case 'visIdx':
8212 <.*?>
< table.height() ) {
<.*?><.*?> case 'visible':
8213 <.*?>
< table.height() ) {
<.*?><.*?> var idx = parseInt( match[1], 10 );
8214 <.*?>
< table.height() ) {
<.*?><.*?> // Visible index given, convert to column index
8215 <.*?>
< table.height() ) {
<.*?><.*?> if ( idx < 0 ) {
8216 <.*?>
< table.height() ) {
<.*?><.*?> // Counting from the right
8217 <.*?>
< table.height() ) {
<.*?><.*?> var visColumns = $.map( columns, function (col,i) {
8218 <.*?>
< table.height() ) {
<.*?><.*?> return col.bVisible ? i : null;
8219 <.*?>
< table.height() ) {
<.*?><.*?> } );
8220 <.*?>
< table.height() ) {
<.*?><.*?> return [ visColumns[ visColumns.length + idx ] ];
8221 <.*?>
< table.height() ) {
<.*?><.*?> }
8222 <.*?>
< table.height() ) {
<.*?><.*?> // Counting from the left
8223 <.*?>
< table.height() ) {
<.*?><.*?> return [ _fnVisibleToColumnIndex( settings, idx ) ];
8224  
8225 <.*?>
< table.height() ) {
<.*?><.*?> case 'name':
8226 <.*?>
< table.height() ) {
<.*?><.*?> // match by name. `names` is column index complete and in order
8227 <.*?>
< table.height() ) {
<.*?><.*?> return $.map( names, function (name, i) {
8228 <.*?>
< table.height() ) {
<.*?><.*?> return name === match[1] ? i : null;
8229 <.*?>
< table.height() ) {
<.*?><.*?> } );
8230 <.*?>
< table.height() ) {
<.*?><.*?> }
8231 <.*?>
< table.height() ) {
<.*?><.*?> }
8232 <.*?>
< table.height() ) {
<.*?><.*?> else {
8233 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery selector on the TH elements for the columns
8234 <.*?>
< table.height() ) {
<.*?><.*?> return $( nodes )
8235 <.*?>
< table.height() ) {
<.*?><.*?> .filter( s )
8236 <.*?>
< table.height() ) {
<.*?><.*?> .map( function () {
8237 <.*?>
< table.height() ) {
<.*?><.*?> return $.inArray( this, nodes ); // `nodes` is column index complete and in order
8238 <.*?>
< table.height() ) {
<.*?><.*?> } )
8239 <.*?>
< table.height() ) {
<.*?><.*?> .toArray();
8240 <.*?>
< table.height() ) {
<.*?><.*?> }
8241 <.*?>
< table.height() ) {
<.*?><.*?> };
8242  
8243 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_run( 'column', selector, run, settings, opts );
8244 <.*?>
< table.height() ) {
<.*?><.*?> };
8245  
8246  
8247 <.*?>
< table.height() ) {
<.*?><.*?> var __setColumnVis = function ( settings, column, vis, recalc ) {
8248 <.*?>
< table.height() ) {
<.*?><.*?> var
8249 <.*?>
< table.height() ) {
<.*?><.*?> cols = settings.aoColumns,
8250 <.*?>
< table.height() ) {
<.*?><.*?> col = cols[ column ],
8251 <.*?>
< table.height() ) {
<.*?><.*?> data = settings.aoData,
8252 <.*?>
< table.height() ) {
<.*?><.*?> row, cells, i, ien, tr;
8253  
8254 <.*?>
< table.height() ) {
<.*?><.*?> // Get
8255 <.*?>
< table.height() ) {
<.*?><.*?> if ( vis === undefined ) {
8256 <.*?>
< table.height() ) {
<.*?><.*?> return col.bVisible;
8257 <.*?>
< table.height() ) {
<.*?><.*?> }
8258  
8259 <.*?>
< table.height() ) {
<.*?><.*?> // Set
8260 <.*?>
< table.height() ) {
<.*?><.*?> // No change
8261 <.*?>
< table.height() ) {
<.*?><.*?> if ( col.bVisible === vis ) {
8262 <.*?>
< table.height() ) {
<.*?><.*?> return;
8263 <.*?>
< table.height() ) {
<.*?><.*?> }
8264  
8265 <.*?>
< table.height() ) {
<.*?><.*?> if ( vis ) {
8266 <.*?>
< table.height() ) {
<.*?><.*?> // Insert column
8267 <.*?>
< table.height() ) {
<.*?><.*?> // Need to decide if we should use appendChild or insertBefore
8268 <.*?>
< table.height() ) {
<.*?><.*?> var insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 );
8269  
8270 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=data.length ; i<ien ; i++ ) {
8271 <.*?>
< table.height() ) {
<.*?><.*?> tr = data[i].nTr;
8272 <.*?>
< table.height() ) {
<.*?><.*?> cells = data[i].anCells;
8273  
8274 <.*?>
< table.height() ) {
<.*?><.*?> if ( tr ) {
8275 <.*?>
< table.height() ) {
<.*?><.*?> // insertBefore can act like appendChild if 2nd arg is null
8276 <.*?>
< table.height() ) {
<.*?><.*?> tr.insertBefore( cells[ column ], cells[ insertBefore ] || null );
8277 <.*?>
< table.height() ) {
<.*?><.*?> }
8278 <.*?>
< table.height() ) {
<.*?><.*?> }
8279 <.*?>
< table.height() ) {
<.*?><.*?> }
8280 <.*?>
< table.height() ) {
<.*?><.*?> else {
8281 <.*?>
< table.height() ) {
<.*?><.*?> // Remove column
8282 <.*?>
< table.height() ) {
<.*?><.*?> $( _pluck( settings.aoData, 'anCells', column ) ).detach();
8283 <.*?>
< table.height() ) {
<.*?><.*?> }
8284  
8285 <.*?>
< table.height() ) {
<.*?><.*?> // Common actions
8286 <.*?>
< table.height() ) {
<.*?><.*?> col.bVisible = vis;
8287 <.*?>
< table.height() ) {
<.*?><.*?> _fnDrawHead( settings, settings.aoHeader );
8288 <.*?>
< table.height() ) {
<.*?><.*?> _fnDrawHead( settings, settings.aoFooter );
8289  
8290 <.*?>
< table.height() ) {
<.*?><.*?> if ( recalc === undefined || recalc ) {
8291 <.*?>
< table.height() ) {
<.*?><.*?> // Automatically adjust column sizing
8292 <.*?>
< table.height() ) {
<.*?><.*?> _fnAdjustColumnSizing( settings );
8293  
8294 <.*?>
< table.height() ) {
<.*?><.*?> // Realign columns for scrolling
8295 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings.oScroll.sX || settings.oScroll.sY ) {
8296 <.*?>
< table.height() ) {
<.*?><.*?> _fnScrollDraw( settings );
8297 <.*?>
< table.height() ) {
<.*?><.*?> }
8298 <.*?>
< table.height() ) {
<.*?><.*?> }
8299  
8300 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis] );
8301  
8302 <.*?>
< table.height() ) {
<.*?><.*?> _fnSaveState( settings );
8303 <.*?>
< table.height() ) {
<.*?><.*?> };
8304  
8305  
8306 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'columns()', function ( selector, opts ) {
8307 <.*?>
< table.height() ) {
<.*?><.*?> // argument shifting
8308 <.*?>
< table.height() ) {
<.*?><.*?> if ( selector === undefined ) {
8309 <.*?>
< table.height() ) {
<.*?><.*?> selector = '';
8310 <.*?>
< table.height() ) {
<.*?><.*?> }
8311 <.*?>
< table.height() ) {
<.*?><.*?> else if ( $.isPlainObject( selector ) ) {
8312 <.*?>
< table.height() ) {
<.*?><.*?> opts = selector;
8313 <.*?>
< table.height() ) {
<.*?><.*?> selector = '';
8314 <.*?>
< table.height() ) {
<.*?><.*?> }
8315  
8316 <.*?>
< table.height() ) {
<.*?><.*?> opts = _selector_opts( opts );
8317  
8318 <.*?>
< table.height() ) {
<.*?><.*?> var inst = this.iterator( 'table', function ( settings ) {
8319 <.*?>
< table.height() ) {
<.*?><.*?> return __column_selector( settings, selector, opts );
8320 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8321  
8322 <.*?>
< table.height() ) {
<.*?><.*?> // Want argument shifting here and in _row_selector?
8323 <.*?>
< table.height() ) {
<.*?><.*?> inst.selector.cols = selector;
8324 <.*?>
< table.height() ) {
<.*?><.*?> inst.selector.opts = opts;
8325  
8326 <.*?>
< table.height() ) {
<.*?><.*?> return inst;
8327 <.*?>
< table.height() ) {
<.*?><.*?> } );
8328  
8329 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) {
8330 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8331 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoColumns[column].nTh;
8332 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8333 <.*?>
< table.height() ) {
<.*?><.*?> } );
8334  
8335 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) {
8336 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8337 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoColumns[column].nTf;
8338 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8339 <.*?>
< table.height() ) {
<.*?><.*?> } );
8340  
8341 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().data()', 'column().data()', function () {
8342 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column-rows', __columnData, 1 );
8343 <.*?>
< table.height() ) {
<.*?><.*?> } );
8344  
8345 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {
8346 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8347 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoColumns[column].mData;
8348 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8349 <.*?>
< table.height() ) {
<.*?><.*?> } );
8350  
8351 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {
8352 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
8353 <.*?>
< table.height() ) {
<.*?><.*?> return _pluck_order( settings.aoData, rows,
8354 <.*?>
< table.height() ) {
<.*?><.*?> type === 'search' ? '_aFilterData' : '_aSortData', column
8355 <.*?>
< table.height() ) {
<.*?><.*?> );
8356 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8357 <.*?>
< table.height() ) {
<.*?><.*?> } );
8358  
8359 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {
8360 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
8361 <.*?>
< table.height() ) {
<.*?><.*?> return _pluck_order( settings.aoData, rows, 'anCells', column ) ;
8362 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8363 <.*?>
< table.height() ) {
<.*?><.*?> } );
8364  
8365 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
8366 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8367 <.*?>
< table.height() ) {
<.*?><.*?> if ( vis === undefined ) {
8368 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoColumns[ column ].bVisible;
8369 <.*?>
< table.height() ) {
<.*?><.*?> } // else
8370 <.*?>
< table.height() ) {
<.*?><.*?> __setColumnVis( settings, column, vis, calc );
8371 <.*?>
< table.height() ) {
<.*?><.*?> } );
8372 <.*?>
< table.height() ) {
<.*?><.*?> } );
8373  
8374 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {
8375 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8376 <.*?>
< table.height() ) {
<.*?><.*?> return type === 'visible' ?
8377 <.*?>
< table.height() ) {
<.*?><.*?> _fnColumnIndexToVisible( settings, column ) :
8378 <.*?>
< table.height() ) {
<.*?><.*?> column;
8379 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8380 <.*?>
< table.height() ) {
<.*?><.*?> } );
8381  
8382 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'columns.adjust()', function () {
8383 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8384 <.*?>
< table.height() ) {
<.*?><.*?> _fnAdjustColumnSizing( settings );
8385 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8386 <.*?>
< table.height() ) {
<.*?><.*?> } );
8387  
8388 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'column.index()', function ( type, idx ) {
8389 <.*?>
< table.height() ) {
<.*?><.*?> if ( this.context.length !== 0 ) {
8390 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context[0];
8391  
8392 <.*?>
< table.height() ) {
<.*?><.*?> if ( type === 'fromVisible' || type === 'toData' ) {
8393 <.*?>
< table.height() ) {
<.*?><.*?> return _fnVisibleToColumnIndex( ctx, idx );
8394 <.*?>
< table.height() ) {
<.*?><.*?> }
8395 <.*?>
< table.height() ) {
<.*?><.*?> else if ( type === 'fromData' || type === 'toVisible' ) {
8396 <.*?>
< table.height() ) {
<.*?><.*?> return _fnColumnIndexToVisible( ctx, idx );
8397 <.*?>
< table.height() ) {
<.*?><.*?> }
8398 <.*?>
< table.height() ) {
<.*?><.*?> }
8399 <.*?>
< table.height() ) {
<.*?><.*?> } );
8400  
8401 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'column()', function ( selector, opts ) {
8402 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_first( this.columns( selector, opts ) );
8403 <.*?>
< table.height() ) {
<.*?><.*?> } );
8404  
8405  
8406  
8407  
8408 <.*?>
< table.height() ) {
<.*?><.*?> var __cell_selector = function ( settings, selector, opts )
8409 <.*?>
< table.height() ) {
<.*?><.*?> {
8410 <.*?>
< table.height() ) {
<.*?><.*?> var data = settings.aoData;
8411 <.*?>
< table.height() ) {
<.*?><.*?> var rows = _selector_row_indexes( settings, opts );
8412 <.*?>
< table.height() ) {
<.*?><.*?> var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
8413 <.*?>
< table.height() ) {
<.*?><.*?> var allCells = $( [].concat.apply([], cells) );
8414 <.*?>
< table.height() ) {
<.*?><.*?> var row;
8415 <.*?>
< table.height() ) {
<.*?><.*?> var columns = settings.aoColumns.length;
8416 <.*?>
< table.height() ) {
<.*?><.*?> var a, i, ien, j, o, host;
8417  
8418 <.*?>
< table.height() ) {
<.*?><.*?> var run = function ( s ) {
8419 <.*?>
< table.height() ) {
<.*?><.*?> var fnSelector = typeof s === 'function';
8420  
8421 <.*?>
< table.height() ) {
<.*?><.*?> if ( s === null || s === undefined || fnSelector ) {
8422 <.*?>
< table.height() ) {
<.*?><.*?> // All cells and function selectors
8423 <.*?>
< table.height() ) {
<.*?><.*?> a = [];
8424  
8425 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=rows.length ; i<ien ; i++ ) {
8426 <.*?>
< table.height() ) {
<.*?><.*?> row = rows[i];
8427  
8428 <.*?>
< table.height() ) {
<.*?><.*?> for ( j=0 ; j<columns ; j++ ) {
8429 <.*?>
< table.height() ) {
<.*?><.*?> o = {
8430 <.*?>
< table.height() ) {
<.*?><.*?> row: row,
8431 <.*?>
< table.height() ) {
<.*?><.*?> column: j
8432 <.*?>
< table.height() ) {
<.*?><.*?> };
8433  
8434 <.*?>
< table.height() ) {
<.*?><.*?> if ( fnSelector ) {
8435 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - function
8436 <.*?>
< table.height() ) {
<.*?><.*?> host = settings.aoData[ row ];
8437  
8438 <.*?>
< table.height() ) {
<.*?><.*?> if ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {
8439 <.*?>
< table.height() ) {
<.*?><.*?> a.push( o );
8440 <.*?>
< table.height() ) {
<.*?><.*?> }
8441 <.*?>
< table.height() ) {
<.*?><.*?> }
8442 <.*?>
< table.height() ) {
<.*?><.*?> else {
8443 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - all
8444 <.*?>
< table.height() ) {
<.*?><.*?> a.push( o );
8445 <.*?>
< table.height() ) {
<.*?><.*?> }
8446 <.*?>
< table.height() ) {
<.*?><.*?> }
8447 <.*?>
< table.height() ) {
<.*?><.*?> }
8448  
8449 <.*?>
< table.height() ) {
<.*?><.*?> return a;
8450 <.*?>
< table.height() ) {
<.*?><.*?> }
8451  
8452 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - index
8453 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( s ) ) {
8454 <.*?>
< table.height() ) {
<.*?><.*?> return [s];
8455 <.*?>
< table.height() ) {
<.*?><.*?> }
8456  
8457 <.*?>
< table.height() ) {
<.*?><.*?> // Selector - jQuery filtered cells
8458 <.*?>
< table.height() ) {
<.*?><.*?> return allCells
8459 <.*?>
< table.height() ) {
<.*?><.*?> .filter( s )
8460 <.*?>
< table.height() ) {
<.*?><.*?> .map( function (i, el) {
8461 <.*?>
< table.height() ) {
<.*?><.*?> row = el.parentNode._DT_RowIndex;
8462  
8463 <.*?>
< table.height() ) {
<.*?><.*?> return {
8464 <.*?>
< table.height() ) {
<.*?><.*?> row: row,
8465 <.*?>
< table.height() ) {
<.*?><.*?> column: $.inArray( el, data[ row ].anCells )
8466 <.*?>
< table.height() ) {
<.*?><.*?> };
8467 <.*?>
< table.height() ) {
<.*?><.*?> } )
8468 <.*?>
< table.height() ) {
<.*?><.*?> .toArray();
8469 <.*?>
< table.height() ) {
<.*?><.*?> };
8470  
8471 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_run( 'cell', selector, run, settings, opts );
8472 <.*?>
< table.height() ) {
<.*?><.*?> };
8473  
8474  
8475  
8476  
8477 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {
8478 <.*?>
< table.height() ) {
<.*?><.*?> // Argument shifting
8479 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( rowSelector ) ) {
8480 <.*?>
< table.height() ) {
<.*?><.*?> // Indexes
8481 <.*?>
< table.height() ) {
<.*?><.*?> if ( rowSelector.row === undefined ) {
8482 <.*?>
< table.height() ) {
<.*?><.*?> // Selector options in first parameter
8483 <.*?>
< table.height() ) {
<.*?><.*?> opts = rowSelector;
8484 <.*?>
< table.height() ) {
<.*?><.*?> rowSelector = null;
8485 <.*?>
< table.height() ) {
<.*?><.*?> }
8486 <.*?>
< table.height() ) {
<.*?><.*?> else {
8487 <.*?>
< table.height() ) {
<.*?><.*?> // Cell index objects in first parameter
8488 <.*?>
< table.height() ) {
<.*?><.*?> opts = columnSelector;
8489 <.*?>
< table.height() ) {
<.*?><.*?> columnSelector = null;
8490 <.*?>
< table.height() ) {
<.*?><.*?> }
8491 <.*?>
< table.height() ) {
<.*?><.*?> }
8492 <.*?>
< table.height() ) {
<.*?><.*?> if ( $.isPlainObject( columnSelector ) ) {
8493 <.*?>
< table.height() ) {
<.*?><.*?> opts = columnSelector;
8494 <.*?>
< table.height() ) {
<.*?><.*?> columnSelector = null;
8495 <.*?>
< table.height() ) {
<.*?><.*?> }
8496  
8497 <.*?>
< table.height() ) {
<.*?><.*?> // Cell selector
8498 <.*?>
< table.height() ) {
<.*?><.*?> if ( columnSelector === null || columnSelector === undefined ) {
8499 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8500 <.*?>
< table.height() ) {
<.*?><.*?> return __cell_selector( settings, rowSelector, _selector_opts( opts ) );
8501 <.*?>
< table.height() ) {
<.*?><.*?> } );
8502 <.*?>
< table.height() ) {
<.*?><.*?> }
8503  
8504 <.*?>
< table.height() ) {
<.*?><.*?> // Row + column selector
8505 <.*?>
< table.height() ) {
<.*?><.*?> var columns = this.columns( columnSelector, opts );
8506 <.*?>
< table.height() ) {
<.*?><.*?> var rows = this.rows( rowSelector, opts );
8507 <.*?>
< table.height() ) {
<.*?><.*?> var a, i, ien, j, jen;
8508  
8509 <.*?>
< table.height() ) {
<.*?><.*?> var cells = this.iterator( 'table', function ( settings, idx ) {
8510 <.*?>
< table.height() ) {
<.*?><.*?> a = [];
8511  
8512 <.*?>
< table.height() ) {
<.*?><.*?> for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
8513 <.*?>
< table.height() ) {
<.*?><.*?> for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {
8514 <.*?>
< table.height() ) {
<.*?><.*?> a.push( {
8515 <.*?>
< table.height() ) {
<.*?><.*?> row: rows[idx][i],
8516 <.*?>
< table.height() ) {
<.*?><.*?> column: columns[idx][j]
8517 <.*?>
< table.height() ) {
<.*?><.*?> } );
8518 <.*?>
< table.height() ) {
<.*?><.*?> }
8519 <.*?>
< table.height() ) {
<.*?><.*?> }
8520  
8521 <.*?>
< table.height() ) {
<.*?><.*?> return a;
8522 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8523  
8524 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( cells.selector, {
8525 <.*?>
< table.height() ) {
<.*?><.*?> cols: columnSelector,
8526 <.*?>
< table.height() ) {
<.*?><.*?> rows: rowSelector,
8527 <.*?>
< table.height() ) {
<.*?><.*?> opts: opts
8528 <.*?>
< table.height() ) {
<.*?><.*?> } );
8529  
8530 <.*?>
< table.height() ) {
<.*?><.*?> return cells;
8531 <.*?>
< table.height() ) {
<.*?><.*?> } );
8532  
8533  
8534 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'cells().nodes()', 'cell().node()', function () {
8535 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8536 <.*?>
< table.height() ) {
<.*?><.*?> var cells = settings.aoData[ row ].anCells;
8537 <.*?>
< table.height() ) {
<.*?><.*?> return cells ?
8538 <.*?>
< table.height() ) {
<.*?><.*?> cells[ column ] :
8539 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
8540 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8541 <.*?>
< table.height() ) {
<.*?><.*?> } );
8542  
8543  
8544 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'cells().data()', function () {
8545 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8546 <.*?>
< table.height() ) {
<.*?><.*?> return _fnGetCellData( settings, row, column );
8547 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8548 <.*?>
< table.height() ) {
<.*?><.*?> } );
8549  
8550  
8551 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {
8552 <.*?>
< table.height() ) {
<.*?><.*?> type = type === 'search' ? '_aFilterData' : '_aSortData';
8553  
8554 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8555 <.*?>
< table.height() ) {
<.*?><.*?> return settings.aoData[ row ][ type ][ column ];
8556 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8557 <.*?>
< table.height() ) {
<.*?><.*?> } );
8558  
8559  
8560 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {
8561 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8562 <.*?>
< table.height() ) {
<.*?><.*?> return _fnGetCellData( settings, row, column, type );
8563 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8564 <.*?>
< table.height() ) {
<.*?><.*?> } );
8565  
8566  
8567 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'cells().indexes()', 'cell().index()', function () {
8568 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8569 <.*?>
< table.height() ) {
<.*?><.*?> return {
8570 <.*?>
< table.height() ) {
<.*?><.*?> row: row,
8571 <.*?>
< table.height() ) {
<.*?><.*?> column: column,
8572 <.*?>
< table.height() ) {
<.*?><.*?> columnVisible: _fnColumnIndexToVisible( settings, column )
8573 <.*?>
< table.height() ) {
<.*?><.*?> };
8574 <.*?>
< table.height() ) {
<.*?><.*?> }, 1 );
8575 <.*?>
< table.height() ) {
<.*?><.*?> } );
8576  
8577  
8578 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {
8579 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'cell', function ( settings, row, column ) {
8580 <.*?>
< table.height() ) {
<.*?><.*?> _fnInvalidate( settings, row, src, column );
8581 <.*?>
< table.height() ) {
<.*?><.*?> } );
8582 <.*?>
< table.height() ) {
<.*?><.*?> } );
8583  
8584  
8585  
8586 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {
8587 <.*?>
< table.height() ) {
<.*?><.*?> return _selector_first( this.cells( rowSelector, columnSelector, opts ) );
8588 <.*?>
< table.height() ) {
<.*?><.*?> } );
8589  
8590  
8591 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'cell().data()', function ( data ) {
8592 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8593 <.*?>
< table.height() ) {
<.*?><.*?> var cell = this[0];
8594  
8595 <.*?>
< table.height() ) {
<.*?><.*?> if ( data === undefined ) {
8596 <.*?>
< table.height() ) {
<.*?><.*?> // Get
8597 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length && cell.length ?
8598 <.*?>
< table.height() ) {
<.*?><.*?> _fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :
8599 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
8600 <.*?>
< table.height() ) {
<.*?><.*?> }
8601  
8602 <.*?>
< table.height() ) {
<.*?><.*?> // Set
8603 <.*?>
< table.height() ) {
<.*?><.*?> _fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );
8604 <.*?>
< table.height() ) {
<.*?><.*?> _fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );
8605  
8606 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8607 <.*?>
< table.height() ) {
<.*?><.*?> } );
8608  
8609  
8610  
8611 <.*?>
< table.height() ) {
<.*?><.*?> /**
8612 <.*?>
< table.height() ) {
<.*?><.*?> * Get current ordering (sorting) that has been applied to the table.
8613 <.*?>
< table.height() ) {
<.*?><.*?> *
8614 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array} 2D array containing the sorting information for the first
8615 <.*?>
< table.height() ) {
<.*?><.*?> * table in the current context. Each element in the parent array represents
8616 <.*?>
< table.height() ) {
<.*?><.*?> * a column being sorted upon (i.e. multi-sorting with two columns would have
8617 <.*?>
< table.height() ) {
<.*?><.*?> * 2 inner arrays). The inner arrays may have 2 or 3 elements. The first is
8618 <.*?>
< table.height() ) {
<.*?><.*?> * the column index that the sorting condition applies to, the second is the
8619 <.*?>
< table.height() ) {
<.*?><.*?> * direction of the sort (`desc` or `asc`) and, optionally, the third is the
8620 <.*?>
< table.height() ) {
<.*?><.*?> * index of the sorting order from the `column.sorting` initialisation array.
8621 <.*?>
< table.height() ) {
<.*?><.*?> *//**
8622 <.*?>
< table.height() ) {
<.*?><.*?> * Set the ordering for the table.
8623 <.*?>
< table.height() ) {
<.*?><.*?> *
8624 <.*?>
< table.height() ) {
<.*?><.*?> * @param {integer} order Column index to sort upon.
8625 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)
8626 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
8627 <.*?>
< table.height() ) {
<.*?><.*?> *//**
8628 <.*?>
< table.height() ) {
<.*?><.*?> * Set the ordering for the table.
8629 <.*?>
< table.height() ) {
<.*?><.*?> *
8630 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} order 1D array of sorting information to be applied.
8631 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} [...] Optional additional sorting conditions
8632 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
8633 <.*?>
< table.height() ) {
<.*?><.*?> *//**
8634 <.*?>
< table.height() ) {
<.*?><.*?> * Set the ordering for the table.
8635 <.*?>
< table.height() ) {
<.*?><.*?> *
8636 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} order 2D array of sorting information to be applied.
8637 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
8638 <.*?>
< table.height() ) {
<.*?><.*?> */
8639 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'order()', function ( order, dir ) {
8640 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8641  
8642 <.*?>
< table.height() ) {
<.*?><.*?> if ( order === undefined ) {
8643 <.*?>
< table.height() ) {
<.*?><.*?> // get
8644 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length !== 0 ?
8645 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].aaSorting :
8646 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
8647 <.*?>
< table.height() ) {
<.*?><.*?> }
8648  
8649 <.*?>
< table.height() ) {
<.*?><.*?> // set
8650 <.*?>
< table.height() ) {
<.*?><.*?> if ( typeof order === 'number' ) {
8651 <.*?>
< table.height() ) {
<.*?><.*?> // Simple column / direction passed in
8652 <.*?>
< table.height() ) {
<.*?><.*?> order = [ [ order, dir ] ];
8653 <.*?>
< table.height() ) {
<.*?><.*?> }
8654 <.*?>
< table.height() ) {
<.*?><.*?> else if ( ! $.isArray( order[0] ) ) {
8655 <.*?>
< table.height() ) {
<.*?><.*?> // Arguments passed in (list of 1D arrays)
8656 <.*?>
< table.height() ) {
<.*?><.*?> order = Array.prototype.slice.call( arguments );
8657 <.*?>
< table.height() ) {
<.*?><.*?> }
8658 <.*?>
< table.height() ) {
<.*?><.*?> // otherwise a 2D array was passed in
8659  
8660 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8661 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSorting = order.slice();
8662 <.*?>
< table.height() ) {
<.*?><.*?> } );
8663 <.*?>
< table.height() ) {
<.*?><.*?> } );
8664  
8665  
8666 <.*?>
< table.height() ) {
<.*?><.*?> /**
8667 <.*?>
< table.height() ) {
<.*?><.*?> * Attach a sort listener to an element for a given column
8668 <.*?>
< table.height() ) {
<.*?><.*?> *
8669 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node|jQuery|string} node Identifier for the element(s) to attach the
8670 <.*?>
< table.height() ) {
<.*?><.*?> * listener to. This can take the form of a single DOM node, a jQuery
8671 <.*?>
< table.height() ) {
<.*?><.*?> * collection of nodes or a jQuery selector which will identify the node(s).
8672 <.*?>
< table.height() ) {
<.*?><.*?> * @param {integer} column the column that a click on this node will sort on
8673 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} [callback] callback function when sort is run
8674 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {DataTables.Api} this
8675 <.*?>
< table.height() ) {
<.*?><.*?> */
8676 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'order.listener()', function ( node, column, callback ) {
8677 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8678 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortAttachListener( settings, node, column, callback );
8679 <.*?>
< table.height() ) {
<.*?><.*?> } );
8680 <.*?>
< table.height() ) {
<.*?><.*?> } );
8681  
8682  
8683 <.*?>
< table.height() ) {
<.*?><.*?> // Order by the selected column(s)
8684 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( [
8685 <.*?>
< table.height() ) {
<.*?><.*?> 'columns().order()',
8686 <.*?>
< table.height() ) {
<.*?><.*?> 'column().order()'
8687 <.*?>
< table.height() ) {
<.*?><.*?> ], function ( dir ) {
8688 <.*?>
< table.height() ) {
<.*?><.*?> var that = this;
8689  
8690 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings, i ) {
8691 <.*?>
< table.height() ) {
<.*?><.*?> var sort = [];
8692  
8693 <.*?>
< table.height() ) {
<.*?><.*?> $.each( that[i], function (j, col) {
8694 <.*?>
< table.height() ) {
<.*?><.*?> sort.push( [ col, dir ] );
8695 <.*?>
< table.height() ) {
<.*?><.*?> } );
8696  
8697 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSorting = sort;
8698 <.*?>
< table.height() ) {
<.*?><.*?> } );
8699 <.*?>
< table.height() ) {
<.*?><.*?> } );
8700  
8701  
8702  
8703 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'search()', function ( input, regex, smart, caseInsen ) {
8704 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8705  
8706 <.*?>
< table.height() ) {
<.*?><.*?> if ( input === undefined ) {
8707 <.*?>
< table.height() ) {
<.*?><.*?> // get
8708 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length !== 0 ?
8709 <.*?>
< table.height() ) {
<.*?><.*?> ctx[0].oPreviousSearch.sSearch :
8710 <.*?>
< table.height() ) {
<.*?><.*?> undefined;
8711 <.*?>
< table.height() ) {
<.*?><.*?> }
8712  
8713 <.*?>
< table.height() ) {
<.*?><.*?> // set
8714 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8715 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! settings.oFeatures.bFilter ) {
8716 <.*?>
< table.height() ) {
<.*?><.*?> return;
8717 <.*?>
< table.height() ) {
<.*?><.*?> }
8718  
8719 <.*?>
< table.height() ) {
<.*?><.*?> _fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
8720 <.*?>
< table.height() ) {
<.*?><.*?> "sSearch": input+"",
8721 <.*?>
< table.height() ) {
<.*?><.*?> "bRegex": regex === null ? false : regex,
8722 <.*?>
< table.height() ) {
<.*?><.*?> "bSmart": smart === null ? true : smart,
8723 <.*?>
< table.height() ) {
<.*?><.*?> "bCaseInsensitive": caseInsen === null ? true : caseInsen
8724 <.*?>
< table.height() ) {
<.*?><.*?> } ), 1 );
8725 <.*?>
< table.height() ) {
<.*?><.*?> } );
8726 <.*?>
< table.height() ) {
<.*?><.*?> } );
8727  
8728  
8729 <.*?>
< table.height() ) {
<.*?><.*?> _api_registerPlural(
8730 <.*?>
< table.height() ) {
<.*?><.*?> 'columns().search()',
8731 <.*?>
< table.height() ) {
<.*?><.*?> 'column().search()',
8732 <.*?>
< table.height() ) {
<.*?><.*?> function ( input, regex, smart, caseInsen ) {
8733 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'column', function ( settings, column ) {
8734 <.*?>
< table.height() ) {
<.*?><.*?> var preSearch = settings.aoPreSearchCols;
8735  
8736 <.*?>
< table.height() ) {
<.*?><.*?> if ( input === undefined ) {
8737 <.*?>
< table.height() ) {
<.*?><.*?> // get
8738 <.*?>
< table.height() ) {
<.*?><.*?> return preSearch[ column ].sSearch;
8739 <.*?>
< table.height() ) {
<.*?><.*?> }
8740  
8741 <.*?>
< table.height() ) {
<.*?><.*?> // set
8742 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! settings.oFeatures.bFilter ) {
8743 <.*?>
< table.height() ) {
<.*?><.*?> return;
8744 <.*?>
< table.height() ) {
<.*?><.*?> }
8745  
8746 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( preSearch[ column ], {
8747 <.*?>
< table.height() ) {
<.*?><.*?> "sSearch": input+"",
8748 <.*?>
< table.height() ) {
<.*?><.*?> "bRegex": regex === null ? false : regex,
8749 <.*?>
< table.height() ) {
<.*?><.*?> "bSmart": smart === null ? true : smart,
8750 <.*?>
< table.height() ) {
<.*?><.*?> "bCaseInsensitive": caseInsen === null ? true : caseInsen
8751 <.*?>
< table.height() ) {
<.*?><.*?> } );
8752  
8753 <.*?>
< table.height() ) {
<.*?><.*?> _fnFilterComplete( settings, settings.oPreviousSearch, 1 );
8754 <.*?>
< table.height() ) {
<.*?><.*?> } );
8755 <.*?>
< table.height() ) {
<.*?><.*?> }
8756 <.*?>
< table.height() ) {
<.*?><.*?> );
8757  
8758 <.*?>
< table.height() ) {
<.*?><.*?> /*
8759 <.*?>
< table.height() ) {
<.*?><.*?> * State API methods
8760 <.*?>
< table.height() ) {
<.*?><.*?> */
8761  
8762 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'state()', function () {
8763 <.*?>
< table.height() ) {
<.*?><.*?> return this.context.length ?
8764 <.*?>
< table.height() ) {
<.*?><.*?> this.context[0].oSavedState :
8765 <.*?>
< table.height() ) {
<.*?><.*?> null;
8766 <.*?>
< table.height() ) {
<.*?><.*?> } );
8767  
8768  
8769 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'state.clear()', function () {
8770 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8771 <.*?>
< table.height() ) {
<.*?><.*?> // Save an empty object
8772 <.*?>
< table.height() ) {
<.*?><.*?> settings.fnStateSaveCallback.call( settings.oInstance, settings, {} );
8773 <.*?>
< table.height() ) {
<.*?><.*?> } );
8774 <.*?>
< table.height() ) {
<.*?><.*?> } );
8775  
8776  
8777 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'state.loaded()', function () {
8778 <.*?>
< table.height() ) {
<.*?><.*?> return this.context.length ?
8779 <.*?>
< table.height() ) {
<.*?><.*?> this.context[0].oLoadedState :
8780 <.*?>
< table.height() ) {
<.*?><.*?> null;
8781 <.*?>
< table.height() ) {
<.*?><.*?> } );
8782  
8783  
8784 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'state.save()', function () {
8785 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8786 <.*?>
< table.height() ) {
<.*?><.*?> _fnSaveState( settings );
8787 <.*?>
< table.height() ) {
<.*?><.*?> } );
8788 <.*?>
< table.height() ) {
<.*?><.*?> } );
8789  
8790  
8791  
8792 <.*?>
< table.height() ) {
<.*?><.*?> /**
8793 <.*?>
< table.height() ) {
<.*?><.*?> * Provide a common method for plug-ins to check the version of DataTables being
8794 <.*?>
< table.height() ) {
<.*?><.*?> * used, in order to ensure compatibility.
8795 <.*?>
< table.height() ) {
<.*?><.*?> *
8796 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} version Version string to check for, in the format "X.Y.Z".
8797 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the formats "X" and "X.Y" are also acceptable.
8798 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {boolean} true if this version of DataTables is greater or equal to
8799 <.*?>
< table.height() ) {
<.*?><.*?> * the required version, or false if this version of DataTales is not
8800 <.*?>
< table.height() ) {
<.*?><.*?> * suitable
8801 <.*?>
< table.height() ) {
<.*?><.*?> * @static
8802 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API-Static
8803 <.*?>
< table.height() ) {
<.*?><.*?> *
8804 <.*?>
< table.height() ) {
<.*?><.*?> * @example
8805 <.*?>
< table.height() ) {
<.*?><.*?> * alert( $.fn.dataTable.versionCheck( '1.9.0' ) );
8806 <.*?>
< table.height() ) {
<.*?><.*?> */
8807 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.versionCheck = DataTable.fnVersionCheck = function( version )
8808 <.*?>
< table.height() ) {
<.*?><.*?> {
8809 <.*?>
< table.height() ) {
<.*?><.*?> var aThis = DataTable.version.split('.');
8810 <.*?>
< table.height() ) {
<.*?><.*?> var aThat = version.split('.');
8811 <.*?>
< table.height() ) {
<.*?><.*?> var iThis, iThat;
8812  
8813 <.*?>
< table.height() ) {
<.*?><.*?> for ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {
8814 <.*?>
< table.height() ) {
<.*?><.*?> iThis = parseInt( aThis[i], 10 ) || 0;
8815 <.*?>
< table.height() ) {
<.*?><.*?> iThat = parseInt( aThat[i], 10 ) || 0;
8816  
8817 <.*?>
< table.height() ) {
<.*?><.*?> // Parts are the same, keep comparing
8818 <.*?>
< table.height() ) {
<.*?><.*?> if (iThis === iThat) {
8819 <.*?>
< table.height() ) {
<.*?><.*?> continue;
8820 <.*?>
< table.height() ) {
<.*?><.*?> }
8821  
8822 <.*?>
< table.height() ) {
<.*?><.*?> // Parts are different, return immediately
8823 <.*?>
< table.height() ) {
<.*?><.*?> return iThis > iThat;
8824 <.*?>
< table.height() ) {
<.*?><.*?> }
8825  
8826 <.*?>
< table.height() ) {
<.*?><.*?> return true;
8827 <.*?>
< table.height() ) {
<.*?><.*?> };
8828  
8829  
8830 <.*?>
< table.height() ) {
<.*?><.*?> /**
8831 <.*?>
< table.height() ) {
<.*?><.*?> * Check if a `<table>` node is a DataTable table already or not.
8832 <.*?>
< table.height() ) {
<.*?><.*?> *
8833 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node|jquery|string} table Table node, jQuery object or jQuery
8834 <.*?>
< table.height() ) {
<.*?><.*?> * selector for the table to test. Note that if more than more than one
8835 <.*?>
< table.height() ) {
<.*?><.*?> * table is passed on, only the first will be checked
8836 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {boolean} true the table given is a DataTable, or false otherwise
8837 <.*?>
< table.height() ) {
<.*?><.*?> * @static
8838 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API-Static
8839 <.*?>
< table.height() ) {
<.*?><.*?> *
8840 <.*?>
< table.height() ) {
<.*?><.*?> * @example
8841 <.*?>
< table.height() ) {
<.*?><.*?> * if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {
8842 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable();
8843 <.*?>
< table.height() ) {
<.*?><.*?> * }
8844 <.*?>
< table.height() ) {
<.*?><.*?> */
8845 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.isDataTable = DataTable.fnIsDataTable = function ( table )
8846 <.*?>
< table.height() ) {
<.*?><.*?> {
8847 <.*?>
< table.height() ) {
<.*?><.*?> var t = $(table).get(0);
8848 <.*?>
< table.height() ) {
<.*?><.*?> var is = false;
8849  
8850 <.*?>
< table.height() ) {
<.*?><.*?> $.each( DataTable.settings, function (i, o) {
8851 <.*?>
< table.height() ) {
<.*?><.*?> var head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;
8852 <.*?>
< table.height() ) {
<.*?><.*?> var foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;
8853  
8854 <.*?>
< table.height() ) {
<.*?><.*?> if ( o.nTable === t || head === t || foot === t ) {
8855 <.*?>
< table.height() ) {
<.*?><.*?> is = true;
8856 <.*?>
< table.height() ) {
<.*?><.*?> }
8857 <.*?>
< table.height() ) {
<.*?><.*?> } );
8858  
8859 <.*?>
< table.height() ) {
<.*?><.*?> return is;
8860 <.*?>
< table.height() ) {
<.*?><.*?> };
8861  
8862  
8863 <.*?>
< table.height() ) {
<.*?><.*?> /**
8864 <.*?>
< table.height() ) {
<.*?><.*?> * Get all DataTable tables that have been initialised - optionally you can
8865 <.*?>
< table.height() ) {
<.*?><.*?> * select to get only currently visible tables.
8866 <.*?>
< table.height() ) {
<.*?><.*?> *
8867 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} [visible=false] Flag to indicate if you want all (default)
8868 <.*?>
< table.height() ) {
<.*?><.*?> * or visible tables only.
8869 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {array} Array of `table` nodes (not DataTable instances) which are
8870 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables
8871 <.*?>
< table.height() ) {
<.*?><.*?> * @static
8872 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt API-Static
8873 <.*?>
< table.height() ) {
<.*?><.*?> *
8874 <.*?>
< table.height() ) {
<.*?><.*?> * @example
8875 <.*?>
< table.height() ) {
<.*?><.*?> * $.each( $.fn.dataTable.tables(true), function () {
8876 <.*?>
< table.height() ) {
<.*?><.*?> * $(table).DataTable().columns.adjust();
8877 <.*?>
< table.height() ) {
<.*?><.*?> * } );
8878 <.*?>
< table.height() ) {
<.*?><.*?> */
8879 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.tables = DataTable.fnTables = function ( visible )
8880 <.*?>
< table.height() ) {
<.*?><.*?> {
8881 <.*?>
< table.height() ) {
<.*?><.*?> return $.map( DataTable.settings, function (o) {
8882 <.*?>
< table.height() ) {
<.*?><.*?> if ( !visible || (visible && $(o.nTable).is(':visible')) ) {
8883 <.*?>
< table.height() ) {
<.*?><.*?> return o.nTable;
8884 <.*?>
< table.height() ) {
<.*?><.*?> }
8885 <.*?>
< table.height() ) {
<.*?><.*?> } );
8886 <.*?>
< table.height() ) {
<.*?><.*?> };
8887  
8888  
8889 <.*?>
< table.height() ) {
<.*?><.*?> /**
8890 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables utility methods
8891 <.*?>
< table.height() ) {
<.*?><.*?> *
8892 <.*?>
< table.height() ) {
<.*?><.*?> * This namespace provides helper methods that DataTables uses internally to
8893 <.*?>
< table.height() ) {
<.*?><.*?> * create a DataTable, but which are not exclusively used only for DataTables.
8894 <.*?>
< table.height() ) {
<.*?><.*?> * These methods can be used by extension authors to save the duplication of
8895 <.*?>
< table.height() ) {
<.*?><.*?> * code.
8896 <.*?>
< table.height() ) {
<.*?><.*?> *
8897 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
8898 <.*?>
< table.height() ) {
<.*?><.*?> */
8899 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.util = {
8900 <.*?>
< table.height() ) {
<.*?><.*?> /**
8901 <.*?>
< table.height() ) {
<.*?><.*?> * Throttle the calls to a function. Arguments and context are maintained
8902 <.*?>
< table.height() ) {
<.*?><.*?> * for the throttled function.
8903 <.*?>
< table.height() ) {
<.*?><.*?> *
8904 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} fn Function to be called
8905 <.*?>
< table.height() ) {
<.*?><.*?> * @param {integer} freq Call frequency in mS
8906 <.*?>
< table.height() ) {
<.*?><.*?> * @return {function} Wrapped function
8907 <.*?>
< table.height() ) {
<.*?><.*?> */
8908 <.*?>
< table.height() ) {
<.*?><.*?> throttle: _fnThrottle,
8909  
8910  
8911 <.*?>
< table.height() ) {
<.*?><.*?> /**
8912 <.*?>
< table.height() ) {
<.*?><.*?> * Escape a string such that it can be used in a regular expression
8913 <.*?>
< table.height() ) {
<.*?><.*?> *
8914 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sVal string to escape
8915 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {string} escaped string
8916 <.*?>
< table.height() ) {
<.*?><.*?> */
8917 <.*?>
< table.height() ) {
<.*?><.*?> escapeRegex: _fnEscapeRegex
8918 <.*?>
< table.height() ) {
<.*?><.*?> };
8919  
8920  
8921 <.*?>
< table.height() ) {
<.*?><.*?> /**
8922 <.*?>
< table.height() ) {
<.*?><.*?> * Convert from camel case parameters to Hungarian notation. This is made public
8923 <.*?>
< table.height() ) {
<.*?><.*?> * for the extensions to provide the same ability as DataTables core to accept
8924 <.*?>
< table.height() ) {
<.*?><.*?> * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase
8925 <.*?>
< table.height() ) {
<.*?><.*?> * parameters.
8926 <.*?>
< table.height() ) {
<.*?><.*?> *
8927 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} src The model object which holds all parameters that can be
8928 <.*?>
< table.height() ) {
<.*?><.*?> * mapped.
8929 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} user The object to convert from camel case to Hungarian.
8930 <.*?>
< table.height() ) {
<.*?><.*?> * @param {boolean} force When set to `true`, properties which already have a
8931 <.*?>
< table.height() ) {
<.*?><.*?> * Hungarian value in the `user` object will be overwritten. Otherwise they
8932 <.*?>
< table.height() ) {
<.*?><.*?> * won't be.
8933 <.*?>
< table.height() ) {
<.*?><.*?> */
8934 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.camelToHungarian = _fnCamelToHungarian;
8935  
8936  
8937  
8938 <.*?>
< table.height() ) {
<.*?><.*?> /**
8939 <.*?>
< table.height() ) {
<.*?><.*?> *
8940 <.*?>
< table.height() ) {
<.*?><.*?> */
8941 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( '$()', function ( selector, opts ) {
8942 <.*?>
< table.height() ) {
<.*?><.*?> var
8943 <.*?>
< table.height() ) {
<.*?><.*?> rows = this.rows( opts ).nodes(), // Get all rows
8944 <.*?>
< table.height() ) {
<.*?><.*?> jqRows = $(rows);
8945  
8946 <.*?>
< table.height() ) {
<.*?><.*?> return $( [].concat(
8947 <.*?>
< table.height() ) {
<.*?><.*?> jqRows.filter( selector ).toArray(),
8948 <.*?>
< table.height() ) {
<.*?><.*?> jqRows.find( selector ).toArray()
8949 <.*?>
< table.height() ) {
<.*?><.*?> ) );
8950 <.*?>
< table.height() ) {
<.*?><.*?> } );
8951  
8952  
8953 <.*?>
< table.height() ) {
<.*?><.*?> // jQuery functions to operate on the tables
8954 <.*?>
< table.height() ) {
<.*?><.*?> $.each( [ 'on', 'one', 'off' ], function (i, key) {
8955 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( key+'()', function ( /* event, handler */ ) {
8956 <.*?>
< table.height() ) {
<.*?><.*?> var args = Array.prototype.slice.call(arguments);
8957  
8958 <.*?>
< table.height() ) {
<.*?><.*?> // Add the `dt` namespace automatically if it isn't already present
8959 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! args[0].match(/\.dt\b/) ) {
8960 <.*?>
< table.height() ) {
<.*?><.*?> args[0] += '.dt';
8961 <.*?>
< table.height() ) {
<.*?><.*?> }
8962  
8963 <.*?>
< table.height() ) {
<.*?><.*?> var inst = $( this.tables().nodes() );
8964 <.*?>
< table.height() ) {
<.*?><.*?> inst[key].apply( inst, args );
8965 <.*?>
< table.height() ) {
<.*?><.*?> return this;
8966 <.*?>
< table.height() ) {
<.*?><.*?> } );
8967 <.*?>
< table.height() ) {
<.*?><.*?> } );
8968  
8969  
8970 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'clear()', function () {
8971 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8972 <.*?>
< table.height() ) {
<.*?><.*?> _fnClearTable( settings );
8973 <.*?>
< table.height() ) {
<.*?><.*?> } );
8974 <.*?>
< table.height() ) {
<.*?><.*?> } );
8975  
8976  
8977 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'settings()', function () {
8978 <.*?>
< table.height() ) {
<.*?><.*?> return new _Api( this.context, this.context );
8979 <.*?>
< table.height() ) {
<.*?><.*?> } );
8980  
8981  
8982 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'init()', function () {
8983 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context;
8984 <.*?>
< table.height() ) {
<.*?><.*?> return ctx.length ? ctx[0].oInit : null;
8985 <.*?>
< table.height() ) {
<.*?><.*?> } );
8986  
8987  
8988 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'data()', function () {
8989 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8990 <.*?>
< table.height() ) {
<.*?><.*?> return _pluck( settings.aoData, '_aData' );
8991 <.*?>
< table.height() ) {
<.*?><.*?> } ).flatten();
8992 <.*?>
< table.height() ) {
<.*?><.*?> } );
8993  
8994  
8995 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'destroy()', function ( remove ) {
8996 <.*?>
< table.height() ) {
<.*?><.*?> remove = remove || false;
8997  
8998 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( 'table', function ( settings ) {
8999 <.*?>
< table.height() ) {
<.*?><.*?> var orig = settings.nTableWrapper.parentNode;
9000 <.*?>
< table.height() ) {
<.*?><.*?> var classes = settings.oClasses;
9001 <.*?>
< table.height() ) {
<.*?><.*?> var table = settings.nTable;
9002 <.*?>
< table.height() ) {
<.*?><.*?> var tbody = settings.nTBody;
9003 <.*?>
< table.height() ) {
<.*?><.*?> var thead = settings.nTHead;
9004 <.*?>
< table.height() ) {
<.*?><.*?> var tfoot = settings.nTFoot;
9005 <.*?>
< table.height() ) {
<.*?><.*?> var jqTable = $(table);
9006 <.*?>
< table.height() ) {
<.*?><.*?> var jqTbody = $(tbody);
9007 <.*?>
< table.height() ) {
<.*?><.*?> var jqWrapper = $(settings.nTableWrapper);
9008 <.*?>
< table.height() ) {
<.*?><.*?> var rows = $.map( settings.aoData, function (r) { return r.nTr; } );
9009 <.*?>
< table.height() ) {
<.*?><.*?> var i, ien;
9010  
9011 <.*?>
< table.height() ) {
<.*?><.*?> // Flag to note that the table is currently being destroyed - no action
9012 <.*?>
< table.height() ) {
<.*?><.*?> // should be taken
9013 <.*?>
< table.height() ) {
<.*?><.*?> settings.bDestroying = true;
9014  
9015 <.*?>
< table.height() ) {
<.*?><.*?> // Fire off the destroy callbacks for plug-ins etc
9016 <.*?>
< table.height() ) {
<.*?><.*?> _fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] );
9017  
9018 <.*?>
< table.height() ) {
<.*?><.*?> // If not being removed from the document, make all columns visible
9019 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! remove ) {
9020 <.*?>
< table.height() ) {
<.*?><.*?> new _Api( settings ).columns().visible( true );
9021 <.*?>
< table.height() ) {
<.*?><.*?> }
9022  
9023 <.*?>
< table.height() ) {
<.*?><.*?> // Blitz all `DT` namespaced events (these are internal events, the
9024 <.*?>
< table.height() ) {
<.*?><.*?> // lowercase, `dt` events are user subscribed and they are responsible
9025 <.*?>
< table.height() ) {
<.*?><.*?> // for removing them
9026 <.*?>
< table.height() ) {
<.*?><.*?> jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT');
9027 <.*?>
< table.height() ) {
<.*?><.*?> $(window).unbind('.DT-'+settings.sInstance);
9028  
9029 <.*?>
< table.height() ) {
<.*?><.*?> // When scrolling we had to break the table up - restore it
9030 <.*?>
< table.height() ) {
<.*?><.*?> if ( table != thead.parentNode ) {
9031 <.*?>
< table.height() ) {
<.*?><.*?> jqTable.children('thead').detach();
9032 <.*?>
< table.height() ) {
<.*?><.*?> jqTable.append( thead );
9033 <.*?>
< table.height() ) {
<.*?><.*?> }
9034  
9035 <.*?>
< table.height() ) {
<.*?><.*?> if ( tfoot && table != tfoot.parentNode ) {
9036 <.*?>
< table.height() ) {
<.*?><.*?> jqTable.children('tfoot').detach();
9037 <.*?>
< table.height() ) {
<.*?><.*?> jqTable.append( tfoot );
9038 <.*?>
< table.height() ) {
<.*?><.*?> }
9039  
9040 <.*?>
< table.height() ) {
<.*?><.*?> // Remove the DataTables generated nodes, events and classes
9041 <.*?>
< table.height() ) {
<.*?><.*?> jqTable.detach();
9042 <.*?>
< table.height() ) {
<.*?><.*?> jqWrapper.detach();
9043  
9044 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSorting = [];
9045 <.*?>
< table.height() ) {
<.*?><.*?> settings.aaSortingFixed = [];
9046 <.*?>
< table.height() ) {
<.*?><.*?> _fnSortingClasses( settings );
9047  
9048 <.*?>
< table.height() ) {
<.*?><.*?> $( rows ).removeClass( settings.asStripeClasses.join(' ') );
9049  
9050 <.*?>
< table.height() ) {
<.*?><.*?> $('th, td', thead).removeClass( classes.sSortable+' '+
9051 <.*?>
< table.height() ) {
<.*?><.*?> classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
9052 <.*?>
< table.height() ) {
<.*?><.*?> );
9053  
9054 <.*?>
< table.height() ) {
<.*?><.*?> if ( settings.bJUI ) {
9055 <.*?>
< table.height() ) {
<.*?><.*?> $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach();
9056 <.*?>
< table.height() ) {
<.*?><.*?> $('th, td', thead).each( function () {
9057 <.*?>
< table.height() ) {
<.*?><.*?> var wrapper = $('div.'+classes.sSortJUIWrapper, this);
9058 <.*?>
< table.height() ) {
<.*?><.*?> $(this).append( wrapper.contents() );
9059 <.*?>
< table.height() ) {
<.*?><.*?> wrapper.detach();
9060 <.*?>
< table.height() ) {
<.*?><.*?> } );
9061 <.*?>
< table.height() ) {
<.*?><.*?> }
9062  
9063 <.*?>
< table.height() ) {
<.*?><.*?> if ( ! remove && orig ) {
9064 <.*?>
< table.height() ) {
<.*?><.*?> // insertBefore acts like appendChild if !arg[1]
9065 <.*?>
< table.height() ) {
<.*?><.*?> orig.insertBefore( table, settings.nTableReinsertBefore );
9066 <.*?>
< table.height() ) {
<.*?><.*?> }
9067  
9068 <.*?>
< table.height() ) {
<.*?><.*?> // Add the TR elements back into the table in their original order
9069 <.*?>
< table.height() ) {
<.*?><.*?> jqTbody.children().detach();
9070 <.*?>
< table.height() ) {
<.*?><.*?> jqTbody.append( rows );
9071  
9072 <.*?>
< table.height() ) {
<.*?><.*?> // Restore the width of the original table - was read from the style property,
9073 <.*?>
< table.height() ) {
<.*?><.*?> // so we can restore directly to that
9074 <.*?>
< table.height() ) {
<.*?><.*?> jqTable
9075 <.*?>
< table.height() ) {
<.*?><.*?> .css( 'width', settings.sDestroyWidth )
9076 <.*?>
< table.height() ) {
<.*?><.*?> .removeClass( classes.sTable );
9077  
9078 <.*?>
< table.height() ) {
<.*?><.*?> // If the were originally stripe classes - then we add them back here.
9079 <.*?>
< table.height() ) {
<.*?><.*?> // Note this is not fool proof (for example if not all rows had stripe
9080 <.*?>
< table.height() ) {
<.*?><.*?> // classes - but it's a good effort without getting carried away
9081 <.*?>
< table.height() ) {
<.*?><.*?> ien = settings.asDestroyStripes.length;
9082  
9083 <.*?>
< table.height() ) {
<.*?><.*?> if ( ien ) {
9084 <.*?>
< table.height() ) {
<.*?><.*?> jqTbody.children().each( function (i) {
9085 <.*?>
< table.height() ) {
<.*?><.*?> $(this).addClass( settings.asDestroyStripes[i % ien] );
9086 <.*?>
< table.height() ) {
<.*?><.*?> } );
9087 <.*?>
< table.height() ) {
<.*?><.*?> }
9088  
9089 <.*?>
< table.height() ) {
<.*?><.*?> /* Remove the settings object from the settings array */
9090 <.*?>
< table.height() ) {
<.*?><.*?> var idx = $.inArray( settings, DataTable.settings );
9091 <.*?>
< table.height() ) {
<.*?><.*?> if ( idx !== -1 ) {
9092 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.settings.splice( idx, 1 );
9093 <.*?>
< table.height() ) {
<.*?><.*?> }
9094 <.*?>
< table.height() ) {
<.*?><.*?> } );
9095 <.*?>
< table.height() ) {
<.*?><.*?> } );
9096  
9097  
9098 <.*?>
< table.height() ) {
<.*?><.*?> // Add the `every()` method for rows, columns and cells in a compact form
9099 <.*?>
< table.height() ) {
<.*?><.*?> $.each( [ 'column', 'row', 'cell' ], function ( i, type ) {
9100 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( type+'s().every()', function ( fn ) {
9101 <.*?>
< table.height() ) {
<.*?><.*?> return this.iterator( type, function ( settings, idx, idx2 ) {
9102 <.*?>
< table.height() ) {
<.*?><.*?> // idx2 is undefined for rows and columns.
9103 <.*?>
< table.height() ) {
<.*?><.*?> fn.call( new _Api( settings )[ type ]( idx, idx2 ) );
9104 <.*?>
< table.height() ) {
<.*?><.*?> } );
9105 <.*?>
< table.height() ) {
<.*?><.*?> } );
9106 <.*?>
< table.height() ) {
<.*?><.*?> } );
9107  
9108  
9109 <.*?>
< table.height() ) {
<.*?><.*?> // i18n method for extensions to be able to use the language object from the
9110 <.*?>
< table.height() ) {
<.*?><.*?> // DataTable
9111 <.*?>
< table.height() ) {
<.*?><.*?> _api_register( 'i18n()', function ( token, def, plural ) {
9112 <.*?>
< table.height() ) {
<.*?><.*?> var ctx = this.context[0];
9113 <.*?>
< table.height() ) {
<.*?><.*?> var resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );
9114  
9115 <.*?>
< table.height() ) {
<.*?><.*?> if ( resolved === undefined ) {
9116 <.*?>
< table.height() ) {
<.*?><.*?> resolved = def;
9117 <.*?>
< table.height() ) {
<.*?><.*?> }
9118  
9119 <.*?>
< table.height() ) {
<.*?><.*?> if ( plural !== undefined && $.isPlainObject( resolved ) ) {
9120 <.*?>
< table.height() ) {
<.*?><.*?> resolved = resolved[ plural ] !== undefined ?
9121 <.*?>
< table.height() ) {
<.*?><.*?> resolved[ plural ] :
9122 <.*?>
< table.height() ) {
<.*?><.*?> resolved._;
9123 <.*?>
< table.height() ) {
<.*?><.*?> }
9124  
9125 <.*?>
< table.height() ) {
<.*?><.*?> return resolved.replace( '%d', plural ); // nb: plural might be undefined,
9126 <.*?>
< table.height() ) {
<.*?><.*?> } );
9127  
9128 <.*?>
< table.height() ) {
<.*?><.*?> /**
9129 <.*?>
< table.height() ) {
<.*?><.*?> * Version string for plug-ins to check compatibility. Allowed format is
9130 <.*?>
< table.height() ) {
<.*?><.*?> * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
9131 <.*?>
< table.height() ) {
<.*?><.*?> * only for non-release builds. See http://semver.org/ for more information.
9132 <.*?>
< table.height() ) {
<.*?><.*?> * @member
9133 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9134 <.*?>
< table.height() ) {
<.*?><.*?> * @default Version number
9135 <.*?>
< table.height() ) {
<.*?><.*?> */
9136 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.version = "1.10.7";
9137  
9138 <.*?>
< table.height() ) {
<.*?><.*?> /**
9139 <.*?>
< table.height() ) {
<.*?><.*?> * Private data store, containing all of the settings objects that are
9140 <.*?>
< table.height() ) {
<.*?><.*?> * created for the tables on a given page.
9141 <.*?>
< table.height() ) {
<.*?><.*?> *
9142 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the `DataTable.settings` object is aliased to
9143 <.*?>
< table.height() ) {
<.*?><.*?> * `jQuery.fn.dataTableExt` through which it may be accessed and
9144 <.*?>
< table.height() ) {
<.*?><.*?> * manipulated, or `jQuery.fn.dataTable.settings`.
9145 <.*?>
< table.height() ) {
<.*?><.*?> * @member
9146 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9147 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
9148 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9149 <.*?>
< table.height() ) {
<.*?><.*?> */
9150 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.settings = [];
9151  
9152 <.*?>
< table.height() ) {
<.*?><.*?> /**
9153 <.*?>
< table.height() ) {
<.*?><.*?> * Object models container, for the various models that DataTables has
9154 <.*?>
< table.height() ) {
<.*?><.*?> * available to it. These models define the objects that are used to hold
9155 <.*?>
< table.height() ) {
<.*?><.*?> * the active state and configuration of the table.
9156 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
9157 <.*?>
< table.height() ) {
<.*?><.*?> */
9158 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.models = {};
9159  
9160  
9161  
9162 <.*?>
< table.height() ) {
<.*?><.*?> /**
9163 <.*?>
< table.height() ) {
<.*?><.*?> * Template object for the way in which DataTables holds information about
9164 <.*?>
< table.height() ) {
<.*?><.*?> * search information for the global filter and individual column filters.
9165 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
9166 <.*?>
< table.height() ) {
<.*?><.*?> */
9167 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.models.oSearch = {
9168 <.*?>
< table.height() ) {
<.*?><.*?> /**
9169 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if the filtering should be case insensitive or not
9170 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9171 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
9172 <.*?>
< table.height() ) {
<.*?><.*?> */
9173 <.*?>
< table.height() ) {
<.*?><.*?> "bCaseInsensitive": true,
9174  
9175 <.*?>
< table.height() ) {
<.*?><.*?> /**
9176 <.*?>
< table.height() ) {
<.*?><.*?> * Applied search term
9177 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9178 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
9179 <.*?>
< table.height() ) {
<.*?><.*?> */
9180 <.*?>
< table.height() ) {
<.*?><.*?> "sSearch": "",
9181  
9182 <.*?>
< table.height() ) {
<.*?><.*?> /**
9183 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if the search term should be interpreted as a
9184 <.*?>
< table.height() ) {
<.*?><.*?> * regular expression (true) or not (false) and therefore and special
9185 <.*?>
< table.height() ) {
<.*?><.*?> * regex characters escaped.
9186 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9187 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
9188 <.*?>
< table.height() ) {
<.*?><.*?> */
9189 <.*?>
< table.height() ) {
<.*?><.*?> "bRegex": false,
9190  
9191 <.*?>
< table.height() ) {
<.*?><.*?> /**
9192 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if DataTables is to use its smart filtering or not.
9193 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9194 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
9195 <.*?>
< table.height() ) {
<.*?><.*?> */
9196 <.*?>
< table.height() ) {
<.*?><.*?> "bSmart": true
9197 <.*?>
< table.height() ) {
<.*?><.*?> };
9198  
9199  
9200  
9201  
9202 <.*?>
< table.height() ) {
<.*?><.*?> /**
9203 <.*?>
< table.height() ) {
<.*?><.*?> * Template object for the way in which DataTables holds information about
9204 <.*?>
< table.height() ) {
<.*?><.*?> * each individual row. This is the object format used for the settings
9205 <.*?>
< table.height() ) {
<.*?><.*?> * aoData array.
9206 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
9207 <.*?>
< table.height() ) {
<.*?><.*?> */
9208 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.models.oRow = {
9209 <.*?>
< table.height() ) {
<.*?><.*?> /**
9210 <.*?>
< table.height() ) {
<.*?><.*?> * TR element for the row
9211 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
9212 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9213 <.*?>
< table.height() ) {
<.*?><.*?> */
9214 <.*?>
< table.height() ) {
<.*?><.*?> "nTr": null,
9215  
9216 <.*?>
< table.height() ) {
<.*?><.*?> /**
9217 <.*?>
< table.height() ) {
<.*?><.*?> * Array of TD elements for each row. This is null until the row has been
9218 <.*?>
< table.height() ) {
<.*?><.*?> * created.
9219 <.*?>
< table.height() ) {
<.*?><.*?> * @type array nodes
9220 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
9221 <.*?>
< table.height() ) {
<.*?><.*?> */
9222 <.*?>
< table.height() ) {
<.*?><.*?> "anCells": null,
9223  
9224 <.*?>
< table.height() ) {
<.*?><.*?> /**
9225 <.*?>
< table.height() ) {
<.*?><.*?> * Data object from the original data source for the row. This is either
9226 <.*?>
< table.height() ) {
<.*?><.*?> * an array if using the traditional form of DataTables, or an object if
9227 <.*?>
< table.height() ) {
<.*?><.*?> * using mData options. The exact type will depend on the passed in
9228 <.*?>
< table.height() ) {
<.*?><.*?> * data from the data source, or will be an array if using DOM a data
9229 <.*?>
< table.height() ) {
<.*?><.*?> * source.
9230 <.*?>
< table.height() ) {
<.*?><.*?> * @type array|object
9231 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
9232 <.*?>
< table.height() ) {
<.*?><.*?> */
9233 <.*?>
< table.height() ) {
<.*?><.*?> "_aData": [],
9234  
9235 <.*?>
< table.height() ) {
<.*?><.*?> /**
9236 <.*?>
< table.height() ) {
<.*?><.*?> * Sorting data cache - this array is ostensibly the same length as the
9237 <.*?>
< table.height() ) {
<.*?><.*?> * number of columns (although each index is generated only as it is
9238 <.*?>
< table.height() ) {
<.*?><.*?> * needed), and holds the data that is used for sorting each column in the
9239 <.*?>
< table.height() ) {
<.*?><.*?> * row. We do this cache generation at the start of the sort in order that
9240 <.*?>
< table.height() ) {
<.*?><.*?> * the formatting of the sort data need be done only once for each cell
9241 <.*?>
< table.height() ) {
<.*?><.*?> * per sort. This array should not be read from or written to by anything
9242 <.*?>
< table.height() ) {
<.*?><.*?> * other than the master sorting methods.
9243 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9244 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9245 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9246 <.*?>
< table.height() ) {
<.*?><.*?> */
9247 <.*?>
< table.height() ) {
<.*?><.*?> "_aSortData": null,
9248  
9249 <.*?>
< table.height() ) {
<.*?><.*?> /**
9250 <.*?>
< table.height() ) {
<.*?><.*?> * Per cell filtering data cache. As per the sort data cache, used to
9251 <.*?>
< table.height() ) {
<.*?><.*?> * increase the performance of the filtering in DataTables
9252 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9253 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9254 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9255 <.*?>
< table.height() ) {
<.*?><.*?> */
9256 <.*?>
< table.height() ) {
<.*?><.*?> "_aFilterData": null,
9257  
9258 <.*?>
< table.height() ) {
<.*?><.*?> /**
9259 <.*?>
< table.height() ) {
<.*?><.*?> * Filtering data cache. This is the same as the cell filtering cache, but
9260 <.*?>
< table.height() ) {
<.*?><.*?> * in this case a string rather than an array. This is easily computed with
9261 <.*?>
< table.height() ) {
<.*?><.*?> * a join on `_aFilterData`, but is provided as a cache so the join isn't
9262 <.*?>
< table.height() ) {
<.*?><.*?> * needed on every search (memory traded for performance)
9263 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9264 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9265 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9266 <.*?>
< table.height() ) {
<.*?><.*?> */
9267 <.*?>
< table.height() ) {
<.*?><.*?> "_sFilterRow": null,
9268  
9269 <.*?>
< table.height() ) {
<.*?><.*?> /**
9270 <.*?>
< table.height() ) {
<.*?><.*?> * Cache of the class name that DataTables has applied to the row, so we
9271 <.*?>
< table.height() ) {
<.*?><.*?> * can quickly look at this variable rather than needing to do a DOM check
9272 <.*?>
< table.height() ) {
<.*?><.*?> * on className for the nTr property.
9273 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9274 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
9275 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9276 <.*?>
< table.height() ) {
<.*?><.*?> */
9277 <.*?>
< table.height() ) {
<.*?><.*?> "_sRowStripe": "",
9278  
9279 <.*?>
< table.height() ) {
<.*?><.*?> /**
9280 <.*?>
< table.height() ) {
<.*?><.*?> * Denote if the original data source was from the DOM, or the data source
9281 <.*?>
< table.height() ) {
<.*?><.*?> * object. This is used for invalidating data, so DataTables can
9282 <.*?>
< table.height() ) {
<.*?><.*?> * automatically read data from the original source, unless uninstructed
9283 <.*?>
< table.height() ) {
<.*?><.*?> * otherwise.
9284 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9285 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9286 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9287 <.*?>
< table.height() ) {
<.*?><.*?> */
9288 <.*?>
< table.height() ) {
<.*?><.*?> "src": null
9289 <.*?>
< table.height() ) {
<.*?><.*?> };
9290  
9291  
9292 <.*?>
< table.height() ) {
<.*?><.*?> /**
9293 <.*?>
< table.height() ) {
<.*?><.*?> * Template object for the column information object in DataTables. This object
9294 <.*?>
< table.height() ) {
<.*?><.*?> * is held in the settings aoColumns array and contains all the information that
9295 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables needs about each individual column.
9296 <.*?>
< table.height() ) {
<.*?><.*?> *
9297 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this object is related to {@link DataTable.defaults.column}
9298 <.*?>
< table.height() ) {
<.*?><.*?> * but this one is the internal data store for DataTables's cache of columns.
9299 <.*?>
< table.height() ) {
<.*?><.*?> * It should NOT be manipulated outside of DataTables. Any configuration should
9300 <.*?>
< table.height() ) {
<.*?><.*?> * be done through the initialisation options.
9301 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
9302 <.*?>
< table.height() ) {
<.*?><.*?> */
9303 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.models.oColumn = {
9304 <.*?>
< table.height() ) {
<.*?><.*?> /**
9305 <.*?>
< table.height() ) {
<.*?><.*?> * Column index. This could be worked out on-the-fly with $.inArray, but it
9306 <.*?>
< table.height() ) {
<.*?><.*?> * is faster to just hold it as a variable
9307 <.*?>
< table.height() ) {
<.*?><.*?> * @type integer
9308 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9309 <.*?>
< table.height() ) {
<.*?><.*?> */
9310 <.*?>
< table.height() ) {
<.*?><.*?> "idx": null,
9311  
9312 <.*?>
< table.height() ) {
<.*?><.*?> /**
9313 <.*?>
< table.height() ) {
<.*?><.*?> * A list of the columns that sorting should occur on when this column
9314 <.*?>
< table.height() ) {
<.*?><.*?> * is sorted. That this property is an array allows multi-column sorting
9315 <.*?>
< table.height() ) {
<.*?><.*?> * to be defined for a column (for example first name / last name columns
9316 <.*?>
< table.height() ) {
<.*?><.*?> * would benefit from this). The values are integers pointing to the
9317 <.*?>
< table.height() ) {
<.*?><.*?> * columns to be sorted on (typically it will be a single integer pointing
9318 <.*?>
< table.height() ) {
<.*?><.*?> * at itself, but that doesn't need to be the case).
9319 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9320 <.*?>
< table.height() ) {
<.*?><.*?> */
9321 <.*?>
< table.height() ) {
<.*?><.*?> "aDataSort": null,
9322  
9323 <.*?>
< table.height() ) {
<.*?><.*?> /**
9324 <.*?>
< table.height() ) {
<.*?><.*?> * Define the sorting directions that are applied to the column, in sequence
9325 <.*?>
< table.height() ) {
<.*?><.*?> * as the column is repeatedly sorted upon - i.e. the first value is used
9326 <.*?>
< table.height() ) {
<.*?><.*?> * as the sorting direction when the column if first sorted (clicked on).
9327 <.*?>
< table.height() ) {
<.*?><.*?> * Sort it again (click again) and it will move on to the next index.
9328 <.*?>
< table.height() ) {
<.*?><.*?> * Repeat until loop.
9329 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9330 <.*?>
< table.height() ) {
<.*?><.*?> */
9331 <.*?>
< table.height() ) {
<.*?><.*?> "asSorting": null,
9332  
9333 <.*?>
< table.height() ) {
<.*?><.*?> /**
9334 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if the column is searchable, and thus should be included
9335 <.*?>
< table.height() ) {
<.*?><.*?> * in the filtering or not.
9336 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9337 <.*?>
< table.height() ) {
<.*?><.*?> */
9338 <.*?>
< table.height() ) {
<.*?><.*?> "bSearchable": null,
9339  
9340 <.*?>
< table.height() ) {
<.*?><.*?> /**
9341 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if the column is sortable or not.
9342 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9343 <.*?>
< table.height() ) {
<.*?><.*?> */
9344 <.*?>
< table.height() ) {
<.*?><.*?> "bSortable": null,
9345  
9346 <.*?>
< table.height() ) {
<.*?><.*?> /**
9347 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if the column is currently visible in the table or not
9348 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9349 <.*?>
< table.height() ) {
<.*?><.*?> */
9350 <.*?>
< table.height() ) {
<.*?><.*?> "bVisible": null,
9351  
9352 <.*?>
< table.height() ) {
<.*?><.*?> /**
9353 <.*?>
< table.height() ) {
<.*?><.*?> * Store for manual type assignment using the `column.type` option. This
9354 <.*?>
< table.height() ) {
<.*?><.*?> * is held in store so we can manipulate the column's `sType` property.
9355 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9356 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9357 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9358 <.*?>
< table.height() ) {
<.*?><.*?> */
9359 <.*?>
< table.height() ) {
<.*?><.*?> "_sManualType": null,
9360  
9361 <.*?>
< table.height() ) {
<.*?><.*?> /**
9362 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if HTML5 data attributes should be used as the data
9363 <.*?>
< table.height() ) {
<.*?><.*?> * source for filtering or sorting. True is either are.
9364 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9365 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
9366 <.*?>
< table.height() ) {
<.*?><.*?> * @private
9367 <.*?>
< table.height() ) {
<.*?><.*?> */
9368 <.*?>
< table.height() ) {
<.*?><.*?> "_bAttrSrc": false,
9369  
9370 <.*?>
< table.height() ) {
<.*?><.*?> /**
9371 <.*?>
< table.height() ) {
<.*?><.*?> * Developer definable function that is called whenever a cell is created (Ajax source,
9372 <.*?>
< table.height() ) {
<.*?><.*?> * etc) or processed for input (DOM source). This can be used as a compliment to mRender
9373 <.*?>
< table.height() ) {
<.*?><.*?> * allowing you to modify the DOM element (add background colour for example) when the
9374 <.*?>
< table.height() ) {
<.*?><.*?> * element is available.
9375 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
9376 <.*?>
< table.height() ) {
<.*?><.*?> * @param {element} nTd The TD node that has been created
9377 <.*?>
< table.height() ) {
<.*?><.*?> * @param {*} sData The Data for the cell
9378 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object} oData The data for the whole row
9379 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} iRow The row index for the aoData data store
9380 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9381 <.*?>
< table.height() ) {
<.*?><.*?> */
9382 <.*?>
< table.height() ) {
<.*?><.*?> "fnCreatedCell": null,
9383  
9384 <.*?>
< table.height() ) {
<.*?><.*?> /**
9385 <.*?>
< table.height() ) {
<.*?><.*?> * Function to get data from a cell in a column. You should <b>never</b>
9386 <.*?>
< table.height() ) {
<.*?><.*?> * access data directly through _aData internally in DataTables - always use
9387 <.*?>
< table.height() ) {
<.*?><.*?> * the method attached to this property. It allows mData to function as
9388 <.*?>
< table.height() ) {
<.*?><.*?> * required. This function is automatically assigned by the column
9389 <.*?>
< table.height() ) {
<.*?><.*?> * initialisation method
9390 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
9391 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object} oData The data array/object for the array
9392 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. aoData[]._aData)
9393 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} sSpecific The specific data type you want to get -
9394 <.*?>
< table.height() ) {
<.*?><.*?> * 'display', 'type' 'filter' 'sort'
9395 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {*} The data for the cell from the given row's data
9396 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9397 <.*?>
< table.height() ) {
<.*?><.*?> */
9398 <.*?>
< table.height() ) {
<.*?><.*?> "fnGetData": null,
9399  
9400 <.*?>
< table.height() ) {
<.*?><.*?> /**
9401 <.*?>
< table.height() ) {
<.*?><.*?> * Function to set data for a cell in the column. You should <b>never</b>
9402 <.*?>
< table.height() ) {
<.*?><.*?> * set the data directly to _aData internally in DataTables - always use
9403 <.*?>
< table.height() ) {
<.*?><.*?> * this method. It allows mData to function as required. This function
9404 <.*?>
< table.height() ) {
<.*?><.*?> * is automatically assigned by the column initialisation method
9405 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
9406 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object} oData The data array/object for the array
9407 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. aoData[]._aData)
9408 <.*?>
< table.height() ) {
<.*?><.*?> * @param {*} sValue Value to set
9409 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9410 <.*?>
< table.height() ) {
<.*?><.*?> */
9411 <.*?>
< table.height() ) {
<.*?><.*?> "fnSetData": null,
9412  
9413 <.*?>
< table.height() ) {
<.*?><.*?> /**
9414 <.*?>
< table.height() ) {
<.*?><.*?> * Property to read the value for the cells in the column from the data
9415 <.*?>
< table.height() ) {
<.*?><.*?> * source array / object. If null, then the default content is used, if a
9416 <.*?>
< table.height() ) {
<.*?><.*?> * function is given then the return from the function is used.
9417 <.*?>
< table.height() ) {
<.*?><.*?> * @type function|int|string|null
9418 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9419 <.*?>
< table.height() ) {
<.*?><.*?> */
9420 <.*?>
< table.height() ) {
<.*?><.*?> "mData": null,
9421  
9422 <.*?>
< table.height() ) {
<.*?><.*?> /**
9423 <.*?>
< table.height() ) {
<.*?><.*?> * Partner property to mData which is used (only when defined) to get
9424 <.*?>
< table.height() ) {
<.*?><.*?> * the data - i.e. it is basically the same as mData, but without the
9425 <.*?>
< table.height() ) {
<.*?><.*?> * 'set' option, and also the data fed to it is the result from mData.
9426 <.*?>
< table.height() ) {
<.*?><.*?> * This is the rendering method to match the data method of mData.
9427 <.*?>
< table.height() ) {
<.*?><.*?> * @type function|int|string|null
9428 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9429 <.*?>
< table.height() ) {
<.*?><.*?> */
9430 <.*?>
< table.height() ) {
<.*?><.*?> "mRender": null,
9431  
9432 <.*?>
< table.height() ) {
<.*?><.*?> /**
9433 <.*?>
< table.height() ) {
<.*?><.*?> * Unique header TH/TD element for this column - this is what the sorting
9434 <.*?>
< table.height() ) {
<.*?><.*?> * listener is attached to (if sorting is enabled.)
9435 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
9436 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9437 <.*?>
< table.height() ) {
<.*?><.*?> */
9438 <.*?>
< table.height() ) {
<.*?><.*?> "nTh": null,
9439  
9440 <.*?>
< table.height() ) {
<.*?><.*?> /**
9441 <.*?>
< table.height() ) {
<.*?><.*?> * Unique footer TH/TD element for this column (if there is one). Not used
9442 <.*?>
< table.height() ) {
<.*?><.*?> * in DataTables as such, but can be used for plug-ins to reference the
9443 <.*?>
< table.height() ) {
<.*?><.*?> * footer for each column.
9444 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
9445 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9446 <.*?>
< table.height() ) {
<.*?><.*?> */
9447 <.*?>
< table.height() ) {
<.*?><.*?> "nTf": null,
9448  
9449 <.*?>
< table.height() ) {
<.*?><.*?> /**
9450 <.*?>
< table.height() ) {
<.*?><.*?> * The class to apply to all TD elements in the table's TBODY for the column
9451 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9452 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9453 <.*?>
< table.height() ) {
<.*?><.*?> */
9454 <.*?>
< table.height() ) {
<.*?><.*?> "sClass": null,
9455  
9456 <.*?>
< table.height() ) {
<.*?><.*?> /**
9457 <.*?>
< table.height() ) {
<.*?><.*?> * When DataTables calculates the column widths to assign to each column,
9458 <.*?>
< table.height() ) {
<.*?><.*?> * it finds the longest string in each column and then constructs a
9459 <.*?>
< table.height() ) {
<.*?><.*?> * temporary table and reads the widths from that. The problem with this
9460 <.*?>
< table.height() ) {
<.*?><.*?> * is that "mmm" is much wider then "iiii", but the latter is a longer
9461 <.*?>
< table.height() ) {
<.*?><.*?> * string - thus the calculation can go wrong (doing it properly and putting
9462 <.*?>
< table.height() ) {
<.*?><.*?> * it into an DOM object and measuring that is horribly(!) slow). Thus as
9463 <.*?>
< table.height() ) {
<.*?><.*?> * a "work around" we provide this option. It will append its value to the
9464 <.*?>
< table.height() ) {
<.*?><.*?> * text that is found to be the longest string for the column - i.e. padding.
9465 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9466 <.*?>
< table.height() ) {
<.*?><.*?> */
9467 <.*?>
< table.height() ) {
<.*?><.*?> "sContentPadding": null,
9468  
9469 <.*?>
< table.height() ) {
<.*?><.*?> /**
9470 <.*?>
< table.height() ) {
<.*?><.*?> * Allows a default value to be given for a column's data, and will be used
9471 <.*?>
< table.height() ) {
<.*?><.*?> * whenever a null data source is encountered (this can be because mData
9472 <.*?>
< table.height() ) {
<.*?><.*?> * is set to null, or because the data source itself is null).
9473 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9474 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9475 <.*?>
< table.height() ) {
<.*?><.*?> */
9476 <.*?>
< table.height() ) {
<.*?><.*?> "sDefaultContent": null,
9477  
9478 <.*?>
< table.height() ) {
<.*?><.*?> /**
9479 <.*?>
< table.height() ) {
<.*?><.*?> * Name for the column, allowing reference to the column by name as well as
9480 <.*?>
< table.height() ) {
<.*?><.*?> * by index (needs a lookup to work by name).
9481 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9482 <.*?>
< table.height() ) {
<.*?><.*?> */
9483 <.*?>
< table.height() ) {
<.*?><.*?> "sName": null,
9484  
9485 <.*?>
< table.height() ) {
<.*?><.*?> /**
9486 <.*?>
< table.height() ) {
<.*?><.*?> * Custom sorting data type - defines which of the available plug-ins in
9487 <.*?>
< table.height() ) {
<.*?><.*?> * afnSortData the custom sorting will use - if any is defined.
9488 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9489 <.*?>
< table.height() ) {
<.*?><.*?> * @default std
9490 <.*?>
< table.height() ) {
<.*?><.*?> */
9491 <.*?>
< table.height() ) {
<.*?><.*?> "sSortDataType": 'std',
9492  
9493 <.*?>
< table.height() ) {
<.*?><.*?> /**
9494 <.*?>
< table.height() ) {
<.*?><.*?> * Class to be applied to the header element when sorting on this column
9495 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9496 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9497 <.*?>
< table.height() ) {
<.*?><.*?> */
9498 <.*?>
< table.height() ) {
<.*?><.*?> "sSortingClass": null,
9499  
9500 <.*?>
< table.height() ) {
<.*?><.*?> /**
9501 <.*?>
< table.height() ) {
<.*?><.*?> * Class to be applied to the header element when sorting on this column -
9502 <.*?>
< table.height() ) {
<.*?><.*?> * when jQuery UI theming is used.
9503 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9504 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9505 <.*?>
< table.height() ) {
<.*?><.*?> */
9506 <.*?>
< table.height() ) {
<.*?><.*?> "sSortingClassJUI": null,
9507  
9508 <.*?>
< table.height() ) {
<.*?><.*?> /**
9509 <.*?>
< table.height() ) {
<.*?><.*?> * Title of the column - what is seen in the TH element (nTh).
9510 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9511 <.*?>
< table.height() ) {
<.*?><.*?> */
9512 <.*?>
< table.height() ) {
<.*?><.*?> "sTitle": null,
9513  
9514 <.*?>
< table.height() ) {
<.*?><.*?> /**
9515 <.*?>
< table.height() ) {
<.*?><.*?> * Column sorting and filtering type
9516 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9517 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9518 <.*?>
< table.height() ) {
<.*?><.*?> */
9519 <.*?>
< table.height() ) {
<.*?><.*?> "sType": null,
9520  
9521 <.*?>
< table.height() ) {
<.*?><.*?> /**
9522 <.*?>
< table.height() ) {
<.*?><.*?> * Width of the column
9523 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9524 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9525 <.*?>
< table.height() ) {
<.*?><.*?> */
9526 <.*?>
< table.height() ) {
<.*?><.*?> "sWidth": null,
9527  
9528 <.*?>
< table.height() ) {
<.*?><.*?> /**
9529 <.*?>
< table.height() ) {
<.*?><.*?> * Width of the column when it was first "encountered"
9530 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
9531 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9532 <.*?>
< table.height() ) {
<.*?><.*?> */
9533 <.*?>
< table.height() ) {
<.*?><.*?> "sWidthOrig": null
9534 <.*?>
< table.height() ) {
<.*?><.*?> };
9535  
9536  
9537 <.*?>
< table.height() ) {
<.*?><.*?> /*
9538 <.*?>
< table.height() ) {
<.*?><.*?> * Developer note: The properties of the object below are given in Hungarian
9539 <.*?>
< table.height() ) {
<.*?><.*?> * notation, that was used as the interface for DataTables prior to v1.10, however
9540 <.*?>
< table.height() ) {
<.*?><.*?> * from v1.10 onwards the primary interface is camel case. In order to avoid
9541 <.*?>
< table.height() ) {
<.*?><.*?> * breaking backwards compatibility utterly with this change, the Hungarian
9542 <.*?>
< table.height() ) {
<.*?><.*?> * version is still, internally the primary interface, but is is not documented
9543 <.*?>
< table.height() ) {
<.*?><.*?> * - hence the @name tags in each doc comment. This allows a Javascript function
9544 <.*?>
< table.height() ) {
<.*?><.*?> * to create a map from Hungarian notation to camel case (going the other direction
9545 <.*?>
< table.height() ) {
<.*?><.*?> * would require each property to be listed, which would at around 3K to the size
9546 <.*?>
< table.height() ) {
<.*?><.*?> * of DataTables, while this method is about a 0.5K hit.
9547 <.*?>
< table.height() ) {
<.*?><.*?> *
9548 <.*?>
< table.height() ) {
<.*?><.*?> * Ultimately this does pave the way for Hungarian notation to be dropped
9549 <.*?>
< table.height() ) {
<.*?><.*?> * completely, but that is a massive amount of work and will break current
9550 <.*?>
< table.height() ) {
<.*?><.*?> * installs (therefore is on-hold until v2).
9551 <.*?>
< table.height() ) {
<.*?><.*?> */
9552  
9553 <.*?>
< table.height() ) {
<.*?><.*?> /**
9554 <.*?>
< table.height() ) {
<.*?><.*?> * Initialisation options that can be given to DataTables at initialisation
9555 <.*?>
< table.height() ) {
<.*?><.*?> * time.
9556 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
9557 <.*?>
< table.height() ) {
<.*?><.*?> */
9558 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.defaults = {
9559 <.*?>
< table.height() ) {
<.*?><.*?> /**
9560 <.*?>
< table.height() ) {
<.*?><.*?> * An array of data to use for the table, passed in at initialisation which
9561 <.*?>
< table.height() ) {
<.*?><.*?> * will be used in preference to any data which is already in the DOM. This is
9562 <.*?>
< table.height() ) {
<.*?><.*?> * particularly useful for constructing tables purely in Javascript, for
9563 <.*?>
< table.height() ) {
<.*?><.*?> * example with a custom Ajax call.
9564 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9565 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9566 <.*?>
< table.height() ) {
<.*?><.*?> *
9567 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9568 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.data
9569 <.*?>
< table.height() ) {
<.*?><.*?> *
9570 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9571 <.*?>
< table.height() ) {
<.*?><.*?> * // Using a 2D array data source
9572 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
9573 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9574 <.*?>
< table.height() ) {
<.*?><.*?> * "data": [
9575 <.*?>
< table.height() ) {
<.*?><.*?> * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
9576 <.*?>
< table.height() ) {
<.*?><.*?> * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
9577 <.*?>
< table.height() ) {
<.*?><.*?> * ],
9578 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
9579 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Engine" },
9580 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Browser" },
9581 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Platform" },
9582 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Version" },
9583 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Grade" }
9584 <.*?>
< table.height() ) {
<.*?><.*?> * ]
9585 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9586 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9587 <.*?>
< table.height() ) {
<.*?><.*?> *
9588 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9589 <.*?>
< table.height() ) {
<.*?><.*?> * // Using an array of objects as a data source (`data`)
9590 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
9591 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9592 <.*?>
< table.height() ) {
<.*?><.*?> * "data": [
9593 <.*?>
< table.height() ) {
<.*?><.*?> * {
9594 <.*?>
< table.height() ) {
<.*?><.*?> * "engine": "Trident",
9595 <.*?>
< table.height() ) {
<.*?><.*?> * "browser": "Internet Explorer 4.0",
9596 <.*?>
< table.height() ) {
<.*?><.*?> * "platform": "Win 95+",
9597 <.*?>
< table.height() ) {
<.*?><.*?> * "version": 4,
9598 <.*?>
< table.height() ) {
<.*?><.*?> * "grade": "X"
9599 <.*?>
< table.height() ) {
<.*?><.*?> * },
9600 <.*?>
< table.height() ) {
<.*?><.*?> * {
9601 <.*?>
< table.height() ) {
<.*?><.*?> * "engine": "Trident",
9602 <.*?>
< table.height() ) {
<.*?><.*?> * "browser": "Internet Explorer 5.0",
9603 <.*?>
< table.height() ) {
<.*?><.*?> * "platform": "Win 95+",
9604 <.*?>
< table.height() ) {
<.*?><.*?> * "version": 5,
9605 <.*?>
< table.height() ) {
<.*?><.*?> * "grade": "C"
9606 <.*?>
< table.height() ) {
<.*?><.*?> * }
9607 <.*?>
< table.height() ) {
<.*?><.*?> * ],
9608 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
9609 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Engine", "data": "engine" },
9610 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Browser", "data": "browser" },
9611 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Platform", "data": "platform" },
9612 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Version", "data": "version" },
9613 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "Grade", "data": "grade" }
9614 <.*?>
< table.height() ) {
<.*?><.*?> * ]
9615 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9616 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9617 <.*?>
< table.height() ) {
<.*?><.*?> */
9618 <.*?>
< table.height() ) {
<.*?><.*?> "aaData": null,
9619  
9620  
9621 <.*?>
< table.height() ) {
<.*?><.*?> /**
9622 <.*?>
< table.height() ) {
<.*?><.*?> * If ordering is enabled, then DataTables will perform a first pass sort on
9623 <.*?>
< table.height() ) {
<.*?><.*?> * initialisation. You can define which column(s) the sort is performed
9624 <.*?>
< table.height() ) {
<.*?><.*?> * upon, and the sorting direction, with this variable. The `sorting` array
9625 <.*?>
< table.height() ) {
<.*?><.*?> * should contain an array for each column to be sorted initially containing
9626 <.*?>
< table.height() ) {
<.*?><.*?> * the column's index and a direction string ('asc' or 'desc').
9627 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9628 <.*?>
< table.height() ) {
<.*?><.*?> * @default [[0,'asc']]
9629 <.*?>
< table.height() ) {
<.*?><.*?> *
9630 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9631 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.order
9632 <.*?>
< table.height() ) {
<.*?><.*?> *
9633 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9634 <.*?>
< table.height() ) {
<.*?><.*?> * // Sort by 3rd column first, and then 4th column
9635 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9636 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9637 <.*?>
< table.height() ) {
<.*?><.*?> * "order": [[2,'asc'], [3,'desc']]
9638 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9639 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9640 <.*?>
< table.height() ) {
<.*?><.*?> *
9641 <.*?>
< table.height() ) {
<.*?><.*?> * // No initial sorting
9642 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9643 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9644 <.*?>
< table.height() ) {
<.*?><.*?> * "order": []
9645 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9646 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9647 <.*?>
< table.height() ) {
<.*?><.*?> */
9648 <.*?>
< table.height() ) {
<.*?><.*?> "aaSorting": [[0,'asc']],
9649  
9650  
9651 <.*?>
< table.height() ) {
<.*?><.*?> /**
9652 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter is basically identical to the `sorting` parameter, but
9653 <.*?>
< table.height() ) {
<.*?><.*?> * cannot be overridden by user interaction with the table. What this means
9654 <.*?>
< table.height() ) {
<.*?><.*?> * is that you could have a column (visible or hidden) which the sorting
9655 <.*?>
< table.height() ) {
<.*?><.*?> * will always be forced on first - any sorting after that (from the user)
9656 <.*?>
< table.height() ) {
<.*?><.*?> * will then be performed as required. This can be useful for grouping rows
9657 <.*?>
< table.height() ) {
<.*?><.*?> * together.
9658 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9659 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9660 <.*?>
< table.height() ) {
<.*?><.*?> *
9661 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9662 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.orderFixed
9663 <.*?>
< table.height() ) {
<.*?><.*?> *
9664 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9665 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9666 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9667 <.*?>
< table.height() ) {
<.*?><.*?> * "orderFixed": [[0,'asc']]
9668 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9669 <.*?>
< table.height() ) {
<.*?><.*?> * } )
9670 <.*?>
< table.height() ) {
<.*?><.*?> */
9671 <.*?>
< table.height() ) {
<.*?><.*?> "aaSortingFixed": [],
9672  
9673  
9674 <.*?>
< table.height() ) {
<.*?><.*?> /**
9675 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables can be instructed to load data to display in the table from a
9676 <.*?>
< table.height() ) {
<.*?><.*?> * Ajax source. This option defines how that Ajax call is made and where to.
9677 <.*?>
< table.height() ) {
<.*?><.*?> *
9678 <.*?>
< table.height() ) {
<.*?><.*?> * The `ajax` property has three different modes of operation, depending on
9679 <.*?>
< table.height() ) {
<.*?><.*?> * how it is defined. These are:
9680 <.*?>
< table.height() ) {
<.*?><.*?> *
9681 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - Set the URL from where the data should be loaded from.
9682 <.*?>
< table.height() ) {
<.*?><.*?> * * `object` - Define properties for `jQuery.ajax`.
9683 <.*?>
< table.height() ) {
<.*?><.*?> * * `function` - Custom data get function
9684 <.*?>
< table.height() ) {
<.*?><.*?> *
9685 <.*?>
< table.height() ) {
<.*?><.*?> * `string`
9686 <.*?>
< table.height() ) {
<.*?><.*?> * --------
9687 <.*?>
< table.height() ) {
<.*?><.*?> *
9688 <.*?>
< table.height() ) {
<.*?><.*?> * As a string, the `ajax` property simply defines the URL from which
9689 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables will load data.
9690 <.*?>
< table.height() ) {
<.*?><.*?> *
9691 <.*?>
< table.height() ) {
<.*?><.*?> * `object`
9692 <.*?>
< table.height() ) {
<.*?><.*?> * --------
9693 <.*?>
< table.height() ) {
<.*?><.*?> *
9694 <.*?>
< table.height() ) {
<.*?><.*?> * As an object, the parameters in the object are passed to
9695 <.*?>
< table.height() ) {
<.*?><.*?> * [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) allowing fine control
9696 <.*?>
< table.height() ) {
<.*?><.*?> * of the Ajax request. DataTables has a number of default parameters which
9697 <.*?>
< table.height() ) {
<.*?><.*?> * you can override using this option. Please refer to the jQuery
9698 <.*?>
< table.height() ) {
<.*?><.*?> * documentation for a full description of the options available, although
9699 <.*?>
< table.height() ) {
<.*?><.*?> * the following parameters provide additional options in DataTables or
9700 <.*?>
< table.height() ) {
<.*?><.*?> * require special consideration:
9701 <.*?>
< table.height() ) {
<.*?><.*?> *
9702 <.*?>
< table.height() ) {
<.*?><.*?> * * `data` - As with jQuery, `data` can be provided as an object, but it
9703 <.*?>
< table.height() ) {
<.*?><.*?> * can also be used as a function to manipulate the data DataTables sends
9704 <.*?>
< table.height() ) {
<.*?><.*?> * to the server. The function takes a single parameter, an object of
9705 <.*?>
< table.height() ) {
<.*?><.*?> * parameters with the values that DataTables has readied for sending. An
9706 <.*?>
< table.height() ) {
<.*?><.*?> * object may be returned which will be merged into the DataTables
9707 <.*?>
< table.height() ) {
<.*?><.*?> * defaults, or you can add the items to the object that was passed in and
9708 <.*?>
< table.height() ) {
<.*?><.*?> * not return anything from the function. This supersedes `fnServerParams`
9709 <.*?>
< table.height() ) {
<.*?><.*?> * from DataTables 1.9-.
9710 <.*?>
< table.height() ) {
<.*?><.*?> *
9711 <.*?>
< table.height() ) {
<.*?><.*?> * * `dataSrc` - By default DataTables will look for the property `data` (or
9712 <.*?>
< table.height() ) {
<.*?><.*?> * `aaData` for compatibility with DataTables 1.9-) when obtaining data
9713 <.*?>
< table.height() ) {
<.*?><.*?> * from an Ajax source or for server-side processing - this parameter
9714 <.*?>
< table.height() ) {
<.*?><.*?> * allows that property to be changed. You can use Javascript dotted
9715 <.*?>
< table.height() ) {
<.*?><.*?> * object notation to get a data source for multiple levels of nesting, or
9716 <.*?>
< table.height() ) {
<.*?><.*?> * it my be used as a function. As a function it takes a single parameter,
9717 <.*?>
< table.height() ) {
<.*?><.*?> * the JSON returned from the server, which can be manipulated as
9718 <.*?>
< table.height() ) {
<.*?><.*?> * required, with the returned value being that used by DataTables as the
9719 <.*?>
< table.height() ) {
<.*?><.*?> * data source for the table. This supersedes `sAjaxDataProp` from
9720 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables 1.9-.
9721 <.*?>
< table.height() ) {
<.*?><.*?> *
9722 <.*?>
< table.height() ) {
<.*?><.*?> * * `success` - Should not be overridden it is used internally in
9723 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables. To manipulate / transform the data returned by the server
9724 <.*?>
< table.height() ) {
<.*?><.*?> * use `ajax.dataSrc`, or use `ajax` as a function (see below).
9725 <.*?>
< table.height() ) {
<.*?><.*?> *
9726 <.*?>
< table.height() ) {
<.*?><.*?> * `function`
9727 <.*?>
< table.height() ) {
<.*?><.*?> * ----------
9728 <.*?>
< table.height() ) {
<.*?><.*?> *
9729 <.*?>
< table.height() ) {
<.*?><.*?> * As a function, making the Ajax call is left up to yourself allowing
9730 <.*?>
< table.height() ) {
<.*?><.*?> * complete control of the Ajax request. Indeed, if desired, a method other
9731 <.*?>
< table.height() ) {
<.*?><.*?> * than Ajax could be used to obtain the required data, such as Web storage
9732 <.*?>
< table.height() ) {
<.*?><.*?> * or an AIR database.
9733 <.*?>
< table.height() ) {
<.*?><.*?> *
9734 <.*?>
< table.height() ) {
<.*?><.*?> * The function is given four parameters and no return is required. The
9735 <.*?>
< table.height() ) {
<.*?><.*?> * parameters are:
9736 <.*?>
< table.height() ) {
<.*?><.*?> *
9737 <.*?>
< table.height() ) {
<.*?><.*?> * 1. _object_ - Data to send to the server
9738 <.*?>
< table.height() ) {
<.*?><.*?> * 2. _function_ - Callback function that must be executed when the required
9739 <.*?>
< table.height() ) {
<.*?><.*?> * data has been obtained. That data should be passed into the callback
9740 <.*?>
< table.height() ) {
<.*?><.*?> * as the only parameter
9741 <.*?>
< table.height() ) {
<.*?><.*?> * 3. _object_ - DataTables settings object for the table
9742 <.*?>
< table.height() ) {
<.*?><.*?> *
9743 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this supersedes `fnServerData` from DataTables 1.9-.
9744 <.*?>
< table.height() ) {
<.*?><.*?> *
9745 <.*?>
< table.height() ) {
<.*?><.*?> * @type string|object|function
9746 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
9747 <.*?>
< table.height() ) {
<.*?><.*?> *
9748 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9749 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.ajax
9750 <.*?>
< table.height() ) {
<.*?><.*?> * @since 1.10.0
9751 <.*?>
< table.height() ) {
<.*?><.*?> *
9752 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9753 <.*?>
< table.height() ) {
<.*?><.*?> * // Get JSON data from a file via Ajax.
9754 <.*?>
< table.height() ) {
<.*?><.*?> * // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default).
9755 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9756 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": "data.json"
9757 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9758 <.*?>
< table.height() ) {
<.*?><.*?> *
9759 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9760 <.*?>
< table.height() ) {
<.*?><.*?> * // Get JSON data from a file via Ajax, using `dataSrc` to change
9761 <.*?>
< table.height() ) {
<.*?><.*?> * // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`)
9762 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9763 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": {
9764 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "data.json",
9765 <.*?>
< table.height() ) {
<.*?><.*?> * "dataSrc": "tableData"
9766 <.*?>
< table.height() ) {
<.*?><.*?> * }
9767 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9768 <.*?>
< table.height() ) {
<.*?><.*?> *
9769 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9770 <.*?>
< table.height() ) {
<.*?><.*?> * // Get JSON data from a file via Ajax, using `dataSrc` to read data
9771 <.*?>
< table.height() ) {
<.*?><.*?> * // from a plain array rather than an array in an object
9772 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9773 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": {
9774 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "data.json",
9775 <.*?>
< table.height() ) {
<.*?><.*?> * "dataSrc": ""
9776 <.*?>
< table.height() ) {
<.*?><.*?> * }
9777 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9778 <.*?>
< table.height() ) {
<.*?><.*?> *
9779 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9780 <.*?>
< table.height() ) {
<.*?><.*?> * // Manipulate the data returned from the server - add a link to data
9781 <.*?>
< table.height() ) {
<.*?><.*?> * // (note this can, should, be done using `render` for the column - this
9782 <.*?>
< table.height() ) {
<.*?><.*?> * // is just a simple example of how the data can be manipulated).
9783 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9784 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": {
9785 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "data.json",
9786 <.*?>
< table.height() ) {
<.*?><.*?> * "dataSrc": function ( json ) {
9787 <.*?>
< table.height() ) {
<.*?><.*?> * for ( var i=0, ien=json.length ; i<ien ; i++ ) {
9788 <.*?>
< table.height() ) {
<.*?><.*?> * json[i][0] = '<a href="/message/'+json[i][0]+'>View message</a>';
9789 <.*?>
< table.height() ) {
<.*?><.*?> * }
9790 <.*?>
< table.height() ) {
<.*?><.*?> * return json;
9791 <.*?>
< table.height() ) {
<.*?><.*?> * }
9792 <.*?>
< table.height() ) {
<.*?><.*?> * }
9793 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9794 <.*?>
< table.height() ) {
<.*?><.*?> *
9795 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9796 <.*?>
< table.height() ) {
<.*?><.*?> * // Add data to the request
9797 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9798 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": {
9799 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "data.json",
9800 <.*?>
< table.height() ) {
<.*?><.*?> * "data": function ( d ) {
9801 <.*?>
< table.height() ) {
<.*?><.*?> * return {
9802 <.*?>
< table.height() ) {
<.*?><.*?> * "extra_search": $('#extra').val()
9803 <.*?>
< table.height() ) {
<.*?><.*?> * };
9804 <.*?>
< table.height() ) {
<.*?><.*?> * }
9805 <.*?>
< table.height() ) {
<.*?><.*?> * }
9806 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9807 <.*?>
< table.height() ) {
<.*?><.*?> *
9808 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9809 <.*?>
< table.height() ) {
<.*?><.*?> * // Send request as POST
9810 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9811 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": {
9812 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "data.json",
9813 <.*?>
< table.height() ) {
<.*?><.*?> * "type": "POST"
9814 <.*?>
< table.height() ) {
<.*?><.*?> * }
9815 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9816 <.*?>
< table.height() ) {
<.*?><.*?> *
9817 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9818 <.*?>
< table.height() ) {
<.*?><.*?> * // Get the data from localStorage (could interface with a form for
9819 <.*?>
< table.height() ) {
<.*?><.*?> * // adding, editing and removing rows).
9820 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9821 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": function (data, callback, settings) {
9822 <.*?>
< table.height() ) {
<.*?><.*?> * callback(
9823 <.*?>
< table.height() ) {
<.*?><.*?> * JSON.parse( localStorage.getItem('dataTablesData') )
9824 <.*?>
< table.height() ) {
<.*?><.*?> * );
9825 <.*?>
< table.height() ) {
<.*?><.*?> * }
9826 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9827 <.*?>
< table.height() ) {
<.*?><.*?> */
9828 <.*?>
< table.height() ) {
<.*?><.*?> "ajax": null,
9829  
9830  
9831 <.*?>
< table.height() ) {
<.*?><.*?> /**
9832 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter allows you to readily specify the entries in the length drop
9833 <.*?>
< table.height() ) {
<.*?><.*?> * down menu that DataTables shows when pagination is enabled. It can be
9834 <.*?>
< table.height() ) {
<.*?><.*?> * either a 1D array of options which will be used for both the displayed
9835 <.*?>
< table.height() ) {
<.*?><.*?> * option and the value, or a 2D array which will use the array in the first
9836 <.*?>
< table.height() ) {
<.*?><.*?> * position as the value, and the array in the second position as the
9837 <.*?>
< table.height() ) {
<.*?><.*?> * displayed options (useful for language strings such as 'All').
9838 <.*?>
< table.height() ) {
<.*?><.*?> *
9839 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the `pageLength` property will be automatically set to the
9840 <.*?>
< table.height() ) {
<.*?><.*?> * first value given in this array, unless `pageLength` is also provided.
9841 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9842 <.*?>
< table.height() ) {
<.*?><.*?> * @default [ 10, 25, 50, 100 ]
9843 <.*?>
< table.height() ) {
<.*?><.*?> *
9844 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9845 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.lengthMenu
9846 <.*?>
< table.height() ) {
<.*?><.*?> *
9847 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9848 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9849 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9850 <.*?>
< table.height() ) {
<.*?><.*?> * "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
9851 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9852 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9853 <.*?>
< table.height() ) {
<.*?><.*?> */
9854 <.*?>
< table.height() ) {
<.*?><.*?> "aLengthMenu": [ 10, 25, 50, 100 ],
9855  
9856  
9857 <.*?>
< table.height() ) {
<.*?><.*?> /**
9858 <.*?>
< table.height() ) {
<.*?><.*?> * The `columns` option in the initialisation parameter allows you to define
9859 <.*?>
< table.height() ) {
<.*?><.*?> * details about the way individual columns behave. For a full list of
9860 <.*?>
< table.height() ) {
<.*?><.*?> * column options that can be set, please see
9861 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.defaults.column}. Note that if you use `columns` to
9862 <.*?>
< table.height() ) {
<.*?><.*?> * define your columns, you must have an entry in the array for every single
9863 <.*?>
< table.height() ) {
<.*?><.*?> * column that you have in your table (these can be null if you don't which
9864 <.*?>
< table.height() ) {
<.*?><.*?> * to specify any options).
9865 <.*?>
< table.height() ) {
<.*?><.*?> * @member
9866 <.*?>
< table.height() ) {
<.*?><.*?> *
9867 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column
9868 <.*?>
< table.height() ) {
<.*?><.*?> */
9869 <.*?>
< table.height() ) {
<.*?><.*?> "aoColumns": null,
9870  
9871 <.*?>
< table.height() ) {
<.*?><.*?> /**
9872 <.*?>
< table.height() ) {
<.*?><.*?> * Very similar to `columns`, `columnDefs` allows you to target a specific
9873 <.*?>
< table.height() ) {
<.*?><.*?> * column, multiple columns, or all columns, using the `targets` property of
9874 <.*?>
< table.height() ) {
<.*?><.*?> * each object in the array. This allows great flexibility when creating
9875 <.*?>
< table.height() ) {
<.*?><.*?> * tables, as the `columnDefs` arrays can be of any length, targeting the
9876 <.*?>
< table.height() ) {
<.*?><.*?> * columns you specifically want. `columnDefs` may use any of the column
9877 <.*?>
< table.height() ) {
<.*?><.*?> * options available: {@link DataTable.defaults.column}, but it _must_
9878 <.*?>
< table.height() ) {
<.*?><.*?> * have `targets` defined in each object in the array. Values in the `targets`
9879 <.*?>
< table.height() ) {
<.*?><.*?> * array may be:
9880 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
9881 <.*?>
< table.height() ) {
<.*?><.*?> * <li>a string - class name will be matched on the TH for the column</li>
9882 <.*?>
< table.height() ) {
<.*?><.*?> * <li>0 or a positive integer - column index counting from the left</li>
9883 <.*?>
< table.height() ) {
<.*?><.*?> * <li>a negative integer - column index counting from the right</li>
9884 <.*?>
< table.height() ) {
<.*?><.*?> * <li>the string "_all" - all columns (i.e. assign a default)</li>
9885 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
9886 <.*?>
< table.height() ) {
<.*?><.*?> * @member
9887 <.*?>
< table.height() ) {
<.*?><.*?> *
9888 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.columnDefs
9889 <.*?>
< table.height() ) {
<.*?><.*?> */
9890 <.*?>
< table.height() ) {
<.*?><.*?> "aoColumnDefs": null,
9891  
9892  
9893 <.*?>
< table.height() ) {
<.*?><.*?> /**
9894 <.*?>
< table.height() ) {
<.*?><.*?> * Basically the same as `search`, this parameter defines the individual column
9895 <.*?>
< table.height() ) {
<.*?><.*?> * filtering state at initialisation time. The array must be of the same size
9896 <.*?>
< table.height() ) {
<.*?><.*?> * as the number of columns, and each element be an object with the parameters
9897 <.*?>
< table.height() ) {
<.*?><.*?> * `search` and `escapeRegex` (the latter is optional). 'null' is also
9898 <.*?>
< table.height() ) {
<.*?><.*?> * accepted and the default will be used.
9899 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9900 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
9901 <.*?>
< table.height() ) {
<.*?><.*?> *
9902 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9903 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.searchCols
9904 <.*?>
< table.height() ) {
<.*?><.*?> *
9905 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9906 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9907 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9908 <.*?>
< table.height() ) {
<.*?><.*?> * "searchCols": [
9909 <.*?>
< table.height() ) {
<.*?><.*?> * null,
9910 <.*?>
< table.height() ) {
<.*?><.*?> * { "search": "My filter" },
9911 <.*?>
< table.height() ) {
<.*?><.*?> * null,
9912 <.*?>
< table.height() ) {
<.*?><.*?> * { "search": "^[0-9]", "escapeRegex": false }
9913 <.*?>
< table.height() ) {
<.*?><.*?> * ]
9914 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9915 <.*?>
< table.height() ) {
<.*?><.*?> * } )
9916 <.*?>
< table.height() ) {
<.*?><.*?> */
9917 <.*?>
< table.height() ) {
<.*?><.*?> "aoSearchCols": [],
9918  
9919  
9920 <.*?>
< table.height() ) {
<.*?><.*?> /**
9921 <.*?>
< table.height() ) {
<.*?><.*?> * An array of CSS classes that should be applied to displayed rows. This
9922 <.*?>
< table.height() ) {
<.*?><.*?> * array may be of any length, and DataTables will apply each class
9923 <.*?>
< table.height() ) {
<.*?><.*?> * sequentially, looping when required.
9924 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
9925 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Will take the values determined by the `oClasses.stripe*`
9926 <.*?>
< table.height() ) {
<.*?><.*?> * options</i>
9927 <.*?>
< table.height() ) {
<.*?><.*?> *
9928 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Option
9929 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stripeClasses
9930 <.*?>
< table.height() ) {
<.*?><.*?> *
9931 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9932 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9933 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9934 <.*?>
< table.height() ) {
<.*?><.*?> * "stripeClasses": [ 'strip1', 'strip2', 'strip3' ]
9935 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9936 <.*?>
< table.height() ) {
<.*?><.*?> * } )
9937 <.*?>
< table.height() ) {
<.*?><.*?> */
9938 <.*?>
< table.height() ) {
<.*?><.*?> "asStripeClasses": null,
9939  
9940  
9941 <.*?>
< table.height() ) {
<.*?><.*?> /**
9942 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable automatic column width calculation. This can be disabled
9943 <.*?>
< table.height() ) {
<.*?><.*?> * as an optimisation (it takes some time to calculate the widths) if the
9944 <.*?>
< table.height() ) {
<.*?><.*?> * tables widths are passed in using `columns`.
9945 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9946 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
9947 <.*?>
< table.height() ) {
<.*?><.*?> *
9948 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
9949 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.autoWidth
9950 <.*?>
< table.height() ) {
<.*?><.*?> *
9951 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9952 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
9953 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9954 <.*?>
< table.height() ) {
<.*?><.*?> * "autoWidth": false
9955 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9956 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9957 <.*?>
< table.height() ) {
<.*?><.*?> */
9958 <.*?>
< table.height() ) {
<.*?><.*?> "bAutoWidth": true,
9959  
9960  
9961 <.*?>
< table.height() ) {
<.*?><.*?> /**
9962 <.*?>
< table.height() ) {
<.*?><.*?> * Deferred rendering can provide DataTables with a huge speed boost when you
9963 <.*?>
< table.height() ) {
<.*?><.*?> * are using an Ajax or JS data source for the table. This option, when set to
9964 <.*?>
< table.height() ) {
<.*?><.*?> * true, will cause DataTables to defer the creation of the table elements for
9965 <.*?>
< table.height() ) {
<.*?><.*?> * each row until they are needed for a draw - saving a significant amount of
9966 <.*?>
< table.height() ) {
<.*?><.*?> * time.
9967 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9968 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
9969 <.*?>
< table.height() ) {
<.*?><.*?> *
9970 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
9971 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.deferRender
9972 <.*?>
< table.height() ) {
<.*?><.*?> *
9973 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9974 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9975 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9976 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": "sources/arrays.txt",
9977 <.*?>
< table.height() ) {
<.*?><.*?> * "deferRender": true
9978 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9979 <.*?>
< table.height() ) {
<.*?><.*?> * } );
9980 <.*?>
< table.height() ) {
<.*?><.*?> */
9981 <.*?>
< table.height() ) {
<.*?><.*?> "bDeferRender": false,
9982  
9983  
9984 <.*?>
< table.height() ) {
<.*?><.*?> /**
9985 <.*?>
< table.height() ) {
<.*?><.*?> * Replace a DataTable which matches the given selector and replace it with
9986 <.*?>
< table.height() ) {
<.*?><.*?> * one which has the properties of the new initialisation object passed. If no
9987 <.*?>
< table.height() ) {
<.*?><.*?> * table matches the selector, then the new DataTable will be constructed as
9988 <.*?>
< table.height() ) {
<.*?><.*?> * per normal.
9989 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
9990 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
9991 <.*?>
< table.height() ) {
<.*?><.*?> *
9992 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
9993 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.destroy
9994 <.*?>
< table.height() ) {
<.*?><.*?> *
9995 <.*?>
< table.height() ) {
<.*?><.*?> * @example
9996 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
9997 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
9998 <.*?>
< table.height() ) {
<.*?><.*?> * "srollY": "200px",
9999 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": false
10000 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10001 <.*?>
< table.height() ) {
<.*?><.*?> *
10002 <.*?>
< table.height() ) {
<.*?><.*?> * // Some time later....
10003 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10004 <.*?>
< table.height() ) {
<.*?><.*?> * "filter": false,
10005 <.*?>
< table.height() ) {
<.*?><.*?> * "destroy": true
10006 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10007 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10008 <.*?>
< table.height() ) {
<.*?><.*?> */
10009 <.*?>
< table.height() ) {
<.*?><.*?> "bDestroy": false,
10010  
10011  
10012 <.*?>
< table.height() ) {
<.*?><.*?> /**
10013 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable filtering of data. Filtering in DataTables is "smart" in
10014 <.*?>
< table.height() ) {
<.*?><.*?> * that it allows the end user to input multiple words (space separated) and
10015 <.*?>
< table.height() ) {
<.*?><.*?> * will match a row containing those words, even if not in the order that was
10016 <.*?>
< table.height() ) {
<.*?><.*?> * specified (this allow matching across multiple columns). Note that if you
10017 <.*?>
< table.height() ) {
<.*?><.*?> * wish to use filtering in DataTables this must remain 'true' - to remove the
10018 <.*?>
< table.height() ) {
<.*?><.*?> * default filtering input box and retain filtering abilities, please use
10019 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.defaults.dom}.
10020 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10021 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10022 <.*?>
< table.height() ) {
<.*?><.*?> *
10023 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10024 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.searching
10025 <.*?>
< table.height() ) {
<.*?><.*?> *
10026 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10027 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10028 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10029 <.*?>
< table.height() ) {
<.*?><.*?> * "searching": false
10030 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10031 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10032 <.*?>
< table.height() ) {
<.*?><.*?> */
10033 <.*?>
< table.height() ) {
<.*?><.*?> "bFilter": true,
10034  
10035  
10036 <.*?>
< table.height() ) {
<.*?><.*?> /**
10037 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable the table information display. This shows information
10038 <.*?>
< table.height() ) {
<.*?><.*?> * about the data that is currently visible on the page, including information
10039 <.*?>
< table.height() ) {
<.*?><.*?> * about filtered data if that action is being performed.
10040 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10041 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10042 <.*?>
< table.height() ) {
<.*?><.*?> *
10043 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10044 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.info
10045 <.*?>
< table.height() ) {
<.*?><.*?> *
10046 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10047 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10048 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10049 <.*?>
< table.height() ) {
<.*?><.*?> * "info": false
10050 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10051 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10052 <.*?>
< table.height() ) {
<.*?><.*?> */
10053 <.*?>
< table.height() ) {
<.*?><.*?> "bInfo": true,
10054  
10055  
10056 <.*?>
< table.height() ) {
<.*?><.*?> /**
10057 <.*?>
< table.height() ) {
<.*?><.*?> * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
10058 <.*?>
< table.height() ) {
<.*?><.*?> * slightly different and additional mark-up from what DataTables has
10059 <.*?>
< table.height() ) {
<.*?><.*?> * traditionally used).
10060 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10061 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10062 <.*?>
< table.height() ) {
<.*?><.*?> *
10063 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10064 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.jQueryUI
10065 <.*?>
< table.height() ) {
<.*?><.*?> *
10066 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10067 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10068 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10069 <.*?>
< table.height() ) {
<.*?><.*?> * "jQueryUI": true
10070 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10071 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10072 <.*?>
< table.height() ) {
<.*?><.*?> */
10073 <.*?>
< table.height() ) {
<.*?><.*?> "bJQueryUI": false,
10074  
10075  
10076 <.*?>
< table.height() ) {
<.*?><.*?> /**
10077 <.*?>
< table.height() ) {
<.*?><.*?> * Allows the end user to select the size of a formatted page from a select
10078 <.*?>
< table.height() ) {
<.*?><.*?> * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).
10079 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10080 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10081 <.*?>
< table.height() ) {
<.*?><.*?> *
10082 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10083 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.lengthChange
10084 <.*?>
< table.height() ) {
<.*?><.*?> *
10085 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10086 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10087 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10088 <.*?>
< table.height() ) {
<.*?><.*?> * "lengthChange": false
10089 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10090 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10091 <.*?>
< table.height() ) {
<.*?><.*?> */
10092 <.*?>
< table.height() ) {
<.*?><.*?> "bLengthChange": true,
10093  
10094  
10095 <.*?>
< table.height() ) {
<.*?><.*?> /**
10096 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable pagination.
10097 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10098 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10099 <.*?>
< table.height() ) {
<.*?><.*?> *
10100 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10101 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.paging
10102 <.*?>
< table.height() ) {
<.*?><.*?> *
10103 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10104 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10105 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10106 <.*?>
< table.height() ) {
<.*?><.*?> * "paging": false
10107 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10108 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10109 <.*?>
< table.height() ) {
<.*?><.*?> */
10110 <.*?>
< table.height() ) {
<.*?><.*?> "bPaginate": true,
10111  
10112  
10113 <.*?>
< table.height() ) {
<.*?><.*?> /**
10114 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable the display of a 'processing' indicator when the table is
10115 <.*?>
< table.height() ) {
<.*?><.*?> * being processed (e.g. a sort). This is particularly useful for tables with
10116 <.*?>
< table.height() ) {
<.*?><.*?> * large amounts of data where it can take a noticeable amount of time to sort
10117 <.*?>
< table.height() ) {
<.*?><.*?> * the entries.
10118 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10119 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10120 <.*?>
< table.height() ) {
<.*?><.*?> *
10121 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10122 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.processing
10123 <.*?>
< table.height() ) {
<.*?><.*?> *
10124 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10125 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10126 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10127 <.*?>
< table.height() ) {
<.*?><.*?> * "processing": true
10128 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10129 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10130 <.*?>
< table.height() ) {
<.*?><.*?> */
10131 <.*?>
< table.height() ) {
<.*?><.*?> "bProcessing": false,
10132  
10133  
10134 <.*?>
< table.height() ) {
<.*?><.*?> /**
10135 <.*?>
< table.height() ) {
<.*?><.*?> * Retrieve the DataTables object for the given selector. Note that if the
10136 <.*?>
< table.height() ) {
<.*?><.*?> * table has already been initialised, this parameter will cause DataTables
10137 <.*?>
< table.height() ) {
<.*?><.*?> * to simply return the object that has already been set up - it will not take
10138 <.*?>
< table.height() ) {
<.*?><.*?> * account of any changes you might have made to the initialisation object
10139 <.*?>
< table.height() ) {
<.*?><.*?> * passed to DataTables (setting this parameter to true is an acknowledgement
10140 <.*?>
< table.height() ) {
<.*?><.*?> * that you understand this). `destroy` can be used to reinitialise a table if
10141 <.*?>
< table.height() ) {
<.*?><.*?> * you need.
10142 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10143 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10144 <.*?>
< table.height() ) {
<.*?><.*?> *
10145 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10146 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.retrieve
10147 <.*?>
< table.height() ) {
<.*?><.*?> *
10148 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10149 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10150 <.*?>
< table.height() ) {
<.*?><.*?> * initTable();
10151 <.*?>
< table.height() ) {
<.*?><.*?> * tableActions();
10152 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10153 <.*?>
< table.height() ) {
<.*?><.*?> *
10154 <.*?>
< table.height() ) {
<.*?><.*?> * function initTable ()
10155 <.*?>
< table.height() ) {
<.*?><.*?> * {
10156 <.*?>
< table.height() ) {
<.*?><.*?> * return $('#example').dataTable( {
10157 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollY": "200px",
10158 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": false,
10159 <.*?>
< table.height() ) {
<.*?><.*?> * "retrieve": true
10160 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10161 <.*?>
< table.height() ) {
<.*?><.*?> * }
10162 <.*?>
< table.height() ) {
<.*?><.*?> *
10163 <.*?>
< table.height() ) {
<.*?><.*?> * function tableActions ()
10164 <.*?>
< table.height() ) {
<.*?><.*?> * {
10165 <.*?>
< table.height() ) {
<.*?><.*?> * var table = initTable();
10166 <.*?>
< table.height() ) {
<.*?><.*?> * // perform API operations with oTable
10167 <.*?>
< table.height() ) {
<.*?><.*?> * }
10168 <.*?>
< table.height() ) {
<.*?><.*?> */
10169 <.*?>
< table.height() ) {
<.*?><.*?> "bRetrieve": false,
10170  
10171  
10172 <.*?>
< table.height() ) {
<.*?><.*?> /**
10173 <.*?>
< table.height() ) {
<.*?><.*?> * When vertical (y) scrolling is enabled, DataTables will force the height of
10174 <.*?>
< table.height() ) {
<.*?><.*?> * the table's viewport to the given height at all times (useful for layout).
10175 <.*?>
< table.height() ) {
<.*?><.*?> * However, this can look odd when filtering data down to a small data set,
10176 <.*?>
< table.height() ) {
<.*?><.*?> * and the footer is left "floating" further down. This parameter (when
10177 <.*?>
< table.height() ) {
<.*?><.*?> * enabled) will cause DataTables to collapse the table's viewport down when
10178 <.*?>
< table.height() ) {
<.*?><.*?> * the result set will fit within the given Y height.
10179 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10180 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10181 <.*?>
< table.height() ) {
<.*?><.*?> *
10182 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10183 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.scrollCollapse
10184 <.*?>
< table.height() ) {
<.*?><.*?> *
10185 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10186 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10187 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10188 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollY": "200",
10189 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollCollapse": true
10190 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10191 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10192 <.*?>
< table.height() ) {
<.*?><.*?> */
10193 <.*?>
< table.height() ) {
<.*?><.*?> "bScrollCollapse": false,
10194  
10195  
10196 <.*?>
< table.height() ) {
<.*?><.*?> /**
10197 <.*?>
< table.height() ) {
<.*?><.*?> * Configure DataTables to use server-side processing. Note that the
10198 <.*?>
< table.height() ) {
<.*?><.*?> * `ajax` parameter must also be given in order to give DataTables a
10199 <.*?>
< table.height() ) {
<.*?><.*?> * source to obtain the required data for each draw.
10200 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10201 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10202 <.*?>
< table.height() ) {
<.*?><.*?> *
10203 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10204 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
10205 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.serverSide
10206 <.*?>
< table.height() ) {
<.*?><.*?> *
10207 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10208 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10209 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10210 <.*?>
< table.height() ) {
<.*?><.*?> * "serverSide": true,
10211 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": "xhr.php"
10212 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10213 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10214 <.*?>
< table.height() ) {
<.*?><.*?> */
10215 <.*?>
< table.height() ) {
<.*?><.*?> "bServerSide": false,
10216  
10217  
10218 <.*?>
< table.height() ) {
<.*?><.*?> /**
10219 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable sorting of columns. Sorting of individual columns can be
10220 <.*?>
< table.height() ) {
<.*?><.*?> * disabled by the `sortable` option for each column.
10221 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10222 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10223 <.*?>
< table.height() ) {
<.*?><.*?> *
10224 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10225 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.ordering
10226 <.*?>
< table.height() ) {
<.*?><.*?> *
10227 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10228 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10229 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10230 <.*?>
< table.height() ) {
<.*?><.*?> * "ordering": false
10231 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10232 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10233 <.*?>
< table.height() ) {
<.*?><.*?> */
10234 <.*?>
< table.height() ) {
<.*?><.*?> "bSort": true,
10235  
10236  
10237 <.*?>
< table.height() ) {
<.*?><.*?> /**
10238 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or display DataTables' ability to sort multiple columns at the
10239 <.*?>
< table.height() ) {
<.*?><.*?> * same time (activated by shift-click by the user).
10240 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10241 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10242 <.*?>
< table.height() ) {
<.*?><.*?> *
10243 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10244 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.orderMulti
10245 <.*?>
< table.height() ) {
<.*?><.*?> *
10246 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10247 <.*?>
< table.height() ) {
<.*?><.*?> * // Disable multiple column sorting ability
10248 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10249 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10250 <.*?>
< table.height() ) {
<.*?><.*?> * "orderMulti": false
10251 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10252 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10253 <.*?>
< table.height() ) {
<.*?><.*?> */
10254 <.*?>
< table.height() ) {
<.*?><.*?> "bSortMulti": true,
10255  
10256  
10257 <.*?>
< table.height() ) {
<.*?><.*?> /**
10258 <.*?>
< table.height() ) {
<.*?><.*?> * Allows control over whether DataTables should use the top (true) unique
10259 <.*?>
< table.height() ) {
<.*?><.*?> * cell that is found for a single column, or the bottom (false - default).
10260 <.*?>
< table.height() ) {
<.*?><.*?> * This is useful when using complex headers.
10261 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10262 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10263 <.*?>
< table.height() ) {
<.*?><.*?> *
10264 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10265 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.orderCellsTop
10266 <.*?>
< table.height() ) {
<.*?><.*?> *
10267 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10268 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10269 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10270 <.*?>
< table.height() ) {
<.*?><.*?> * "orderCellsTop": true
10271 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10272 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10273 <.*?>
< table.height() ) {
<.*?><.*?> */
10274 <.*?>
< table.height() ) {
<.*?><.*?> "bSortCellsTop": false,
10275  
10276  
10277 <.*?>
< table.height() ) {
<.*?><.*?> /**
10278 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable the addition of the classes `sorting\_1`, `sorting\_2` and
10279 <.*?>
< table.height() ) {
<.*?><.*?> * `sorting\_3` to the columns which are currently being sorted on. This is
10280 <.*?>
< table.height() ) {
<.*?><.*?> * presented as a feature switch as it can increase processing time (while
10281 <.*?>
< table.height() ) {
<.*?><.*?> * classes are removed and added) so for large data sets you might want to
10282 <.*?>
< table.height() ) {
<.*?><.*?> * turn this off.
10283 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10284 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
10285 <.*?>
< table.height() ) {
<.*?><.*?> *
10286 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10287 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.orderClasses
10288 <.*?>
< table.height() ) {
<.*?><.*?> *
10289 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10290 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10291 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10292 <.*?>
< table.height() ) {
<.*?><.*?> * "orderClasses": false
10293 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10294 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10295 <.*?>
< table.height() ) {
<.*?><.*?> */
10296 <.*?>
< table.height() ) {
<.*?><.*?> "bSortClasses": true,
10297  
10298  
10299 <.*?>
< table.height() ) {
<.*?><.*?> /**
10300 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable state saving. When enabled HTML5 `localStorage` will be
10301 <.*?>
< table.height() ) {
<.*?><.*?> * used to save table display information such as pagination information,
10302 <.*?>
< table.height() ) {
<.*?><.*?> * display length, filtering and sorting. As such when the end user reloads
10303 <.*?>
< table.height() ) {
<.*?><.*?> * the page the display display will match what thy had previously set up.
10304 <.*?>
< table.height() ) {
<.*?><.*?> *
10305 <.*?>
< table.height() ) {
<.*?><.*?> * Due to the use of `localStorage` the default state saving is not supported
10306 <.*?>
< table.height() ) {
<.*?><.*?> * in IE6 or 7. If state saving is required in those browsers, use
10307 <.*?>
< table.height() ) {
<.*?><.*?> * `stateSaveCallback` to provide a storage solution such as cookies.
10308 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
10309 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
10310 <.*?>
< table.height() ) {
<.*?><.*?> *
10311 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
10312 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateSave
10313 <.*?>
< table.height() ) {
<.*?><.*?> *
10314 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10315 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function () {
10316 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10317 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true
10318 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10319 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10320 <.*?>
< table.height() ) {
<.*?><.*?> */
10321 <.*?>
< table.height() ) {
<.*?><.*?> "bStateSave": false,
10322  
10323  
10324 <.*?>
< table.height() ) {
<.*?><.*?> /**
10325 <.*?>
< table.height() ) {
<.*?><.*?> * This function is called when a TR element is created (and all TD child
10326 <.*?>
< table.height() ) {
<.*?><.*?> * elements have been inserted), or registered if using a DOM source, allowing
10327 <.*?>
< table.height() ) {
<.*?><.*?> * manipulation of the TR element (adding classes etc).
10328 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10329 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} row "TR" element for the current row
10330 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data Raw data array for this row
10331 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} dataIndex The index of this row in the internal aoData array
10332 <.*?>
< table.height() ) {
<.*?><.*?> *
10333 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10334 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.createdRow
10335 <.*?>
< table.height() ) {
<.*?><.*?> *
10336 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10337 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10338 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10339 <.*?>
< table.height() ) {
<.*?><.*?> * "createdRow": function( row, data, dataIndex ) {
10340 <.*?>
< table.height() ) {
<.*?><.*?> * // Bold the grade for all 'A' grade browsers
10341 <.*?>
< table.height() ) {
<.*?><.*?> * if ( data[4] == "A" )
10342 <.*?>
< table.height() ) {
<.*?><.*?> * {
10343 <.*?>
< table.height() ) {
<.*?><.*?> * $('td:eq(4)', row).html( '<b>A</b>' );
10344 <.*?>
< table.height() ) {
<.*?><.*?> * }
10345 <.*?>
< table.height() ) {
<.*?><.*?> * }
10346 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10347 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10348 <.*?>
< table.height() ) {
<.*?><.*?> */
10349 <.*?>
< table.height() ) {
<.*?><.*?> "fnCreatedRow": null,
10350  
10351  
10352 <.*?>
< table.height() ) {
<.*?><.*?> /**
10353 <.*?>
< table.height() ) {
<.*?><.*?> * This function is called on every 'draw' event, and allows you to
10354 <.*?>
< table.height() ) {
<.*?><.*?> * dynamically modify any aspect you want about the created DOM.
10355 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10356 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10357 <.*?>
< table.height() ) {
<.*?><.*?> *
10358 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10359 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.drawCallback
10360 <.*?>
< table.height() ) {
<.*?><.*?> *
10361 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10362 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10363 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10364 <.*?>
< table.height() ) {
<.*?><.*?> * "drawCallback": function( settings ) {
10365 <.*?>
< table.height() ) {
<.*?><.*?> * alert( 'DataTables has redrawn the table' );
10366 <.*?>
< table.height() ) {
<.*?><.*?> * }
10367 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10368 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10369 <.*?>
< table.height() ) {
<.*?><.*?> */
10370 <.*?>
< table.height() ) {
<.*?><.*?> "fnDrawCallback": null,
10371  
10372  
10373 <.*?>
< table.height() ) {
<.*?><.*?> /**
10374 <.*?>
< table.height() ) {
<.*?><.*?> * Identical to fnHeaderCallback() but for the table footer this function
10375 <.*?>
< table.height() ) {
<.*?><.*?> * allows you to modify the table footer on every 'draw' event.
10376 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10377 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} foot "TR" element for the footer
10378 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data Full table data (as derived from the original HTML)
10379 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} start Index for the current display starting point in the
10380 <.*?>
< table.height() ) {
<.*?><.*?> * display array
10381 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} end Index for the current display ending point in the
10382 <.*?>
< table.height() ) {
<.*?><.*?> * display array
10383 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array int} display Index array to translate the visual position
10384 <.*?>
< table.height() ) {
<.*?><.*?> * to the full data array
10385 <.*?>
< table.height() ) {
<.*?><.*?> *
10386 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10387 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.footerCallback
10388 <.*?>
< table.height() ) {
<.*?><.*?> *
10389 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10390 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10391 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10392 <.*?>
< table.height() ) {
<.*?><.*?> * "footerCallback": function( tfoot, data, start, end, display ) {
10393 <.*?>
< table.height() ) {
<.*?><.*?> * tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start;
10394 <.*?>
< table.height() ) {
<.*?><.*?> * }
10395 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10396 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10397 <.*?>
< table.height() ) {
<.*?><.*?> */
10398 <.*?>
< table.height() ) {
<.*?><.*?> "fnFooterCallback": null,
10399  
10400  
10401 <.*?>
< table.height() ) {
<.*?><.*?> /**
10402 <.*?>
< table.height() ) {
<.*?><.*?> * When rendering large numbers in the information element for the table
10403 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
10404 <.*?>
< table.height() ) {
<.*?><.*?> * to have a comma separator for the 'thousands' units (e.g. 1 million is
10405 <.*?>
< table.height() ) {
<.*?><.*?> * rendered as "1,000,000") to help readability for the end user. This
10406 <.*?>
< table.height() ) {
<.*?><.*?> * function will override the default method DataTables uses.
10407 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10408 <.*?>
< table.height() ) {
<.*?><.*?> * @member
10409 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} toFormat number to be formatted
10410 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {string} formatted string for DataTables to show the number
10411 <.*?>
< table.height() ) {
<.*?><.*?> *
10412 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10413 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.formatNumber
10414 <.*?>
< table.height() ) {
<.*?><.*?> *
10415 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10416 <.*?>
< table.height() ) {
<.*?><.*?> * // Format a number using a single quote for the separator (note that
10417 <.*?>
< table.height() ) {
<.*?><.*?> * // this can also be done with the language.thousands option)
10418 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10419 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10420 <.*?>
< table.height() ) {
<.*?><.*?> * "formatNumber": function ( toFormat ) {
10421 <.*?>
< table.height() ) {
<.*?><.*?> * return toFormat.toString().replace(
10422 <.*?>
< table.height() ) {
<.*?><.*?> * /\B(?=(\d{3})+(?!\d))/g, "'"
10423 <.*?>
< table.height() ) {
<.*?><.*?> * );
10424 <.*?>
< table.height() ) {
<.*?><.*?> * };
10425 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10426 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10427 <.*?>
< table.height() ) {
<.*?><.*?> */
10428 <.*?>
< table.height() ) {
<.*?><.*?> "fnFormatNumber": function ( toFormat ) {
10429 <.*?>
< table.height() ) {
<.*?><.*?> return toFormat.toString().replace(
10430 <.*?>
< table.height() ) {
<.*?><.*?> /\B(?=(\d{3})+(?!\d))/g,
10431 <.*?>
< table.height() ) {
<.*?><.*?> this.oLanguage.sThousands
10432 <.*?>
< table.height() ) {
<.*?><.*?> );
10433 <.*?>
< table.height() ) {
<.*?><.*?> },
10434  
10435  
10436 <.*?>
< table.height() ) {
<.*?><.*?> /**
10437 <.*?>
< table.height() ) {
<.*?><.*?> * This function is called on every 'draw' event, and allows you to
10438 <.*?>
< table.height() ) {
<.*?><.*?> * dynamically modify the header row. This can be used to calculate and
10439 <.*?>
< table.height() ) {
<.*?><.*?> * display useful information about the table.
10440 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10441 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} head "TR" element for the header
10442 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data Full table data (as derived from the original HTML)
10443 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} start Index for the current display starting point in the
10444 <.*?>
< table.height() ) {
<.*?><.*?> * display array
10445 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} end Index for the current display ending point in the
10446 <.*?>
< table.height() ) {
<.*?><.*?> * display array
10447 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array int} display Index array to translate the visual position
10448 <.*?>
< table.height() ) {
<.*?><.*?> * to the full data array
10449 <.*?>
< table.height() ) {
<.*?><.*?> *
10450 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10451 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.headerCallback
10452 <.*?>
< table.height() ) {
<.*?><.*?> *
10453 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10454 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10455 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10456 <.*?>
< table.height() ) {
<.*?><.*?> * "fheaderCallback": function( head, data, start, end, display ) {
10457 <.*?>
< table.height() ) {
<.*?><.*?> * head.getElementsByTagName('th')[0].innerHTML = "Displaying "+(end-start)+" records";
10458 <.*?>
< table.height() ) {
<.*?><.*?> * }
10459 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10460 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10461 <.*?>
< table.height() ) {
<.*?><.*?> */
10462 <.*?>
< table.height() ) {
<.*?><.*?> "fnHeaderCallback": null,
10463  
10464  
10465 <.*?>
< table.height() ) {
<.*?><.*?> /**
10466 <.*?>
< table.height() ) {
<.*?><.*?> * The information element can be used to convey information about the current
10467 <.*?>
< table.height() ) {
<.*?><.*?> * state of the table. Although the internationalisation options presented by
10468 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables are quite capable of dealing with most customisations, there may
10469 <.*?>
< table.height() ) {
<.*?><.*?> * be times where you wish to customise the string further. This callback
10470 <.*?>
< table.height() ) {
<.*?><.*?> * allows you to do exactly that.
10471 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10472 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} oSettings DataTables settings object
10473 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} start Starting position in data for the draw
10474 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} end End position in data for the draw
10475 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} max Total number of rows in the table (regardless of
10476 <.*?>
< table.height() ) {
<.*?><.*?> * filtering)
10477 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} total Total number of rows in the data set, after filtering
10478 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} pre The string that DataTables has formatted using it's
10479 <.*?>
< table.height() ) {
<.*?><.*?> * own rules
10480 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {string} The string to be displayed in the information element.
10481 <.*?>
< table.height() ) {
<.*?><.*?> *
10482 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10483 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.infoCallback
10484 <.*?>
< table.height() ) {
<.*?><.*?> *
10485 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10486 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10487 <.*?>
< table.height() ) {
<.*?><.*?> * "infoCallback": function( settings, start, end, max, total, pre ) {
10488 <.*?>
< table.height() ) {
<.*?><.*?> * return start +" to "+ end;
10489 <.*?>
< table.height() ) {
<.*?><.*?> * }
10490 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10491 <.*?>
< table.height() ) {
<.*?><.*?> */
10492 <.*?>
< table.height() ) {
<.*?><.*?> "fnInfoCallback": null,
10493  
10494  
10495 <.*?>
< table.height() ) {
<.*?><.*?> /**
10496 <.*?>
< table.height() ) {
<.*?><.*?> * Called when the table has been initialised. Normally DataTables will
10497 <.*?>
< table.height() ) {
<.*?><.*?> * initialise sequentially and there will be no need for this function,
10498 <.*?>
< table.height() ) {
<.*?><.*?> * however, this does not hold true when using external language information
10499 <.*?>
< table.height() ) {
<.*?><.*?> * since that is obtained using an async XHR call.
10500 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10501 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10502 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} json The JSON object request from the server - only
10503 <.*?>
< table.height() ) {
<.*?><.*?> * present if client-side Ajax sourced data is used
10504 <.*?>
< table.height() ) {
<.*?><.*?> *
10505 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10506 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.initComplete
10507 <.*?>
< table.height() ) {
<.*?><.*?> *
10508 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10509 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10510 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10511 <.*?>
< table.height() ) {
<.*?><.*?> * "initComplete": function(settings, json) {
10512 <.*?>
< table.height() ) {
<.*?><.*?> * alert( 'DataTables has finished its initialisation.' );
10513 <.*?>
< table.height() ) {
<.*?><.*?> * }
10514 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10515 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10516 <.*?>
< table.height() ) {
<.*?><.*?> */
10517 <.*?>
< table.height() ) {
<.*?><.*?> "fnInitComplete": null,
10518  
10519  
10520 <.*?>
< table.height() ) {
<.*?><.*?> /**
10521 <.*?>
< table.height() ) {
<.*?><.*?> * Called at the very start of each table draw and can be used to cancel the
10522 <.*?>
< table.height() ) {
<.*?><.*?> * draw by returning false, any other return (including undefined) results in
10523 <.*?>
< table.height() ) {
<.*?><.*?> * the full draw occurring).
10524 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10525 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10526 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {boolean} False will cancel the draw, anything else (including no
10527 <.*?>
< table.height() ) {
<.*?><.*?> * return) will allow it to complete.
10528 <.*?>
< table.height() ) {
<.*?><.*?> *
10529 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10530 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.preDrawCallback
10531 <.*?>
< table.height() ) {
<.*?><.*?> *
10532 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10533 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10534 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10535 <.*?>
< table.height() ) {
<.*?><.*?> * "preDrawCallback": function( settings ) {
10536 <.*?>
< table.height() ) {
<.*?><.*?> * if ( $('#test').val() == 1 ) {
10537 <.*?>
< table.height() ) {
<.*?><.*?> * return false;
10538 <.*?>
< table.height() ) {
<.*?><.*?> * }
10539 <.*?>
< table.height() ) {
<.*?><.*?> * }
10540 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10541 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10542 <.*?>
< table.height() ) {
<.*?><.*?> */
10543 <.*?>
< table.height() ) {
<.*?><.*?> "fnPreDrawCallback": null,
10544  
10545  
10546 <.*?>
< table.height() ) {
<.*?><.*?> /**
10547 <.*?>
< table.height() ) {
<.*?><.*?> * This function allows you to 'post process' each row after it have been
10548 <.*?>
< table.height() ) {
<.*?><.*?> * generated for each table draw, but before it is rendered on screen. This
10549 <.*?>
< table.height() ) {
<.*?><.*?> * function might be used for setting the row class name etc.
10550 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10551 <.*?>
< table.height() ) {
<.*?><.*?> * @param {node} row "TR" element for the current row
10552 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data Raw data array for this row
10553 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} displayIndex The display index for the current table draw
10554 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} displayIndexFull The index of the data in the full list of
10555 <.*?>
< table.height() ) {
<.*?><.*?> * rows (after filtering)
10556 <.*?>
< table.height() ) {
<.*?><.*?> *
10557 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10558 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.rowCallback
10559 <.*?>
< table.height() ) {
<.*?><.*?> *
10560 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10561 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10562 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10563 <.*?>
< table.height() ) {
<.*?><.*?> * "rowCallback": function( row, data, displayIndex, displayIndexFull ) {
10564 <.*?>
< table.height() ) {
<.*?><.*?> * // Bold the grade for all 'A' grade browsers
10565 <.*?>
< table.height() ) {
<.*?><.*?> * if ( data[4] == "A" ) {
10566 <.*?>
< table.height() ) {
<.*?><.*?> * $('td:eq(4)', row).html( '<b>A</b>' );
10567 <.*?>
< table.height() ) {
<.*?><.*?> * }
10568 <.*?>
< table.height() ) {
<.*?><.*?> * }
10569 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10570 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10571 <.*?>
< table.height() ) {
<.*?><.*?> */
10572 <.*?>
< table.height() ) {
<.*?><.*?> "fnRowCallback": null,
10573  
10574  
10575 <.*?>
< table.height() ) {
<.*?><.*?> /**
10576 <.*?>
< table.height() ) {
<.*?><.*?> * __Deprecated__ The functionality provided by this parameter has now been
10577 <.*?>
< table.height() ) {
<.*?><.*?> * superseded by that provided through `ajax`, which should be used instead.
10578 <.*?>
< table.height() ) {
<.*?><.*?> *
10579 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter allows you to override the default function which obtains
10580 <.*?>
< table.height() ) {
<.*?><.*?> * the data from the server so something more suitable for your application.
10581 <.*?>
< table.height() ) {
<.*?><.*?> * For example you could use POST data, or pull information from a Gears or
10582 <.*?>
< table.height() ) {
<.*?><.*?> * AIR database.
10583 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10584 <.*?>
< table.height() ) {
<.*?><.*?> * @member
10585 <.*?>
< table.height() ) {
<.*?><.*?> * @param {string} source HTTP source to obtain the data from (`ajax`)
10586 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data A key/value pair object containing the data to send
10587 <.*?>
< table.height() ) {
<.*?><.*?> * to the server
10588 <.*?>
< table.height() ) {
<.*?><.*?> * @param {function} callback to be called on completion of the data get
10589 <.*?>
< table.height() ) {
<.*?><.*?> * process that will draw the data on the page.
10590 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10591 <.*?>
< table.height() ) {
<.*?><.*?> *
10592 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10593 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
10594 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.serverData
10595 <.*?>
< table.height() ) {
<.*?><.*?> *
10596 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated 1.10. Please use `ajax` for this functionality now.
10597 <.*?>
< table.height() ) {
<.*?><.*?> */
10598 <.*?>
< table.height() ) {
<.*?><.*?> "fnServerData": null,
10599  
10600  
10601 <.*?>
< table.height() ) {
<.*?><.*?> /**
10602 <.*?>
< table.height() ) {
<.*?><.*?> * __Deprecated__ The functionality provided by this parameter has now been
10603 <.*?>
< table.height() ) {
<.*?><.*?> * superseded by that provided through `ajax`, which should be used instead.
10604 <.*?>
< table.height() ) {
<.*?><.*?> *
10605 <.*?>
< table.height() ) {
<.*?><.*?> * It is often useful to send extra data to the server when making an Ajax
10606 <.*?>
< table.height() ) {
<.*?><.*?> * request - for example custom filtering information, and this callback
10607 <.*?>
< table.height() ) {
<.*?><.*?> * function makes it trivial to send extra information to the server. The
10608 <.*?>
< table.height() ) {
<.*?><.*?> * passed in parameter is the data set that has been constructed by
10609 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables, and you can add to this or modify it as you require.
10610 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10611 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array} data Data array (array of objects which are name/value
10612 <.*?>
< table.height() ) {
<.*?><.*?> * pairs) that has been constructed by DataTables and will be sent to the
10613 <.*?>
< table.height() ) {
<.*?><.*?> * server. In the case of Ajax sourced data with server-side processing
10614 <.*?>
< table.height() ) {
<.*?><.*?> * this will be an empty array, for server-side processing there will be a
10615 <.*?>
< table.height() ) {
<.*?><.*?> * significant number of parameters!
10616 <.*?>
< table.height() ) {
<.*?><.*?> * @returns {undefined} Ensure that you modify the data array passed in,
10617 <.*?>
< table.height() ) {
<.*?><.*?> * as this is passed by reference.
10618 <.*?>
< table.height() ) {
<.*?><.*?> *
10619 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10620 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
10621 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.serverParams
10622 <.*?>
< table.height() ) {
<.*?><.*?> *
10623 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated 1.10. Please use `ajax` for this functionality now.
10624 <.*?>
< table.height() ) {
<.*?><.*?> */
10625 <.*?>
< table.height() ) {
<.*?><.*?> "fnServerParams": null,
10626  
10627  
10628 <.*?>
< table.height() ) {
<.*?><.*?> /**
10629 <.*?>
< table.height() ) {
<.*?><.*?> * Load the table state. With this function you can define from where, and how, the
10630 <.*?>
< table.height() ) {
<.*?><.*?> * state of a table is loaded. By default DataTables will load from `localStorage`
10631 <.*?>
< table.height() ) {
<.*?><.*?> * but you might wish to use a server-side database or cookies.
10632 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10633 <.*?>
< table.height() ) {
<.*?><.*?> * @member
10634 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10635 <.*?>
< table.height() ) {
<.*?><.*?> * @return {object} The DataTables state object to be loaded
10636 <.*?>
< table.height() ) {
<.*?><.*?> *
10637 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10638 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateLoadCallback
10639 <.*?>
< table.height() ) {
<.*?><.*?> *
10640 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10641 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10642 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10643 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10644 <.*?>
< table.height() ) {
<.*?><.*?> * "stateLoadCallback": function (settings) {
10645 <.*?>
< table.height() ) {
<.*?><.*?> * var o;
10646 <.*?>
< table.height() ) {
<.*?><.*?> *
10647 <.*?>
< table.height() ) {
<.*?><.*?> * // Send an Ajax request to the server to get the data. Note that
10648 <.*?>
< table.height() ) {
<.*?><.*?> * // this is a synchronous request.
10649 <.*?>
< table.height() ) {
<.*?><.*?> * $.ajax( {
10650 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "/state_load",
10651 <.*?>
< table.height() ) {
<.*?><.*?> * "async": false,
10652 <.*?>
< table.height() ) {
<.*?><.*?> * "dataType": "json",
10653 <.*?>
< table.height() ) {
<.*?><.*?> * "success": function (json) {
10654 <.*?>
< table.height() ) {
<.*?><.*?> * o = json;
10655 <.*?>
< table.height() ) {
<.*?><.*?> * }
10656 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10657 <.*?>
< table.height() ) {
<.*?><.*?> *
10658 <.*?>
< table.height() ) {
<.*?><.*?> * return o;
10659 <.*?>
< table.height() ) {
<.*?><.*?> * }
10660 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10661 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10662 <.*?>
< table.height() ) {
<.*?><.*?> */
10663 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateLoadCallback": function ( settings ) {
10664 <.*?>
< table.height() ) {
<.*?><.*?> try {
10665 <.*?>
< table.height() ) {
<.*?><.*?> return JSON.parse(
10666 <.*?>
< table.height() ) {
<.*?><.*?> (settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(
10667 <.*?>
< table.height() ) {
<.*?><.*?> 'DataTables_'+settings.sInstance+'_'+location.pathname
10668 <.*?>
< table.height() ) {
<.*?><.*?> )
10669 <.*?>
< table.height() ) {
<.*?><.*?> );
10670 <.*?>
< table.height() ) {
<.*?><.*?> } catch (e) {}
10671 <.*?>
< table.height() ) {
<.*?><.*?> },
10672  
10673  
10674 <.*?>
< table.height() ) {
<.*?><.*?> /**
10675 <.*?>
< table.height() ) {
<.*?><.*?> * Callback which allows modification of the saved state prior to loading that state.
10676 <.*?>
< table.height() ) {
<.*?><.*?> * This callback is called when the table is loading state from the stored data, but
10677 <.*?>
< table.height() ) {
<.*?><.*?> * prior to the settings object being modified by the saved state. Note that for
10678 <.*?>
< table.height() ) {
<.*?><.*?> * plug-in authors, you should use the `stateLoadParams` event to load parameters for
10679 <.*?>
< table.height() ) {
<.*?><.*?> * a plug-in.
10680 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10681 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10682 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} data The state object that is to be loaded
10683 <.*?>
< table.height() ) {
<.*?><.*?> *
10684 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10685 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateLoadParams
10686 <.*?>
< table.height() ) {
<.*?><.*?> *
10687 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10688 <.*?>
< table.height() ) {
<.*?><.*?> * // Remove a saved filter, so filtering is never loaded
10689 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10690 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10691 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10692 <.*?>
< table.height() ) {
<.*?><.*?> * "stateLoadParams": function (settings, data) {
10693 <.*?>
< table.height() ) {
<.*?><.*?> * data.oSearch.sSearch = "";
10694 <.*?>
< table.height() ) {
<.*?><.*?> * }
10695 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10696 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10697 <.*?>
< table.height() ) {
<.*?><.*?> *
10698 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10699 <.*?>
< table.height() ) {
<.*?><.*?> * // Disallow state loading by returning false
10700 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10701 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10702 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10703 <.*?>
< table.height() ) {
<.*?><.*?> * "stateLoadParams": function (settings, data) {
10704 <.*?>
< table.height() ) {
<.*?><.*?> * return false;
10705 <.*?>
< table.height() ) {
<.*?><.*?> * }
10706 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10707 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10708 <.*?>
< table.height() ) {
<.*?><.*?> */
10709 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateLoadParams": null,
10710  
10711  
10712 <.*?>
< table.height() ) {
<.*?><.*?> /**
10713 <.*?>
< table.height() ) {
<.*?><.*?> * Callback that is called when the state has been loaded from the state saving method
10714 <.*?>
< table.height() ) {
<.*?><.*?> * and the DataTables settings object has been modified as a result of the loaded state.
10715 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10716 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10717 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} data The state object that was loaded
10718 <.*?>
< table.height() ) {
<.*?><.*?> *
10719 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10720 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateLoaded
10721 <.*?>
< table.height() ) {
<.*?><.*?> *
10722 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10723 <.*?>
< table.height() ) {
<.*?><.*?> * // Show an alert with the filtering value that was saved
10724 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10725 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10726 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10727 <.*?>
< table.height() ) {
<.*?><.*?> * "stateLoaded": function (settings, data) {
10728 <.*?>
< table.height() ) {
<.*?><.*?> * alert( 'Saved filter was: '+data.oSearch.sSearch );
10729 <.*?>
< table.height() ) {
<.*?><.*?> * }
10730 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10731 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10732 <.*?>
< table.height() ) {
<.*?><.*?> */
10733 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateLoaded": null,
10734  
10735  
10736 <.*?>
< table.height() ) {
<.*?><.*?> /**
10737 <.*?>
< table.height() ) {
<.*?><.*?> * Save the table state. This function allows you to define where and how the state
10738 <.*?>
< table.height() ) {
<.*?><.*?> * information for the table is stored By default DataTables will use `localStorage`
10739 <.*?>
< table.height() ) {
<.*?><.*?> * but you might wish to use a server-side database or cookies.
10740 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10741 <.*?>
< table.height() ) {
<.*?><.*?> * @member
10742 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10743 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} data The state object to be saved
10744 <.*?>
< table.height() ) {
<.*?><.*?> *
10745 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10746 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateSaveCallback
10747 <.*?>
< table.height() ) {
<.*?><.*?> *
10748 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10749 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10750 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10751 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10752 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSaveCallback": function (settings, data) {
10753 <.*?>
< table.height() ) {
<.*?><.*?> * // Send an Ajax request to the server with the state object
10754 <.*?>
< table.height() ) {
<.*?><.*?> * $.ajax( {
10755 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "/state_save",
10756 <.*?>
< table.height() ) {
<.*?><.*?> * "data": data,
10757 <.*?>
< table.height() ) {
<.*?><.*?> * "dataType": "json",
10758 <.*?>
< table.height() ) {
<.*?><.*?> * "method": "POST"
10759 <.*?>
< table.height() ) {
<.*?><.*?> * "success": function () {}
10760 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10761 <.*?>
< table.height() ) {
<.*?><.*?> * }
10762 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10763 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10764 <.*?>
< table.height() ) {
<.*?><.*?> */
10765 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateSaveCallback": function ( settings, data ) {
10766 <.*?>
< table.height() ) {
<.*?><.*?> try {
10767 <.*?>
< table.height() ) {
<.*?><.*?> (settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(
10768 <.*?>
< table.height() ) {
<.*?><.*?> 'DataTables_'+settings.sInstance+'_'+location.pathname,
10769 <.*?>
< table.height() ) {
<.*?><.*?> JSON.stringify( data )
10770 <.*?>
< table.height() ) {
<.*?><.*?> );
10771 <.*?>
< table.height() ) {
<.*?><.*?> } catch (e) {}
10772 <.*?>
< table.height() ) {
<.*?><.*?> },
10773  
10774  
10775 <.*?>
< table.height() ) {
<.*?><.*?> /**
10776 <.*?>
< table.height() ) {
<.*?><.*?> * Callback which allows modification of the state to be saved. Called when the table
10777 <.*?>
< table.height() ) {
<.*?><.*?> * has changed state a new state save is required. This method allows modification of
10778 <.*?>
< table.height() ) {
<.*?><.*?> * the state saving object prior to actually doing the save, including addition or
10779 <.*?>
< table.height() ) {
<.*?><.*?> * other state properties or modification. Note that for plug-in authors, you should
10780 <.*?>
< table.height() ) {
<.*?><.*?> * use the `stateSaveParams` event to save parameters for a plug-in.
10781 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
10782 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} settings DataTables settings object
10783 <.*?>
< table.height() ) {
<.*?><.*?> * @param {object} data The state object to be saved
10784 <.*?>
< table.height() ) {
<.*?><.*?> *
10785 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Callbacks
10786 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateSaveParams
10787 <.*?>
< table.height() ) {
<.*?><.*?> *
10788 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10789 <.*?>
< table.height() ) {
<.*?><.*?> * // Remove a saved filter, so filtering is never saved
10790 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10791 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10792 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSave": true,
10793 <.*?>
< table.height() ) {
<.*?><.*?> * "stateSaveParams": function (settings, data) {
10794 <.*?>
< table.height() ) {
<.*?><.*?> * data.oSearch.sSearch = "";
10795 <.*?>
< table.height() ) {
<.*?><.*?> * }
10796 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10797 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10798 <.*?>
< table.height() ) {
<.*?><.*?> */
10799 <.*?>
< table.height() ) {
<.*?><.*?> "fnStateSaveParams": null,
10800  
10801  
10802 <.*?>
< table.height() ) {
<.*?><.*?> /**
10803 <.*?>
< table.height() ) {
<.*?><.*?> * Duration for which the saved state information is considered valid. After this period
10804 <.*?>
< table.height() ) {
<.*?><.*?> * has elapsed the state will be returned to the default.
10805 <.*?>
< table.height() ) {
<.*?><.*?> * Value is given in seconds.
10806 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
10807 <.*?>
< table.height() ) {
<.*?><.*?> * @default 7200 <i>(2 hours)</i>
10808 <.*?>
< table.height() ) {
<.*?><.*?> *
10809 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10810 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.stateDuration
10811 <.*?>
< table.height() ) {
<.*?><.*?> *
10812 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10813 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10814 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10815 <.*?>
< table.height() ) {
<.*?><.*?> * "stateDuration": 60*60*24; // 1 day
10816 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10817 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10818 <.*?>
< table.height() ) {
<.*?><.*?> */
10819 <.*?>
< table.height() ) {
<.*?><.*?> "iStateDuration": 7200,
10820  
10821  
10822 <.*?>
< table.height() ) {
<.*?><.*?> /**
10823 <.*?>
< table.height() ) {
<.*?><.*?> * When enabled DataTables will not make a request to the server for the first
10824 <.*?>
< table.height() ) {
<.*?><.*?> * page draw - rather it will use the data already on the page (no sorting etc
10825 <.*?>
< table.height() ) {
<.*?><.*?> * will be applied to it), thus saving on an XHR at load time. `deferLoading`
10826 <.*?>
< table.height() ) {
<.*?><.*?> * is used to indicate that deferred loading is required, but it is also used
10827 <.*?>
< table.height() ) {
<.*?><.*?> * to tell DataTables how many records there are in the full table (allowing
10828 <.*?>
< table.height() ) {
<.*?><.*?> * the information element and pagination to be displayed correctly). In the case
10829 <.*?>
< table.height() ) {
<.*?><.*?> * where a filtering is applied to the table on initial load, this can be
10830 <.*?>
< table.height() ) {
<.*?><.*?> * indicated by giving the parameter as an array, where the first element is
10831 <.*?>
< table.height() ) {
<.*?><.*?> * the number of records available after filtering and the second element is the
10832 <.*?>
< table.height() ) {
<.*?><.*?> * number of records without filtering (allowing the table information element
10833 <.*?>
< table.height() ) {
<.*?><.*?> * to be shown correctly).
10834 <.*?>
< table.height() ) {
<.*?><.*?> * @type int | array
10835 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
10836 <.*?>
< table.height() ) {
<.*?><.*?> *
10837 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10838 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.deferLoading
10839 <.*?>
< table.height() ) {
<.*?><.*?> *
10840 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10841 <.*?>
< table.height() ) {
<.*?><.*?> * // 57 records available in the table, no filtering applied
10842 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10843 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10844 <.*?>
< table.height() ) {
<.*?><.*?> * "serverSide": true,
10845 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": "scripts/server_processing.php",
10846 <.*?>
< table.height() ) {
<.*?><.*?> * "deferLoading": 57
10847 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10848 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10849 <.*?>
< table.height() ) {
<.*?><.*?> *
10850 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10851 <.*?>
< table.height() ) {
<.*?><.*?> * // 57 records after filtering, 100 without filtering (an initial filter applied)
10852 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10853 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10854 <.*?>
< table.height() ) {
<.*?><.*?> * "serverSide": true,
10855 <.*?>
< table.height() ) {
<.*?><.*?> * "ajax": "scripts/server_processing.php",
10856 <.*?>
< table.height() ) {
<.*?><.*?> * "deferLoading": [ 57, 100 ],
10857 <.*?>
< table.height() ) {
<.*?><.*?> * "search": {
10858 <.*?>
< table.height() ) {
<.*?><.*?> * "search": "my_filter"
10859 <.*?>
< table.height() ) {
<.*?><.*?> * }
10860 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10861 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10862 <.*?>
< table.height() ) {
<.*?><.*?> */
10863 <.*?>
< table.height() ) {
<.*?><.*?> "iDeferLoading": null,
10864  
10865  
10866 <.*?>
< table.height() ) {
<.*?><.*?> /**
10867 <.*?>
< table.height() ) {
<.*?><.*?> * Number of rows to display on a single page when using pagination. If
10868 <.*?>
< table.height() ) {
<.*?><.*?> * feature enabled (`lengthChange`) then the end user will be able to override
10869 <.*?>
< table.height() ) {
<.*?><.*?> * this to a custom setting using a pop-up menu.
10870 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
10871 <.*?>
< table.height() ) {
<.*?><.*?> * @default 10
10872 <.*?>
< table.height() ) {
<.*?><.*?> *
10873 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10874 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.pageLength
10875 <.*?>
< table.height() ) {
<.*?><.*?> *
10876 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10877 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10878 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10879 <.*?>
< table.height() ) {
<.*?><.*?> * "pageLength": 50
10880 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10881 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10882 <.*?>
< table.height() ) {
<.*?><.*?> */
10883 <.*?>
< table.height() ) {
<.*?><.*?> "iDisplayLength": 10,
10884  
10885  
10886 <.*?>
< table.height() ) {
<.*?><.*?> /**
10887 <.*?>
< table.height() ) {
<.*?><.*?> * Define the starting point for data display when using DataTables with
10888 <.*?>
< table.height() ) {
<.*?><.*?> * pagination. Note that this parameter is the number of records, rather than
10889 <.*?>
< table.height() ) {
<.*?><.*?> * the page number, so if you have 10 records per page and want to start on
10890 <.*?>
< table.height() ) {
<.*?><.*?> * the third page, it should be "20".
10891 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
10892 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
10893 <.*?>
< table.height() ) {
<.*?><.*?> *
10894 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10895 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.displayStart
10896 <.*?>
< table.height() ) {
<.*?><.*?> *
10897 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10898 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10899 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10900 <.*?>
< table.height() ) {
<.*?><.*?> * "displayStart": 20
10901 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10902 <.*?>
< table.height() ) {
<.*?><.*?> * } )
10903 <.*?>
< table.height() ) {
<.*?><.*?> */
10904 <.*?>
< table.height() ) {
<.*?><.*?> "iDisplayStart": 0,
10905  
10906  
10907 <.*?>
< table.height() ) {
<.*?><.*?> /**
10908 <.*?>
< table.height() ) {
<.*?><.*?> * By default DataTables allows keyboard navigation of the table (sorting, paging,
10909 <.*?>
< table.height() ) {
<.*?><.*?> * and filtering) by adding a `tabindex` attribute to the required elements. This
10910 <.*?>
< table.height() ) {
<.*?><.*?> * allows you to tab through the controls and press the enter key to activate them.
10911 <.*?>
< table.height() ) {
<.*?><.*?> * The tabindex is default 0, meaning that the tab follows the flow of the document.
10912 <.*?>
< table.height() ) {
<.*?><.*?> * You can overrule this using this parameter if you wish. Use a value of -1 to
10913 <.*?>
< table.height() ) {
<.*?><.*?> * disable built-in keyboard navigation.
10914 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
10915 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
10916 <.*?>
< table.height() ) {
<.*?><.*?> *
10917 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
10918 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.tabIndex
10919 <.*?>
< table.height() ) {
<.*?><.*?> *
10920 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10921 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10922 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10923 <.*?>
< table.height() ) {
<.*?><.*?> * "tabIndex": 1
10924 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10925 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10926 <.*?>
< table.height() ) {
<.*?><.*?> */
10927 <.*?>
< table.height() ) {
<.*?><.*?> "iTabIndex": 0,
10928  
10929  
10930 <.*?>
< table.height() ) {
<.*?><.*?> /**
10931 <.*?>
< table.height() ) {
<.*?><.*?> * Classes that DataTables assigns to the various components and features
10932 <.*?>
< table.height() ) {
<.*?><.*?> * that it adds to the HTML table. This allows classes to be configured
10933 <.*?>
< table.height() ) {
<.*?><.*?> * during initialisation in addition to through the static
10934 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.ext.oStdClasses} object).
10935 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
10936 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.classes
10937 <.*?>
< table.height() ) {
<.*?><.*?> */
10938 <.*?>
< table.height() ) {
<.*?><.*?> "oClasses": {},
10939  
10940  
10941 <.*?>
< table.height() ) {
<.*?><.*?> /**
10942 <.*?>
< table.height() ) {
<.*?><.*?> * All strings that DataTables uses in the user interface that it creates
10943 <.*?>
< table.height() ) {
<.*?><.*?> * are defined in this object, allowing you to modified them individually or
10944 <.*?>
< table.height() ) {
<.*?><.*?> * completely replace them all as required.
10945 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
10946 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language
10947 <.*?>
< table.height() ) {
<.*?><.*?> */
10948 <.*?>
< table.height() ) {
<.*?><.*?> "oLanguage": {
10949 <.*?>
< table.height() ) {
<.*?><.*?> /**
10950 <.*?>
< table.height() ) {
<.*?><.*?> * Strings that are used for WAI-ARIA labels and controls only (these are not
10951 <.*?>
< table.height() ) {
<.*?><.*?> * actually visible on the page, but will be read by screenreaders, and thus
10952 <.*?>
< table.height() ) {
<.*?><.*?> * must be internationalised as well).
10953 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
10954 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.aria
10955 <.*?>
< table.height() ) {
<.*?><.*?> */
10956 <.*?>
< table.height() ) {
<.*?><.*?> "oAria": {
10957 <.*?>
< table.height() ) {
<.*?><.*?> /**
10958 <.*?>
< table.height() ) {
<.*?><.*?> * ARIA label that is added to the table headers when the column may be
10959 <.*?>
< table.height() ) {
<.*?><.*?> * sorted ascending by activing the column (click or return when focused).
10960 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the column header is prefixed to this string.
10961 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
10962 <.*?>
< table.height() ) {
<.*?><.*?> * @default : activate to sort column ascending
10963 <.*?>
< table.height() ) {
<.*?><.*?> *
10964 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
10965 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.aria.sortAscending
10966 <.*?>
< table.height() ) {
<.*?><.*?> *
10967 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10968 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10969 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10970 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
10971 <.*?>
< table.height() ) {
<.*?><.*?> * "aria": {
10972 <.*?>
< table.height() ) {
<.*?><.*?> * "sortAscending": " - click/return to sort ascending"
10973 <.*?>
< table.height() ) {
<.*?><.*?> * }
10974 <.*?>
< table.height() ) {
<.*?><.*?> * }
10975 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10976 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10977 <.*?>
< table.height() ) {
<.*?><.*?> */
10978 <.*?>
< table.height() ) {
<.*?><.*?> "sSortAscending": ": activate to sort column ascending",
10979  
10980 <.*?>
< table.height() ) {
<.*?><.*?> /**
10981 <.*?>
< table.height() ) {
<.*?><.*?> * ARIA label that is added to the table headers when the column may be
10982 <.*?>
< table.height() ) {
<.*?><.*?> * sorted descending by activing the column (click or return when focused).
10983 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the column header is prefixed to this string.
10984 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
10985 <.*?>
< table.height() ) {
<.*?><.*?> * @default : activate to sort column ascending
10986 <.*?>
< table.height() ) {
<.*?><.*?> *
10987 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
10988 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.aria.sortDescending
10989 <.*?>
< table.height() ) {
<.*?><.*?> *
10990 <.*?>
< table.height() ) {
<.*?><.*?> * @example
10991 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
10992 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
10993 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
10994 <.*?>
< table.height() ) {
<.*?><.*?> * "aria": {
10995 <.*?>
< table.height() ) {
<.*?><.*?> * "sortDescending": " - click/return to sort descending"
10996 <.*?>
< table.height() ) {
<.*?><.*?> * }
10997 <.*?>
< table.height() ) {
<.*?><.*?> * }
10998 <.*?>
< table.height() ) {
<.*?><.*?> * } );
10999 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11000 <.*?>
< table.height() ) {
<.*?><.*?> */
11001 <.*?>
< table.height() ) {
<.*?><.*?> "sSortDescending": ": activate to sort column descending"
11002 <.*?>
< table.height() ) {
<.*?><.*?> },
11003  
11004 <.*?>
< table.height() ) {
<.*?><.*?> /**
11005 <.*?>
< table.height() ) {
<.*?><.*?> * Pagination string used by DataTables for the built-in pagination
11006 <.*?>
< table.height() ) {
<.*?><.*?> * control types.
11007 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
11008 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.paginate
11009 <.*?>
< table.height() ) {
<.*?><.*?> */
11010 <.*?>
< table.height() ) {
<.*?><.*?> "oPaginate": {
11011 <.*?>
< table.height() ) {
<.*?><.*?> /**
11012 <.*?>
< table.height() ) {
<.*?><.*?> * Text to use when using the 'full_numbers' type of pagination for the
11013 <.*?>
< table.height() ) {
<.*?><.*?> * button to take the user to the first page.
11014 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11015 <.*?>
< table.height() ) {
<.*?><.*?> * @default First
11016 <.*?>
< table.height() ) {
<.*?><.*?> *
11017 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11018 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.paginate.first
11019 <.*?>
< table.height() ) {
<.*?><.*?> *
11020 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11021 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11022 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11023 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11024 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": {
11025 <.*?>
< table.height() ) {
<.*?><.*?> * "first": "First page"
11026 <.*?>
< table.height() ) {
<.*?><.*?> * }
11027 <.*?>
< table.height() ) {
<.*?><.*?> * }
11028 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11029 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11030 <.*?>
< table.height() ) {
<.*?><.*?> */
11031 <.*?>
< table.height() ) {
<.*?><.*?> "sFirst": "First",
11032  
11033  
11034 <.*?>
< table.height() ) {
<.*?><.*?> /**
11035 <.*?>
< table.height() ) {
<.*?><.*?> * Text to use when using the 'full_numbers' type of pagination for the
11036 <.*?>
< table.height() ) {
<.*?><.*?> * button to take the user to the last page.
11037 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11038 <.*?>
< table.height() ) {
<.*?><.*?> * @default Last
11039 <.*?>
< table.height() ) {
<.*?><.*?> *
11040 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11041 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.paginate.last
11042 <.*?>
< table.height() ) {
<.*?><.*?> *
11043 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11044 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11045 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11046 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11047 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": {
11048 <.*?>
< table.height() ) {
<.*?><.*?> * "last": "Last page"
11049 <.*?>
< table.height() ) {
<.*?><.*?> * }
11050 <.*?>
< table.height() ) {
<.*?><.*?> * }
11051 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11052 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11053 <.*?>
< table.height() ) {
<.*?><.*?> */
11054 <.*?>
< table.height() ) {
<.*?><.*?> "sLast": "Last",
11055  
11056  
11057 <.*?>
< table.height() ) {
<.*?><.*?> /**
11058 <.*?>
< table.height() ) {
<.*?><.*?> * Text to use for the 'next' pagination button (to take the user to the
11059 <.*?>
< table.height() ) {
<.*?><.*?> * next page).
11060 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11061 <.*?>
< table.height() ) {
<.*?><.*?> * @default Next
11062 <.*?>
< table.height() ) {
<.*?><.*?> *
11063 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11064 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.paginate.next
11065 <.*?>
< table.height() ) {
<.*?><.*?> *
11066 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11067 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11068 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11069 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11070 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": {
11071 <.*?>
< table.height() ) {
<.*?><.*?> * "next": "Next page"
11072 <.*?>
< table.height() ) {
<.*?><.*?> * }
11073 <.*?>
< table.height() ) {
<.*?><.*?> * }
11074 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11075 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11076 <.*?>
< table.height() ) {
<.*?><.*?> */
11077 <.*?>
< table.height() ) {
<.*?><.*?> "sNext": "Next",
11078  
11079  
11080 <.*?>
< table.height() ) {
<.*?><.*?> /**
11081 <.*?>
< table.height() ) {
<.*?><.*?> * Text to use for the 'previous' pagination button (to take the user to
11082 <.*?>
< table.height() ) {
<.*?><.*?> * the previous page).
11083 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11084 <.*?>
< table.height() ) {
<.*?><.*?> * @default Previous
11085 <.*?>
< table.height() ) {
<.*?><.*?> *
11086 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11087 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.paginate.previous
11088 <.*?>
< table.height() ) {
<.*?><.*?> *
11089 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11090 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11091 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11092 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11093 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": {
11094 <.*?>
< table.height() ) {
<.*?><.*?> * "previous": "Previous page"
11095 <.*?>
< table.height() ) {
<.*?><.*?> * }
11096 <.*?>
< table.height() ) {
<.*?><.*?> * }
11097 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11098 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11099 <.*?>
< table.height() ) {
<.*?><.*?> */
11100 <.*?>
< table.height() ) {
<.*?><.*?> "sPrevious": "Previous"
11101 <.*?>
< table.height() ) {
<.*?><.*?> },
11102  
11103 <.*?>
< table.height() ) {
<.*?><.*?> /**
11104 <.*?>
< table.height() ) {
<.*?><.*?> * This string is shown in preference to `zeroRecords` when the table is
11105 <.*?>
< table.height() ) {
<.*?><.*?> * empty of data (regardless of filtering). Note that this is an optional
11106 <.*?>
< table.height() ) {
<.*?><.*?> * parameter - if it is not given, the value of `zeroRecords` will be used
11107 <.*?>
< table.height() ) {
<.*?><.*?> * instead (either the default or given value).
11108 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11109 <.*?>
< table.height() ) {
<.*?><.*?> * @default No data available in table
11110 <.*?>
< table.height() ) {
<.*?><.*?> *
11111 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11112 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.emptyTable
11113 <.*?>
< table.height() ) {
<.*?><.*?> *
11114 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11115 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11116 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11117 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11118 <.*?>
< table.height() ) {
<.*?><.*?> * "emptyTable": "No data available in table"
11119 <.*?>
< table.height() ) {
<.*?><.*?> * }
11120 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11121 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11122 <.*?>
< table.height() ) {
<.*?><.*?> */
11123 <.*?>
< table.height() ) {
<.*?><.*?> "sEmptyTable": "No data available in table",
11124  
11125  
11126 <.*?>
< table.height() ) {
<.*?><.*?> /**
11127 <.*?>
< table.height() ) {
<.*?><.*?> * This string gives information to the end user about the information
11128 <.*?>
< table.height() ) {
<.*?><.*?> * that is current on display on the page. The following tokens can be
11129 <.*?>
< table.height() ) {
<.*?><.*?> * used in the string and will be dynamically replaced as the table
11130 <.*?>
< table.height() ) {
<.*?><.*?> * display updates. This tokens can be placed anywhere in the string, or
11131 <.*?>
< table.height() ) {
<.*?><.*?> * removed as needed by the language requires:
11132 <.*?>
< table.height() ) {
<.*?><.*?> *
11133 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_START\_` - Display index of the first record on the current page
11134 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_END\_` - Display index of the last record on the current page
11135 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_TOTAL\_` - Number of records in the table after filtering
11136 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_MAX\_` - Number of records in the table without filtering
11137 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_PAGE\_` - Current page number
11138 <.*?>
< table.height() ) {
<.*?><.*?> * * `\_PAGES\_` - Total number of pages of data in the table
11139 <.*?>
< table.height() ) {
<.*?><.*?> *
11140 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11141 <.*?>
< table.height() ) {
<.*?><.*?> * @default Showing _START_ to _END_ of _TOTAL_ entries
11142 <.*?>
< table.height() ) {
<.*?><.*?> *
11143 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11144 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.info
11145 <.*?>
< table.height() ) {
<.*?><.*?> *
11146 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11147 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11148 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11149 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11150 <.*?>
< table.height() ) {
<.*?><.*?> * "info": "Showing page _PAGE_ of _PAGES_"
11151 <.*?>
< table.height() ) {
<.*?><.*?> * }
11152 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11153 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11154 <.*?>
< table.height() ) {
<.*?><.*?> */
11155 <.*?>
< table.height() ) {
<.*?><.*?> "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
11156  
11157  
11158 <.*?>
< table.height() ) {
<.*?><.*?> /**
11159 <.*?>
< table.height() ) {
<.*?><.*?> * Display information string for when the table is empty. Typically the
11160 <.*?>
< table.height() ) {
<.*?><.*?> * format of this string should match `info`.
11161 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11162 <.*?>
< table.height() ) {
<.*?><.*?> * @default Showing 0 to 0 of 0 entries
11163 <.*?>
< table.height() ) {
<.*?><.*?> *
11164 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11165 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.infoEmpty
11166 <.*?>
< table.height() ) {
<.*?><.*?> *
11167 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11168 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11169 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11170 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11171 <.*?>
< table.height() ) {
<.*?><.*?> * "infoEmpty": "No entries to show"
11172 <.*?>
< table.height() ) {
<.*?><.*?> * }
11173 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11174 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11175 <.*?>
< table.height() ) {
<.*?><.*?> */
11176 <.*?>
< table.height() ) {
<.*?><.*?> "sInfoEmpty": "Showing 0 to 0 of 0 entries",
11177  
11178  
11179 <.*?>
< table.height() ) {
<.*?><.*?> /**
11180 <.*?>
< table.height() ) {
<.*?><.*?> * When a user filters the information in a table, this string is appended
11181 <.*?>
< table.height() ) {
<.*?><.*?> * to the information (`info`) to give an idea of how strong the filtering
11182 <.*?>
< table.height() ) {
<.*?><.*?> * is. The variable _MAX_ is dynamically updated.
11183 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11184 <.*?>
< table.height() ) {
<.*?><.*?> * @default (filtered from _MAX_ total entries)
11185 <.*?>
< table.height() ) {
<.*?><.*?> *
11186 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11187 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.infoFiltered
11188 <.*?>
< table.height() ) {
<.*?><.*?> *
11189 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11190 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11191 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11192 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11193 <.*?>
< table.height() ) {
<.*?><.*?> * "infoFiltered": " - filtering from _MAX_ records"
11194 <.*?>
< table.height() ) {
<.*?><.*?> * }
11195 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11196 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11197 <.*?>
< table.height() ) {
<.*?><.*?> */
11198 <.*?>
< table.height() ) {
<.*?><.*?> "sInfoFiltered": "(filtered from _MAX_ total entries)",
11199  
11200  
11201 <.*?>
< table.height() ) {
<.*?><.*?> /**
11202 <.*?>
< table.height() ) {
<.*?><.*?> * If can be useful to append extra information to the info string at times,
11203 <.*?>
< table.height() ) {
<.*?><.*?> * and this variable does exactly that. This information will be appended to
11204 <.*?>
< table.height() ) {
<.*?><.*?> * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are
11205 <.*?>
< table.height() ) {
<.*?><.*?> * being used) at all times.
11206 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11207 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
11208 <.*?>
< table.height() ) {
<.*?><.*?> *
11209 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11210 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.infoPostFix
11211 <.*?>
< table.height() ) {
<.*?><.*?> *
11212 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11213 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11214 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11215 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11216 <.*?>
< table.height() ) {
<.*?><.*?> * "infoPostFix": "All records shown are derived from real information."
11217 <.*?>
< table.height() ) {
<.*?><.*?> * }
11218 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11219 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11220 <.*?>
< table.height() ) {
<.*?><.*?> */
11221 <.*?>
< table.height() ) {
<.*?><.*?> "sInfoPostFix": "",
11222  
11223  
11224 <.*?>
< table.height() ) {
<.*?><.*?> /**
11225 <.*?>
< table.height() ) {
<.*?><.*?> * This decimal place operator is a little different from the other
11226 <.*?>
< table.height() ) {
<.*?><.*?> * language options since DataTables doesn't output floating point
11227 <.*?>
< table.height() ) {
<.*?><.*?> * numbers, so it won't ever use this for display of a number. Rather,
11228 <.*?>
< table.height() ) {
<.*?><.*?> * what this parameter does is modify the sort methods of the table so
11229 <.*?>
< table.height() ) {
<.*?><.*?> * that numbers which are in a format which has a character other than
11230 <.*?>
< table.height() ) {
<.*?><.*?> * a period (`.`) as a decimal place will be sorted numerically.
11231 <.*?>
< table.height() ) {
<.*?><.*?> *
11232 <.*?>
< table.height() ) {
<.*?><.*?> * Note that numbers with different decimal places cannot be shown in
11233 <.*?>
< table.height() ) {
<.*?><.*?> * the same table and still be sortable, the table must be consistent.
11234 <.*?>
< table.height() ) {
<.*?><.*?> * However, multiple different tables on the page can use different
11235 <.*?>
< table.height() ) {
<.*?><.*?> * decimal place characters.
11236 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11237 <.*?>
< table.height() ) {
<.*?><.*?> * @default
11238 <.*?>
< table.height() ) {
<.*?><.*?> *
11239 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11240 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.decimal
11241 <.*?>
< table.height() ) {
<.*?><.*?> *
11242 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11243 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11244 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11245 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11246 <.*?>
< table.height() ) {
<.*?><.*?> * "decimal": ","
11247 <.*?>
< table.height() ) {
<.*?><.*?> * "thousands": "."
11248 <.*?>
< table.height() ) {
<.*?><.*?> * }
11249 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11250 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11251 <.*?>
< table.height() ) {
<.*?><.*?> */
11252 <.*?>
< table.height() ) {
<.*?><.*?> "sDecimal": "",
11253  
11254  
11255 <.*?>
< table.height() ) {
<.*?><.*?> /**
11256 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables has a build in number formatter (`formatNumber`) which is
11257 <.*?>
< table.height() ) {
<.*?><.*?> * used to format large numbers that are used in the table information.
11258 <.*?>
< table.height() ) {
<.*?><.*?> * By default a comma is used, but this can be trivially changed to any
11259 <.*?>
< table.height() ) {
<.*?><.*?> * character you wish with this parameter.
11260 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11261 <.*?>
< table.height() ) {
<.*?><.*?> * @default ,
11262 <.*?>
< table.height() ) {
<.*?><.*?> *
11263 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11264 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.thousands
11265 <.*?>
< table.height() ) {
<.*?><.*?> *
11266 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11267 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11268 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11269 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11270 <.*?>
< table.height() ) {
<.*?><.*?> * "thousands": "'"
11271 <.*?>
< table.height() ) {
<.*?><.*?> * }
11272 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11273 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11274 <.*?>
< table.height() ) {
<.*?><.*?> */
11275 <.*?>
< table.height() ) {
<.*?><.*?> "sThousands": ",",
11276  
11277  
11278 <.*?>
< table.height() ) {
<.*?><.*?> /**
11279 <.*?>
< table.height() ) {
<.*?><.*?> * Detail the action that will be taken when the drop down menu for the
11280 <.*?>
< table.height() ) {
<.*?><.*?> * pagination length option is changed. The '_MENU_' variable is replaced
11281 <.*?>
< table.height() ) {
<.*?><.*?> * with a default select list of 10, 25, 50 and 100, and can be replaced
11282 <.*?>
< table.height() ) {
<.*?><.*?> * with a custom select box if required.
11283 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11284 <.*?>
< table.height() ) {
<.*?><.*?> * @default Show _MENU_ entries
11285 <.*?>
< table.height() ) {
<.*?><.*?> *
11286 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11287 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.lengthMenu
11288 <.*?>
< table.height() ) {
<.*?><.*?> *
11289 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11290 <.*?>
< table.height() ) {
<.*?><.*?> * // Language change only
11291 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11292 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11293 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11294 <.*?>
< table.height() ) {
<.*?><.*?> * "lengthMenu": "Display _MENU_ records"
11295 <.*?>
< table.height() ) {
<.*?><.*?> * }
11296 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11297 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11298 <.*?>
< table.height() ) {
<.*?><.*?> *
11299 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11300 <.*?>
< table.height() ) {
<.*?><.*?> * // Language and options change
11301 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11302 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11303 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11304 <.*?>
< table.height() ) {
<.*?><.*?> * "lengthMenu": 'Display <select>'+
11305 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="10">10</option>'+
11306 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="20">20</option>'+
11307 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="30">30</option>'+
11308 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="40">40</option>'+
11309 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="50">50</option>'+
11310 <.*?>
< table.height() ) {
<.*?><.*?> * '<option value="-1">All</option>'+
11311 <.*?>
< table.height() ) {
<.*?><.*?> * '</select> records'
11312 <.*?>
< table.height() ) {
<.*?><.*?> * }
11313 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11314 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11315 <.*?>
< table.height() ) {
<.*?><.*?> */
11316 <.*?>
< table.height() ) {
<.*?><.*?> "sLengthMenu": "Show _MENU_ entries",
11317  
11318  
11319 <.*?>
< table.height() ) {
<.*?><.*?> /**
11320 <.*?>
< table.height() ) {
<.*?><.*?> * When using Ajax sourced data and during the first draw when DataTables is
11321 <.*?>
< table.height() ) {
<.*?><.*?> * gathering the data, this message is shown in an empty row in the table to
11322 <.*?>
< table.height() ) {
<.*?><.*?> * indicate to the end user the the data is being loaded. Note that this
11323 <.*?>
< table.height() ) {
<.*?><.*?> * parameter is not used when loading data by server-side processing, just
11324 <.*?>
< table.height() ) {
<.*?><.*?> * Ajax sourced data with client-side processing.
11325 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11326 <.*?>
< table.height() ) {
<.*?><.*?> * @default Loading...
11327 <.*?>
< table.height() ) {
<.*?><.*?> *
11328 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11329 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.loadingRecords
11330 <.*?>
< table.height() ) {
<.*?><.*?> *
11331 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11332 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11333 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11334 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11335 <.*?>
< table.height() ) {
<.*?><.*?> * "loadingRecords": "Please wait - loading..."
11336 <.*?>
< table.height() ) {
<.*?><.*?> * }
11337 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11338 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11339 <.*?>
< table.height() ) {
<.*?><.*?> */
11340 <.*?>
< table.height() ) {
<.*?><.*?> "sLoadingRecords": "Loading...",
11341  
11342  
11343 <.*?>
< table.height() ) {
<.*?><.*?> /**
11344 <.*?>
< table.height() ) {
<.*?><.*?> * Text which is displayed when the table is processing a user action
11345 <.*?>
< table.height() ) {
<.*?><.*?> * (usually a sort command or similar).
11346 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11347 <.*?>
< table.height() ) {
<.*?><.*?> * @default Processing...
11348 <.*?>
< table.height() ) {
<.*?><.*?> *
11349 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11350 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.processing
11351 <.*?>
< table.height() ) {
<.*?><.*?> *
11352 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11353 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11354 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11355 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11356 <.*?>
< table.height() ) {
<.*?><.*?> * "processing": "DataTables is currently busy"
11357 <.*?>
< table.height() ) {
<.*?><.*?> * }
11358 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11359 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11360 <.*?>
< table.height() ) {
<.*?><.*?> */
11361 <.*?>
< table.height() ) {
<.*?><.*?> "sProcessing": "Processing...",
11362  
11363  
11364 <.*?>
< table.height() ) {
<.*?><.*?> /**
11365 <.*?>
< table.height() ) {
<.*?><.*?> * Details the actions that will be taken when the user types into the
11366 <.*?>
< table.height() ) {
<.*?><.*?> * filtering input text box. The variable "_INPUT_", if used in the string,
11367 <.*?>
< table.height() ) {
<.*?><.*?> * is replaced with the HTML text box for the filtering input allowing
11368 <.*?>
< table.height() ) {
<.*?><.*?> * control over where it appears in the string. If "_INPUT_" is not given
11369 <.*?>
< table.height() ) {
<.*?><.*?> * then the input box is appended to the string automatically.
11370 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11371 <.*?>
< table.height() ) {
<.*?><.*?> * @default Search:
11372 <.*?>
< table.height() ) {
<.*?><.*?> *
11373 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11374 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.search
11375 <.*?>
< table.height() ) {
<.*?><.*?> *
11376 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11377 <.*?>
< table.height() ) {
<.*?><.*?> * // Input text box will be appended at the end automatically
11378 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11379 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11380 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11381 <.*?>
< table.height() ) {
<.*?><.*?> * "search": "Filter records:"
11382 <.*?>
< table.height() ) {
<.*?><.*?> * }
11383 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11384 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11385 <.*?>
< table.height() ) {
<.*?><.*?> *
11386 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11387 <.*?>
< table.height() ) {
<.*?><.*?> * // Specify where the filter should appear
11388 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11389 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11390 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11391 <.*?>
< table.height() ) {
<.*?><.*?> * "search": "Apply filter _INPUT_ to table"
11392 <.*?>
< table.height() ) {
<.*?><.*?> * }
11393 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11394 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11395 <.*?>
< table.height() ) {
<.*?><.*?> */
11396 <.*?>
< table.height() ) {
<.*?><.*?> "sSearch": "Search:",
11397  
11398  
11399 <.*?>
< table.height() ) {
<.*?><.*?> /**
11400 <.*?>
< table.height() ) {
<.*?><.*?> * Assign a `placeholder` attribute to the search `input` element
11401 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11402 <.*?>
< table.height() ) {
<.*?><.*?> * @default
11403 <.*?>
< table.height() ) {
<.*?><.*?> *
11404 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11405 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.searchPlaceholder
11406 <.*?>
< table.height() ) {
<.*?><.*?> */
11407 <.*?>
< table.height() ) {
<.*?><.*?> "sSearchPlaceholder": "",
11408  
11409  
11410 <.*?>
< table.height() ) {
<.*?><.*?> /**
11411 <.*?>
< table.height() ) {
<.*?><.*?> * All of the language information can be stored in a file on the
11412 <.*?>
< table.height() ) {
<.*?><.*?> * server-side, which DataTables will look up if this parameter is passed.
11413 <.*?>
< table.height() ) {
<.*?><.*?> * It must store the URL of the language file, which is in a JSON format,
11414 <.*?>
< table.height() ) {
<.*?><.*?> * and the object has the same properties as the oLanguage object in the
11415 <.*?>
< table.height() ) {
<.*?><.*?> * initialiser object (i.e. the above parameters). Please refer to one of
11416 <.*?>
< table.height() ) {
<.*?><.*?> * the example language files to see how this works in action.
11417 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11418 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string - i.e. disabled</i>
11419 <.*?>
< table.height() ) {
<.*?><.*?> *
11420 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11421 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.url
11422 <.*?>
< table.height() ) {
<.*?><.*?> *
11423 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11424 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11425 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11426 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11427 <.*?>
< table.height() ) {
<.*?><.*?> * "url": "http://www.sprymedia.co.uk/dataTables/lang.txt"
11428 <.*?>
< table.height() ) {
<.*?><.*?> * }
11429 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11430 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11431 <.*?>
< table.height() ) {
<.*?><.*?> */
11432 <.*?>
< table.height() ) {
<.*?><.*?> "sUrl": "",
11433  
11434  
11435 <.*?>
< table.height() ) {
<.*?><.*?> /**
11436 <.*?>
< table.height() ) {
<.*?><.*?> * Text shown inside the table records when the is no information to be
11437 <.*?>
< table.height() ) {
<.*?><.*?> * displayed after filtering. `emptyTable` is shown when there is simply no
11438 <.*?>
< table.height() ) {
<.*?><.*?> * information in the table at all (regardless of filtering).
11439 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11440 <.*?>
< table.height() ) {
<.*?><.*?> * @default No matching records found
11441 <.*?>
< table.height() ) {
<.*?><.*?> *
11442 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Language
11443 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.language.zeroRecords
11444 <.*?>
< table.height() ) {
<.*?><.*?> *
11445 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11446 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11447 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11448 <.*?>
< table.height() ) {
<.*?><.*?> * "language": {
11449 <.*?>
< table.height() ) {
<.*?><.*?> * "zeroRecords": "No records to display"
11450 <.*?>
< table.height() ) {
<.*?><.*?> * }
11451 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11452 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11453 <.*?>
< table.height() ) {
<.*?><.*?> */
11454 <.*?>
< table.height() ) {
<.*?><.*?> "sZeroRecords": "No matching records found"
11455 <.*?>
< table.height() ) {
<.*?><.*?> },
11456  
11457  
11458 <.*?>
< table.height() ) {
<.*?><.*?> /**
11459 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter allows you to have define the global filtering state at
11460 <.*?>
< table.height() ) {
<.*?><.*?> * initialisation time. As an object the `search` parameter must be
11461 <.*?>
< table.height() ) {
<.*?><.*?> * defined, but all other parameters are optional. When `regex` is true,
11462 <.*?>
< table.height() ) {
<.*?><.*?> * the search string will be treated as a regular expression, when false
11463 <.*?>
< table.height() ) {
<.*?><.*?> * (default) it will be treated as a straight string. When `smart`
11464 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables will use it's smart filtering methods (to word match at
11465 <.*?>
< table.height() ) {
<.*?><.*?> * any point in the data), when false this will not be done.
11466 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
11467 <.*?>
< table.height() ) {
<.*?><.*?> * @extends DataTable.models.oSearch
11468 <.*?>
< table.height() ) {
<.*?><.*?> *
11469 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11470 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.search
11471 <.*?>
< table.height() ) {
<.*?><.*?> *
11472 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11473 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11474 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11475 <.*?>
< table.height() ) {
<.*?><.*?> * "search": {"search": "Initial search"}
11476 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11477 <.*?>
< table.height() ) {
<.*?><.*?> * } )
11478 <.*?>
< table.height() ) {
<.*?><.*?> */
11479 <.*?>
< table.height() ) {
<.*?><.*?> "oSearch": $.extend( {}, DataTable.models.oSearch ),
11480  
11481  
11482 <.*?>
< table.height() ) {
<.*?><.*?> /**
11483 <.*?>
< table.height() ) {
<.*?><.*?> * __Deprecated__ The functionality provided by this parameter has now been
11484 <.*?>
< table.height() ) {
<.*?><.*?> * superseded by that provided through `ajax`, which should be used instead.
11485 <.*?>
< table.height() ) {
<.*?><.*?> *
11486 <.*?>
< table.height() ) {
<.*?><.*?> * By default DataTables will look for the property `data` (or `aaData` for
11487 <.*?>
< table.height() ) {
<.*?><.*?> * compatibility with DataTables 1.9-) when obtaining data from an Ajax
11488 <.*?>
< table.height() ) {
<.*?><.*?> * source or for server-side processing - this parameter allows that
11489 <.*?>
< table.height() ) {
<.*?><.*?> * property to be changed. You can use Javascript dotted object notation to
11490 <.*?>
< table.height() ) {
<.*?><.*?> * get a data source for multiple levels of nesting.
11491 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11492 <.*?>
< table.height() ) {
<.*?><.*?> * @default data
11493 <.*?>
< table.height() ) {
<.*?><.*?> *
11494 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11495 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
11496 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.ajaxDataProp
11497 <.*?>
< table.height() ) {
<.*?><.*?> *
11498 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated 1.10. Please use `ajax` for this functionality now.
11499 <.*?>
< table.height() ) {
<.*?><.*?> */
11500 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxDataProp": "data",
11501  
11502  
11503 <.*?>
< table.height() ) {
<.*?><.*?> /**
11504 <.*?>
< table.height() ) {
<.*?><.*?> * __Deprecated__ The functionality provided by this parameter has now been
11505 <.*?>
< table.height() ) {
<.*?><.*?> * superseded by that provided through `ajax`, which should be used instead.
11506 <.*?>
< table.height() ) {
<.*?><.*?> *
11507 <.*?>
< table.height() ) {
<.*?><.*?> * You can instruct DataTables to load data from an external
11508 <.*?>
< table.height() ) {
<.*?><.*?> * source using this parameter (use aData if you want to pass data in you
11509 <.*?>
< table.height() ) {
<.*?><.*?> * already have). Simply provide a url a JSON object can be obtained from.
11510 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11511 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
11512 <.*?>
< table.height() ) {
<.*?><.*?> *
11513 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11514 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
11515 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.ajaxSource
11516 <.*?>
< table.height() ) {
<.*?><.*?> *
11517 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated 1.10. Please use `ajax` for this functionality now.
11518 <.*?>
< table.height() ) {
<.*?><.*?> */
11519 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxSource": null,
11520  
11521  
11522 <.*?>
< table.height() ) {
<.*?><.*?> /**
11523 <.*?>
< table.height() ) {
<.*?><.*?> * This initialisation variable allows you to specify exactly where in the
11524 <.*?>
< table.height() ) {
<.*?><.*?> * DOM you want DataTables to inject the various controls it adds to the page
11525 <.*?>
< table.height() ) {
<.*?><.*?> * (for example you might want the pagination controls at the top of the
11526 <.*?>
< table.height() ) {
<.*?><.*?> * table). DIV elements (with or without a custom class) can also be added to
11527 <.*?>
< table.height() ) {
<.*?><.*?> * aid styling. The follow syntax is used:
11528 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
11529 <.*?>
< table.height() ) {
<.*?><.*?> * <li>The following options are allowed:
11530 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
11531 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'l' - Length changing</li>
11532 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'f' - Filtering input</li>
11533 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'t' - The table!</li>
11534 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'i' - Information</li>
11535 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'p' - Pagination</li>
11536 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'r' - pRocessing</li>
11537 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
11538 <.*?>
< table.height() ) {
<.*?><.*?> * </li>
11539 <.*?>
< table.height() ) {
<.*?><.*?> * <li>The following constants are allowed:
11540 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
11541 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
11542 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
11543 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
11544 <.*?>
< table.height() ) {
<.*?><.*?> * </li>
11545 <.*?>
< table.height() ) {
<.*?><.*?> * <li>The following syntax is expected:
11546 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
11547 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'&lt;' and '&gt;' - div elements</li>
11548 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'&lt;"class" and '&gt;' - div with a class</li>
11549 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'&lt;"#id" and '&gt;' - div with an ID</li>
11550 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
11551 <.*?>
< table.height() ) {
<.*?><.*?> * </li>
11552 <.*?>
< table.height() ) {
<.*?><.*?> * <li>Examples:
11553 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
11554 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'&lt;"wrapper"flipt&gt;'</li>
11555 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
11556 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
11557 <.*?>
< table.height() ) {
<.*?><.*?> * </li>
11558 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
11559 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11560 <.*?>
< table.height() ) {
<.*?><.*?> * @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b>
11561 <.*?>
< table.height() ) {
<.*?><.*?> * <"H"lfr>t<"F"ip> <i>(when `jQueryUI` is true)</i>
11562 <.*?>
< table.height() ) {
<.*?><.*?> *
11563 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11564 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.dom
11565 <.*?>
< table.height() ) {
<.*?><.*?> *
11566 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11567 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11568 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11569 <.*?>
< table.height() ) {
<.*?><.*?> * "dom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
11570 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11571 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11572 <.*?>
< table.height() ) {
<.*?><.*?> */
11573 <.*?>
< table.height() ) {
<.*?><.*?> "sDom": "lfrtip",
11574  
11575  
11576 <.*?>
< table.height() ) {
<.*?><.*?> /**
11577 <.*?>
< table.height() ) {
<.*?><.*?> * Search delay option. This will throttle full table searches that use the
11578 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables provided search input element (it does not effect calls to
11579 <.*?>
< table.height() ) {
<.*?><.*?> * `dt-api search()`, providing a delay before the search is made.
11580 <.*?>
< table.height() ) {
<.*?><.*?> * @type integer
11581 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
11582 <.*?>
< table.height() ) {
<.*?><.*?> *
11583 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11584 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.searchDelay
11585 <.*?>
< table.height() ) {
<.*?><.*?> *
11586 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11587 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11588 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11589 <.*?>
< table.height() ) {
<.*?><.*?> * "searchDelay": 200
11590 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11591 <.*?>
< table.height() ) {
<.*?><.*?> * } )
11592 <.*?>
< table.height() ) {
<.*?><.*?> */
11593 <.*?>
< table.height() ) {
<.*?><.*?> "searchDelay": null,
11594  
11595  
11596 <.*?>
< table.height() ) {
<.*?><.*?> /**
11597 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables features four different built-in options for the buttons to
11598 <.*?>
< table.height() ) {
<.*?><.*?> * display for pagination control:
11599 <.*?>
< table.height() ) {
<.*?><.*?> *
11600 <.*?>
< table.height() ) {
<.*?><.*?> * * `simple` - 'Previous' and 'Next' buttons only
11601 <.*?>
< table.height() ) {
<.*?><.*?> * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
11602 <.*?>
< table.height() ) {
<.*?><.*?> * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons
11603 <.*?>
< table.height() ) {
<.*?><.*?> * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus
11604 <.*?>
< table.height() ) {
<.*?><.*?> * page numbers
11605 <.*?>
< table.height() ) {
<.*?><.*?> *
11606 <.*?>
< table.height() ) {
<.*?><.*?> * Further methods can be added using {@link DataTable.ext.oPagination}.
11607 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11608 <.*?>
< table.height() ) {
<.*?><.*?> * @default simple_numbers
11609 <.*?>
< table.height() ) {
<.*?><.*?> *
11610 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11611 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.pagingType
11612 <.*?>
< table.height() ) {
<.*?><.*?> *
11613 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11614 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11615 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11616 <.*?>
< table.height() ) {
<.*?><.*?> * "pagingType": "full_numbers"
11617 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11618 <.*?>
< table.height() ) {
<.*?><.*?> * } )
11619 <.*?>
< table.height() ) {
<.*?><.*?> */
11620 <.*?>
< table.height() ) {
<.*?><.*?> "sPaginationType": "simple_numbers",
11621  
11622  
11623 <.*?>
< table.height() ) {
<.*?><.*?> /**
11624 <.*?>
< table.height() ) {
<.*?><.*?> * Enable horizontal scrolling. When a table is too wide to fit into a
11625 <.*?>
< table.height() ) {
<.*?><.*?> * certain layout, or you have a large number of columns in the table, you
11626 <.*?>
< table.height() ) {
<.*?><.*?> * can enable x-scrolling to show the table in a viewport, which can be
11627 <.*?>
< table.height() ) {
<.*?><.*?> * scrolled. This property can be `true` which will allow the table to
11628 <.*?>
< table.height() ) {
<.*?><.*?> * scroll horizontally when needed, or any CSS unit, or a number (in which
11629 <.*?>
< table.height() ) {
<.*?><.*?> * case it will be treated as a pixel measurement). Setting as simply `true`
11630 <.*?>
< table.height() ) {
<.*?><.*?> * is recommended.
11631 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean|string
11632 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>blank string - i.e. disabled</i>
11633 <.*?>
< table.height() ) {
<.*?><.*?> *
11634 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
11635 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.scrollX
11636 <.*?>
< table.height() ) {
<.*?><.*?> *
11637 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11638 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11639 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11640 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollX": true,
11641 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollCollapse": true
11642 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11643 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11644 <.*?>
< table.height() ) {
<.*?><.*?> */
11645 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollX": "",
11646  
11647  
11648 <.*?>
< table.height() ) {
<.*?><.*?> /**
11649 <.*?>
< table.height() ) {
<.*?><.*?> * This property can be used to force a DataTable to use more width than it
11650 <.*?>
< table.height() ) {
<.*?><.*?> * might otherwise do when x-scrolling is enabled. For example if you have a
11651 <.*?>
< table.height() ) {
<.*?><.*?> * table which requires to be well spaced, this parameter is useful for
11652 <.*?>
< table.height() ) {
<.*?><.*?> * "over-sizing" the table, and thus forcing scrolling. This property can by
11653 <.*?>
< table.height() ) {
<.*?><.*?> * any CSS unit, or a number (in which case it will be treated as a pixel
11654 <.*?>
< table.height() ) {
<.*?><.*?> * measurement).
11655 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11656 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>blank string - i.e. disabled</i>
11657 <.*?>
< table.height() ) {
<.*?><.*?> *
11658 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11659 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.scrollXInner
11660 <.*?>
< table.height() ) {
<.*?><.*?> *
11661 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11662 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11663 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11664 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollX": "100%",
11665 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollXInner": "110%"
11666 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11667 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11668 <.*?>
< table.height() ) {
<.*?><.*?> */
11669 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollXInner": "",
11670  
11671  
11672 <.*?>
< table.height() ) {
<.*?><.*?> /**
11673 <.*?>
< table.height() ) {
<.*?><.*?> * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
11674 <.*?>
< table.height() ) {
<.*?><.*?> * to the given height, and enable scrolling for any data which overflows the
11675 <.*?>
< table.height() ) {
<.*?><.*?> * current viewport. This can be used as an alternative to paging to display
11676 <.*?>
< table.height() ) {
<.*?><.*?> * a lot of data in a small area (although paging and scrolling can both be
11677 <.*?>
< table.height() ) {
<.*?><.*?> * enabled at the same time). This property can be any CSS unit, or a number
11678 <.*?>
< table.height() ) {
<.*?><.*?> * (in which case it will be treated as a pixel measurement).
11679 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11680 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>blank string - i.e. disabled</i>
11681 <.*?>
< table.height() ) {
<.*?><.*?> *
11682 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Features
11683 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.scrollY
11684 <.*?>
< table.height() ) {
<.*?><.*?> *
11685 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11686 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11687 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11688 <.*?>
< table.height() ) {
<.*?><.*?> * "scrollY": "200px",
11689 <.*?>
< table.height() ) {
<.*?><.*?> * "paginate": false
11690 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11691 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11692 <.*?>
< table.height() ) {
<.*?><.*?> */
11693 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollY": "",
11694  
11695  
11696 <.*?>
< table.height() ) {
<.*?><.*?> /**
11697 <.*?>
< table.height() ) {
<.*?><.*?> * __Deprecated__ The functionality provided by this parameter has now been
11698 <.*?>
< table.height() ) {
<.*?><.*?> * superseded by that provided through `ajax`, which should be used instead.
11699 <.*?>
< table.height() ) {
<.*?><.*?> *
11700 <.*?>
< table.height() ) {
<.*?><.*?> * Set the HTTP method that is used to make the Ajax call for server-side
11701 <.*?>
< table.height() ) {
<.*?><.*?> * processing or Ajax sourced data.
11702 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
11703 <.*?>
< table.height() ) {
<.*?><.*?> * @default GET
11704 <.*?>
< table.height() ) {
<.*?><.*?> *
11705 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Options
11706 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Server-side
11707 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.serverMethod
11708 <.*?>
< table.height() ) {
<.*?><.*?> *
11709 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated 1.10. Please use `ajax` for this functionality now.
11710 <.*?>
< table.height() ) {
<.*?><.*?> */
11711 <.*?>
< table.height() ) {
<.*?><.*?> "sServerMethod": "GET",
11712  
11713  
11714 <.*?>
< table.height() ) {
<.*?><.*?> /**
11715 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables makes use of renderers when displaying HTML elements for
11716 <.*?>
< table.height() ) {
<.*?><.*?> * a table. These renderers can be added or modified by plug-ins to
11717 <.*?>
< table.height() ) {
<.*?><.*?> * generate suitable mark-up for a site. For example the Bootstrap
11718 <.*?>
< table.height() ) {
<.*?><.*?> * integration plug-in for DataTables uses a paging button renderer to
11719 <.*?>
< table.height() ) {
<.*?><.*?> * display pagination buttons in the mark-up required by Bootstrap.
11720 <.*?>
< table.height() ) {
<.*?><.*?> *
11721 <.*?>
< table.height() ) {
<.*?><.*?> * For further information about the renderers available see
11722 <.*?>
< table.height() ) {
<.*?><.*?> * DataTable.ext.renderer
11723 <.*?>
< table.height() ) {
<.*?><.*?> * @type string|object
11724 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
11725 <.*?>
< table.height() ) {
<.*?><.*?> *
11726 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.renderer
11727 <.*?>
< table.height() ) {
<.*?><.*?> *
11728 <.*?>
< table.height() ) {
<.*?><.*?> */
11729 <.*?>
< table.height() ) {
<.*?><.*?> "renderer": null
11730 <.*?>
< table.height() ) {
<.*?><.*?> };
11731  
11732 <.*?>
< table.height() ) {
<.*?><.*?> _fnHungarianMap( DataTable.defaults );
11733  
11734  
11735  
11736 <.*?>
< table.height() ) {
<.*?><.*?> /*
11737 <.*?>
< table.height() ) {
<.*?><.*?> * Developer note - See note in model.defaults.js about the use of Hungarian
11738 <.*?>
< table.height() ) {
<.*?><.*?> * notation and camel case.
11739 <.*?>
< table.height() ) {
<.*?><.*?> */
11740  
11741 <.*?>
< table.height() ) {
<.*?><.*?> /**
11742 <.*?>
< table.height() ) {
<.*?><.*?> * Column options that can be given to DataTables at initialisation time.
11743 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
11744 <.*?>
< table.height() ) {
<.*?><.*?> */
11745 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.defaults.column = {
11746 <.*?>
< table.height() ) {
<.*?><.*?> /**
11747 <.*?>
< table.height() ) {
<.*?><.*?> * Define which column(s) an order will occur on for this column. This
11748 <.*?>
< table.height() ) {
<.*?><.*?> * allows a column's ordering to take multiple columns into account when
11749 <.*?>
< table.height() ) {
<.*?><.*?> * doing a sort or use the data from a different column. For example first
11750 <.*?>
< table.height() ) {
<.*?><.*?> * name / last name columns make sense to do a multi-column sort over the
11751 <.*?>
< table.height() ) {
<.*?><.*?> * two columns.
11752 <.*?>
< table.height() ) {
<.*?><.*?> * @type array|int
11753 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Takes the value of the column index automatically</i>
11754 <.*?>
< table.height() ) {
<.*?><.*?> *
11755 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.orderData
11756 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11757 <.*?>
< table.height() ) {
<.*?><.*?> *
11758 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11759 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
11760 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11761 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11762 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
11763 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": [ 0, 1 ], "targets": [ 0 ] },
11764 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": [ 1, 0 ], "targets": [ 1 ] },
11765 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": 2, "targets": [ 2 ] }
11766 <.*?>
< table.height() ) {
<.*?><.*?> * ]
11767 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11768 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11769 <.*?>
< table.height() ) {
<.*?><.*?> *
11770 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11771 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
11772 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11773 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11774 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
11775 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": [ 0, 1 ] },
11776 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": [ 1, 0 ] },
11777 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderData": 2 },
11778 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11779 <.*?>
< table.height() ) {
<.*?><.*?> * null
11780 <.*?>
< table.height() ) {
<.*?><.*?> * ]
11781 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11782 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11783 <.*?>
< table.height() ) {
<.*?><.*?> */
11784 <.*?>
< table.height() ) {
<.*?><.*?> "aDataSort": null,
11785 <.*?>
< table.height() ) {
<.*?><.*?> "iDataSort": -1,
11786  
11787  
11788 <.*?>
< table.height() ) {
<.*?><.*?> /**
11789 <.*?>
< table.height() ) {
<.*?><.*?> * You can control the default ordering direction, and even alter the
11790 <.*?>
< table.height() ) {
<.*?><.*?> * behaviour of the sort handler (i.e. only allow ascending ordering etc)
11791 <.*?>
< table.height() ) {
<.*?><.*?> * using this parameter.
11792 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
11793 <.*?>
< table.height() ) {
<.*?><.*?> * @default [ 'asc', 'desc' ]
11794 <.*?>
< table.height() ) {
<.*?><.*?> *
11795 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.orderSequence
11796 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11797 <.*?>
< table.height() ) {
<.*?><.*?> *
11798 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11799 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
11800 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11801 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11802 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
11803 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "asc" ], "targets": [ 1 ] },
11804 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "desc", "asc", "asc" ], "targets": [ 2 ] },
11805 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "desc" ], "targets": [ 3 ] }
11806 <.*?>
< table.height() ) {
<.*?><.*?> * ]
11807 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11808 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11809 <.*?>
< table.height() ) {
<.*?><.*?> *
11810 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11811 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
11812 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11813 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11814 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
11815 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11816 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "asc" ] },
11817 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "desc", "asc", "asc" ] },
11818 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderSequence": [ "desc" ] },
11819 <.*?>
< table.height() ) {
<.*?><.*?> * null
11820 <.*?>
< table.height() ) {
<.*?><.*?> * ]
11821 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11822 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11823 <.*?>
< table.height() ) {
<.*?><.*?> */
11824 <.*?>
< table.height() ) {
<.*?><.*?> "asSorting": [ 'asc', 'desc' ],
11825  
11826  
11827 <.*?>
< table.height() ) {
<.*?><.*?> /**
11828 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable filtering on the data in this column.
11829 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
11830 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
11831 <.*?>
< table.height() ) {
<.*?><.*?> *
11832 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.searchable
11833 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11834 <.*?>
< table.height() ) {
<.*?><.*?> *
11835 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11836 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
11837 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11838 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11839 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
11840 <.*?>
< table.height() ) {
<.*?><.*?> * { "searchable": false, "targets": [ 0 ] }
11841 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11842 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11843 <.*?>
< table.height() ) {
<.*?><.*?> *
11844 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11845 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
11846 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11847 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11848 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
11849 <.*?>
< table.height() ) {
<.*?><.*?> * { "searchable": false },
11850 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11851 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11852 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11853 <.*?>
< table.height() ) {
<.*?><.*?> * null
11854 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11855 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11856 <.*?>
< table.height() ) {
<.*?><.*?> */
11857 <.*?>
< table.height() ) {
<.*?><.*?> "bSearchable": true,
11858  
11859  
11860 <.*?>
< table.height() ) {
<.*?><.*?> /**
11861 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable ordering on this column.
11862 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
11863 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
11864 <.*?>
< table.height() ) {
<.*?><.*?> *
11865 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.orderable
11866 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11867 <.*?>
< table.height() ) {
<.*?><.*?> *
11868 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11869 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
11870 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11871 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11872 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
11873 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderable": false, "targets": [ 0 ] }
11874 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11875 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11876 <.*?>
< table.height() ) {
<.*?><.*?> *
11877 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11878 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
11879 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11880 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11881 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
11882 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderable": false },
11883 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11884 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11885 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11886 <.*?>
< table.height() ) {
<.*?><.*?> * null
11887 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11888 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11889 <.*?>
< table.height() ) {
<.*?><.*?> */
11890 <.*?>
< table.height() ) {
<.*?><.*?> "bSortable": true,
11891  
11892  
11893 <.*?>
< table.height() ) {
<.*?><.*?> /**
11894 <.*?>
< table.height() ) {
<.*?><.*?> * Enable or disable the display of this column.
11895 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
11896 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
11897 <.*?>
< table.height() ) {
<.*?><.*?> *
11898 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.visible
11899 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11900 <.*?>
< table.height() ) {
<.*?><.*?> *
11901 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11902 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
11903 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11904 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11905 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
11906 <.*?>
< table.height() ) {
<.*?><.*?> * { "visible": false, "targets": [ 0 ] }
11907 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11908 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11909 <.*?>
< table.height() ) {
<.*?><.*?> *
11910 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11911 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
11912 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11913 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11914 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
11915 <.*?>
< table.height() ) {
<.*?><.*?> * { "visible": false },
11916 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11917 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11918 <.*?>
< table.height() ) {
<.*?><.*?> * null,
11919 <.*?>
< table.height() ) {
<.*?><.*?> * null
11920 <.*?>
< table.height() ) {
<.*?><.*?> * ] } );
11921 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11922 <.*?>
< table.height() ) {
<.*?><.*?> */
11923 <.*?>
< table.height() ) {
<.*?><.*?> "bVisible": true,
11924  
11925  
11926 <.*?>
< table.height() ) {
<.*?><.*?> /**
11927 <.*?>
< table.height() ) {
<.*?><.*?> * Developer definable function that is called whenever a cell is created (Ajax source,
11928 <.*?>
< table.height() ) {
<.*?><.*?> * etc) or processed for input (DOM source). This can be used as a compliment to mRender
11929 <.*?>
< table.height() ) {
<.*?><.*?> * allowing you to modify the DOM element (add background colour for example) when the
11930 <.*?>
< table.height() ) {
<.*?><.*?> * element is available.
11931 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
11932 <.*?>
< table.height() ) {
<.*?><.*?> * @param {element} td The TD node that has been created
11933 <.*?>
< table.height() ) {
<.*?><.*?> * @param {*} cellData The Data for the cell
11934 <.*?>
< table.height() ) {
<.*?><.*?> * @param {array|object} rowData The data for the whole row
11935 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} row The row index for the aoData data store
11936 <.*?>
< table.height() ) {
<.*?><.*?> * @param {int} col The column index for aoColumns
11937 <.*?>
< table.height() ) {
<.*?><.*?> *
11938 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.createdCell
11939 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
11940 <.*?>
< table.height() ) {
<.*?><.*?> *
11941 <.*?>
< table.height() ) {
<.*?><.*?> * @example
11942 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
11943 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
11944 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
11945 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [3],
11946 <.*?>
< table.height() ) {
<.*?><.*?> * "createdCell": function (td, cellData, rowData, row, col) {
11947 <.*?>
< table.height() ) {
<.*?><.*?> * if ( cellData == "1.7" ) {
11948 <.*?>
< table.height() ) {
<.*?><.*?> * $(td).css('color', 'blue')
11949 <.*?>
< table.height() ) {
<.*?><.*?> * }
11950 <.*?>
< table.height() ) {
<.*?><.*?> * }
11951 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
11952 <.*?>
< table.height() ) {
<.*?><.*?> * });
11953 <.*?>
< table.height() ) {
<.*?><.*?> * } );
11954 <.*?>
< table.height() ) {
<.*?><.*?> */
11955 <.*?>
< table.height() ) {
<.*?><.*?> "fnCreatedCell": null,
11956  
11957  
11958 <.*?>
< table.height() ) {
<.*?><.*?> /**
11959 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter has been replaced by `data` in DataTables to ensure naming
11960 <.*?>
< table.height() ) {
<.*?><.*?> * consistency. `dataProp` can still be used, as there is backwards
11961 <.*?>
< table.height() ) {
<.*?><.*?> * compatibility in DataTables for this option, but it is strongly
11962 <.*?>
< table.height() ) {
<.*?><.*?> * recommended that you use `data` in preference to `dataProp`.
11963 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.dataProp
11964 <.*?>
< table.height() ) {
<.*?><.*?> */
11965  
11966  
11967 <.*?>
< table.height() ) {
<.*?><.*?> /**
11968 <.*?>
< table.height() ) {
<.*?><.*?> * This property can be used to read data from any data source property,
11969 <.*?>
< table.height() ) {
<.*?><.*?> * including deeply nested objects / properties. `data` can be given in a
11970 <.*?>
< table.height() ) {
<.*?><.*?> * number of different ways which effect its behaviour:
11971 <.*?>
< table.height() ) {
<.*?><.*?> *
11972 <.*?>
< table.height() ) {
<.*?><.*?> * * `integer` - treated as an array index for the data source. This is the
11973 <.*?>
< table.height() ) {
<.*?><.*?> * default that DataTables uses (incrementally increased for each column).
11974 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - read an object property from the data source. There are
11975 <.*?>
< table.height() ) {
<.*?><.*?> * three 'special' options that can be used in the string to alter how
11976 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables reads the data from the source object:
11977 <.*?>
< table.height() ) {
<.*?><.*?> * * `.` - Dotted Javascript notation. Just as you use a `.` in
11978 <.*?>
< table.height() ) {
<.*?><.*?> * Javascript to read from nested objects, so to can the options
11979 <.*?>
< table.height() ) {
<.*?><.*?> * specified in `data`. For example: `browser.version` or
11980 <.*?>
< table.height() ) {
<.*?><.*?> * `browser.name`. If your object parameter name contains a period, use
11981 <.*?>
< table.height() ) {
<.*?><.*?> * `\\` to escape it - i.e. `first\\.name`.
11982 <.*?>
< table.height() ) {
<.*?><.*?> * * `[]` - Array notation. DataTables can automatically combine data
11983 <.*?>
< table.height() ) {
<.*?><.*?> * from and array source, joining the data with the characters provided
11984 <.*?>
< table.height() ) {
<.*?><.*?> * between the two brackets. For example: `name[, ]` would provide a
11985 <.*?>
< table.height() ) {
<.*?><.*?> * comma-space separated list from the source array. If no characters
11986 <.*?>
< table.height() ) {
<.*?><.*?> * are provided between the brackets, the original array source is
11987 <.*?>
< table.height() ) {
<.*?><.*?> * returned.
11988 <.*?>
< table.height() ) {
<.*?><.*?> * * `()` - Function notation. Adding `()` to the end of a parameter will
11989 <.*?>
< table.height() ) {
<.*?><.*?> * execute a function of the name given. For example: `browser()` for a
11990 <.*?>
< table.height() ) {
<.*?><.*?> * simple function on the data source, `browser.version()` for a
11991 <.*?>
< table.height() ) {
<.*?><.*?> * function in a nested property or even `browser().version` to get an
11992 <.*?>
< table.height() ) {
<.*?><.*?> * object property if the function called returns an object. Note that
11993 <.*?>
< table.height() ) {
<.*?><.*?> * function notation is recommended for use in `render` rather than
11994 <.*?>
< table.height() ) {
<.*?><.*?> * `data` as it is much simpler to use as a renderer.
11995 <.*?>
< table.height() ) {
<.*?><.*?> * * `null` - use the original data source for the row rather than plucking
11996 <.*?>
< table.height() ) {
<.*?><.*?> * data directly from it. This action has effects on two other
11997 <.*?>
< table.height() ) {
<.*?><.*?> * initialisation options:
11998 <.*?>
< table.height() ) {
<.*?><.*?> * * `defaultContent` - When null is given as the `data` option and
11999 <.*?>
< table.height() ) {
<.*?><.*?> * `defaultContent` is specified for the column, the value defined by
12000 <.*?>
< table.height() ) {
<.*?><.*?> * `defaultContent` will be used for the cell.
12001 <.*?>
< table.height() ) {
<.*?><.*?> * * `render` - When null is used for the `data` option and the `render`
12002 <.*?>
< table.height() ) {
<.*?><.*?> * option is specified for the column, the whole data source for the
12003 <.*?>
< table.height() ) {
<.*?><.*?> * row is used for the renderer.
12004 <.*?>
< table.height() ) {
<.*?><.*?> * * `function` - the function given will be executed whenever DataTables
12005 <.*?>
< table.height() ) {
<.*?><.*?> * needs to set or get the data for a cell in the column. The function
12006 <.*?>
< table.height() ) {
<.*?><.*?> * takes three parameters:
12007 <.*?>
< table.height() ) {
<.*?><.*?> * * Parameters:
12008 <.*?>
< table.height() ) {
<.*?><.*?> * * `{array|object}` The data source for the row
12009 <.*?>
< table.height() ) {
<.*?><.*?> * * `{string}` The type call data requested - this will be 'set' when
12010 <.*?>
< table.height() ) {
<.*?><.*?> * setting data or 'filter', 'display', 'type', 'sort' or undefined
12011 <.*?>
< table.height() ) {
<.*?><.*?> * when gathering data. Note that when `undefined` is given for the
12012 <.*?>
< table.height() ) {
<.*?><.*?> * type DataTables expects to get the raw data for the object back<
12013 <.*?>
< table.height() ) {
<.*?><.*?> * * `{*}` Data to set when the second parameter is 'set'.
12014 <.*?>
< table.height() ) {
<.*?><.*?> * * Return:
12015 <.*?>
< table.height() ) {
<.*?><.*?> * * The return value from the function is not required when 'set' is
12016 <.*?>
< table.height() ) {
<.*?><.*?> * the type of call, but otherwise the return is what will be used
12017 <.*?>
< table.height() ) {
<.*?><.*?> * for the data requested.
12018 <.*?>
< table.height() ) {
<.*?><.*?> *
12019 <.*?>
< table.height() ) {
<.*?><.*?> * Note that `data` is a getter and setter option. If you just require
12020 <.*?>
< table.height() ) {
<.*?><.*?> * formatting of data for output, you will likely want to use `render` which
12021 <.*?>
< table.height() ) {
<.*?><.*?> * is simply a getter and thus simpler to use.
12022 <.*?>
< table.height() ) {
<.*?><.*?> *
12023 <.*?>
< table.height() ) {
<.*?><.*?> * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The
12024 <.*?>
< table.height() ) {
<.*?><.*?> * name change reflects the flexibility of this property and is consistent
12025 <.*?>
< table.height() ) {
<.*?><.*?> * with the naming of mRender. If 'mDataProp' is given, then it will still
12026 <.*?>
< table.height() ) {
<.*?><.*?> * be used by DataTables, as it automatically maps the old name to the new
12027 <.*?>
< table.height() ) {
<.*?><.*?> * if required.
12028 <.*?>
< table.height() ) {
<.*?><.*?> *
12029 <.*?>
< table.height() ) {
<.*?><.*?> * @type string|int|function|null
12030 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Use automatically calculated column index</i>
12031 <.*?>
< table.height() ) {
<.*?><.*?> *
12032 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.data
12033 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12034 <.*?>
< table.height() ) {
<.*?><.*?> *
12035 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12036 <.*?>
< table.height() ) {
<.*?><.*?> * // Read table data from objects
12037 <.*?>
< table.height() ) {
<.*?><.*?> * // JSON structure for each row:
12038 <.*?>
< table.height() ) {
<.*?><.*?> * // {
12039 <.*?>
< table.height() ) {
<.*?><.*?> * // "engine": {value},
12040 <.*?>
< table.height() ) {
<.*?><.*?> * // "browser": {value},
12041 <.*?>
< table.height() ) {
<.*?><.*?> * // "platform": {value},
12042 <.*?>
< table.height() ) {
<.*?><.*?> * // "version": {value},
12043 <.*?>
< table.height() ) {
<.*?><.*?> * // "grade": {value}
12044 <.*?>
< table.height() ) {
<.*?><.*?> * // }
12045 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12046 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12047 <.*?>
< table.height() ) {
<.*?><.*?> * "ajaxSource": "sources/objects.txt",
12048 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12049 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "engine" },
12050 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "browser" },
12051 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "platform" },
12052 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "version" },
12053 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "grade" }
12054 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12055 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12056 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12057 <.*?>
< table.height() ) {
<.*?><.*?> *
12058 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12059 <.*?>
< table.height() ) {
<.*?><.*?> * // Read information from deeply nested objects
12060 <.*?>
< table.height() ) {
<.*?><.*?> * // JSON structure for each row:
12061 <.*?>
< table.height() ) {
<.*?><.*?> * // {
12062 <.*?>
< table.height() ) {
<.*?><.*?> * // "engine": {value},
12063 <.*?>
< table.height() ) {
<.*?><.*?> * // "browser": {value},
12064 <.*?>
< table.height() ) {
<.*?><.*?> * // "platform": {
12065 <.*?>
< table.height() ) {
<.*?><.*?> * // "inner": {value}
12066 <.*?>
< table.height() ) {
<.*?><.*?> * // },
12067 <.*?>
< table.height() ) {
<.*?><.*?> * // "details": [
12068 <.*?>
< table.height() ) {
<.*?><.*?> * // {value}, {value}
12069 <.*?>
< table.height() ) {
<.*?><.*?> * // ]
12070 <.*?>
< table.height() ) {
<.*?><.*?> * // }
12071 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12072 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12073 <.*?>
< table.height() ) {
<.*?><.*?> * "ajaxSource": "sources/deep.txt",
12074 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12075 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "engine" },
12076 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "browser" },
12077 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "platform.inner" },
12078 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "platform.details.0" },
12079 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "platform.details.1" }
12080 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12081 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12082 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12083 <.*?>
< table.height() ) {
<.*?><.*?> *
12084 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12085 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `data` as a function to provide different information for
12086 <.*?>
< table.height() ) {
<.*?><.*?> * // sorting, filtering and display. In this case, currency (price)
12087 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12088 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12089 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12090 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12091 <.*?>
< table.height() ) {
<.*?><.*?> * "data": function ( source, type, val ) {
12092 <.*?>
< table.height() ) {
<.*?><.*?> * if (type === 'set') {
12093 <.*?>
< table.height() ) {
<.*?><.*?> * source.price = val;
12094 <.*?>
< table.height() ) {
<.*?><.*?> * // Store the computed dislay and filter values for efficiency
12095 <.*?>
< table.height() ) {
<.*?><.*?> * source.price_display = val=="" ? "" : "$"+numberFormat(val);
12096 <.*?>
< table.height() ) {
<.*?><.*?> * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
12097 <.*?>
< table.height() ) {
<.*?><.*?> * return;
12098 <.*?>
< table.height() ) {
<.*?><.*?> * }
12099 <.*?>
< table.height() ) {
<.*?><.*?> * else if (type === 'display') {
12100 <.*?>
< table.height() ) {
<.*?><.*?> * return source.price_display;
12101 <.*?>
< table.height() ) {
<.*?><.*?> * }
12102 <.*?>
< table.height() ) {
<.*?><.*?> * else if (type === 'filter') {
12103 <.*?>
< table.height() ) {
<.*?><.*?> * return source.price_filter;
12104 <.*?>
< table.height() ) {
<.*?><.*?> * }
12105 <.*?>
< table.height() ) {
<.*?><.*?> * // 'sort', 'type' and undefined all just use the integer
12106 <.*?>
< table.height() ) {
<.*?><.*?> * return source.price;
12107 <.*?>
< table.height() ) {
<.*?><.*?> * }
12108 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12109 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12110 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12111 <.*?>
< table.height() ) {
<.*?><.*?> *
12112 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12113 <.*?>
< table.height() ) {
<.*?><.*?> * // Using default content
12114 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12115 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12116 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12117 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12118 <.*?>
< table.height() ) {
<.*?><.*?> * "data": null,
12119 <.*?>
< table.height() ) {
<.*?><.*?> * "defaultContent": "Click to edit"
12120 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12121 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12122 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12123 <.*?>
< table.height() ) {
<.*?><.*?> *
12124 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12125 <.*?>
< table.height() ) {
<.*?><.*?> * // Using array notation - outputting a list from an array
12126 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12127 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12128 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12129 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12130 <.*?>
< table.height() ) {
<.*?><.*?> * "data": "name[, ]"
12131 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12132 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12133 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12134 <.*?>
< table.height() ) {
<.*?><.*?> *
12135 <.*?>
< table.height() ) {
<.*?><.*?> */
12136 <.*?>
< table.height() ) {
<.*?><.*?> "mData": null,
12137  
12138  
12139 <.*?>
< table.height() ) {
<.*?><.*?> /**
12140 <.*?>
< table.height() ) {
<.*?><.*?> * This property is the rendering partner to `data` and it is suggested that
12141 <.*?>
< table.height() ) {
<.*?><.*?> * when you want to manipulate data for display (including filtering,
12142 <.*?>
< table.height() ) {
<.*?><.*?> * sorting etc) without altering the underlying data for the table, use this
12143 <.*?>
< table.height() ) {
<.*?><.*?> * property. `render` can be considered to be the the read only companion to
12144 <.*?>
< table.height() ) {
<.*?><.*?> * `data` which is read / write (then as such more complex). Like `data`
12145 <.*?>
< table.height() ) {
<.*?><.*?> * this option can be given in a number of different ways to effect its
12146 <.*?>
< table.height() ) {
<.*?><.*?> * behaviour:
12147 <.*?>
< table.height() ) {
<.*?><.*?> *
12148 <.*?>
< table.height() ) {
<.*?><.*?> * * `integer` - treated as an array index for the data source. This is the
12149 <.*?>
< table.height() ) {
<.*?><.*?> * default that DataTables uses (incrementally increased for each column).
12150 <.*?>
< table.height() ) {
<.*?><.*?> * * `string` - read an object property from the data source. There are
12151 <.*?>
< table.height() ) {
<.*?><.*?> * three 'special' options that can be used in the string to alter how
12152 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables reads the data from the source object:
12153 <.*?>
< table.height() ) {
<.*?><.*?> * * `.` - Dotted Javascript notation. Just as you use a `.` in
12154 <.*?>
< table.height() ) {
<.*?><.*?> * Javascript to read from nested objects, so to can the options
12155 <.*?>
< table.height() ) {
<.*?><.*?> * specified in `data`. For example: `browser.version` or
12156 <.*?>
< table.height() ) {
<.*?><.*?> * `browser.name`. If your object parameter name contains a period, use
12157 <.*?>
< table.height() ) {
<.*?><.*?> * `\\` to escape it - i.e. `first\\.name`.
12158 <.*?>
< table.height() ) {
<.*?><.*?> * * `[]` - Array notation. DataTables can automatically combine data
12159 <.*?>
< table.height() ) {
<.*?><.*?> * from and array source, joining the data with the characters provided
12160 <.*?>
< table.height() ) {
<.*?><.*?> * between the two brackets. For example: `name[, ]` would provide a
12161 <.*?>
< table.height() ) {
<.*?><.*?> * comma-space separated list from the source array. If no characters
12162 <.*?>
< table.height() ) {
<.*?><.*?> * are provided between the brackets, the original array source is
12163 <.*?>
< table.height() ) {
<.*?><.*?> * returned.
12164 <.*?>
< table.height() ) {
<.*?><.*?> * * `()` - Function notation. Adding `()` to the end of a parameter will
12165 <.*?>
< table.height() ) {
<.*?><.*?> * execute a function of the name given. For example: `browser()` for a
12166 <.*?>
< table.height() ) {
<.*?><.*?> * simple function on the data source, `browser.version()` for a
12167 <.*?>
< table.height() ) {
<.*?><.*?> * function in a nested property or even `browser().version` to get an
12168 <.*?>
< table.height() ) {
<.*?><.*?> * object property if the function called returns an object.
12169 <.*?>
< table.height() ) {
<.*?><.*?> * * `object` - use different data for the different data types requested by
12170 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables ('filter', 'display', 'type' or 'sort'). The property names
12171 <.*?>
< table.height() ) {
<.*?><.*?> * of the object is the data type the property refers to and the value can
12172 <.*?>
< table.height() ) {
<.*?><.*?> * defined using an integer, string or function using the same rules as
12173 <.*?>
< table.height() ) {
<.*?><.*?> * `render` normally does. Note that an `_` option _must_ be specified.
12174 <.*?>
< table.height() ) {
<.*?><.*?> * This is the default value to use if you haven't specified a value for
12175 <.*?>
< table.height() ) {
<.*?><.*?> * the data type requested by DataTables.
12176 <.*?>
< table.height() ) {
<.*?><.*?> * * `function` - the function given will be executed whenever DataTables
12177 <.*?>
< table.height() ) {
<.*?><.*?> * needs to set or get the data for a cell in the column. The function
12178 <.*?>
< table.height() ) {
<.*?><.*?> * takes three parameters:
12179 <.*?>
< table.height() ) {
<.*?><.*?> * * Parameters:
12180 <.*?>
< table.height() ) {
<.*?><.*?> * * {array|object} The data source for the row (based on `data`)
12181 <.*?>
< table.height() ) {
<.*?><.*?> * * {string} The type call data requested - this will be 'filter',
12182 <.*?>
< table.height() ) {
<.*?><.*?> * 'display', 'type' or 'sort'.
12183 <.*?>
< table.height() ) {
<.*?><.*?> * * {array|object} The full data source for the row (not based on
12184 <.*?>
< table.height() ) {
<.*?><.*?> * `data`)
12185 <.*?>
< table.height() ) {
<.*?><.*?> * * Return:
12186 <.*?>
< table.height() ) {
<.*?><.*?> * * The return value from the function is what will be used for the
12187 <.*?>
< table.height() ) {
<.*?><.*?> * data requested.
12188 <.*?>
< table.height() ) {
<.*?><.*?> *
12189 <.*?>
< table.height() ) {
<.*?><.*?> * @type string|int|function|object|null
12190 <.*?>
< table.height() ) {
<.*?><.*?> * @default null Use the data source value.
12191 <.*?>
< table.height() ) {
<.*?><.*?> *
12192 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.render
12193 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12194 <.*?>
< table.height() ) {
<.*?><.*?> *
12195 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12196 <.*?>
< table.height() ) {
<.*?><.*?> * // Create a comma separated list from an array of objects
12197 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12198 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12199 <.*?>
< table.height() ) {
<.*?><.*?> * "ajaxSource": "sources/deep.txt",
12200 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12201 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "engine" },
12202 <.*?>
< table.height() ) {
<.*?><.*?> * { "data": "browser" },
12203 <.*?>
< table.height() ) {
<.*?><.*?> * {
12204 <.*?>
< table.height() ) {
<.*?><.*?> * "data": "platform",
12205 <.*?>
< table.height() ) {
<.*?><.*?> * "render": "[, ].name"
12206 <.*?>
< table.height() ) {
<.*?><.*?> * }
12207 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12208 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12209 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12210 <.*?>
< table.height() ) {
<.*?><.*?> *
12211 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12212 <.*?>
< table.height() ) {
<.*?><.*?> * // Execute a function to obtain data
12213 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12214 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12215 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12216 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12217 <.*?>
< table.height() ) {
<.*?><.*?> * "data": null, // Use the full data source object for the renderer's source
12218 <.*?>
< table.height() ) {
<.*?><.*?> * "render": "browserName()"
12219 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12220 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12221 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12222 <.*?>
< table.height() ) {
<.*?><.*?> *
12223 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12224 <.*?>
< table.height() ) {
<.*?><.*?> * // As an object, extracting different data for the different types
12225 <.*?>
< table.height() ) {
<.*?><.*?> * // This would be used with a data source such as:
12226 <.*?>
< table.height() ) {
<.*?><.*?> * // { "phone": 5552368, "phone_filter": "5552368 555-2368", "phone_display": "555-2368" }
12227 <.*?>
< table.height() ) {
<.*?><.*?> * // Here the `phone` integer is used for sorting and type detection, while `phone_filter`
12228 <.*?>
< table.height() ) {
<.*?><.*?> * // (which has both forms) is used for filtering for if a user inputs either format, while
12229 <.*?>
< table.height() ) {
<.*?><.*?> * // the formatted phone number is the one that is shown in the table.
12230 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12231 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12232 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12233 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12234 <.*?>
< table.height() ) {
<.*?><.*?> * "data": null, // Use the full data source object for the renderer's source
12235 <.*?>
< table.height() ) {
<.*?><.*?> * "render": {
12236 <.*?>
< table.height() ) {
<.*?><.*?> * "_": "phone",
12237 <.*?>
< table.height() ) {
<.*?><.*?> * "filter": "phone_filter",
12238 <.*?>
< table.height() ) {
<.*?><.*?> * "display": "phone_display"
12239 <.*?>
< table.height() ) {
<.*?><.*?> * }
12240 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12241 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12242 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12243 <.*?>
< table.height() ) {
<.*?><.*?> *
12244 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12245 <.*?>
< table.height() ) {
<.*?><.*?> * // Use as a function to create a link from the data source
12246 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12247 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12248 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12249 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12250 <.*?>
< table.height() ) {
<.*?><.*?> * "data": "download_link",
12251 <.*?>
< table.height() ) {
<.*?><.*?> * "render": function ( data, type, full ) {
12252 <.*?>
< table.height() ) {
<.*?><.*?> * return '<a href="'+data+'">Download</a>';
12253 <.*?>
< table.height() ) {
<.*?><.*?> * }
12254 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12255 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12256 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12257 <.*?>
< table.height() ) {
<.*?><.*?> */
12258 <.*?>
< table.height() ) {
<.*?><.*?> "mRender": null,
12259  
12260  
12261 <.*?>
< table.height() ) {
<.*?><.*?> /**
12262 <.*?>
< table.height() ) {
<.*?><.*?> * Change the cell type created for the column - either TD cells or TH cells. This
12263 <.*?>
< table.height() ) {
<.*?><.*?> * can be useful as TH cells have semantic meaning in the table body, allowing them
12264 <.*?>
< table.height() ) {
<.*?><.*?> * to act as a header for a row (you may wish to add scope='row' to the TH elements).
12265 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12266 <.*?>
< table.height() ) {
<.*?><.*?> * @default td
12267 <.*?>
< table.height() ) {
<.*?><.*?> *
12268 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.cellType
12269 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12270 <.*?>
< table.height() ) {
<.*?><.*?> *
12271 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12272 <.*?>
< table.height() ) {
<.*?><.*?> * // Make the first column use TH cells
12273 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12274 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12275 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [ {
12276 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ 0 ],
12277 <.*?>
< table.height() ) {
<.*?><.*?> * "cellType": "th"
12278 <.*?>
< table.height() ) {
<.*?><.*?> * } ]
12279 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12280 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12281 <.*?>
< table.height() ) {
<.*?><.*?> */
12282 <.*?>
< table.height() ) {
<.*?><.*?> "sCellType": "td",
12283  
12284  
12285 <.*?>
< table.height() ) {
<.*?><.*?> /**
12286 <.*?>
< table.height() ) {
<.*?><.*?> * Class to give to each cell in this column.
12287 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12288 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
12289 <.*?>
< table.height() ) {
<.*?><.*?> *
12290 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.class
12291 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12292 <.*?>
< table.height() ) {
<.*?><.*?> *
12293 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12294 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12295 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12296 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12297 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12298 <.*?>
< table.height() ) {
<.*?><.*?> * { "class": "my_class", "targets": [ 0 ] }
12299 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12300 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12301 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12302 <.*?>
< table.height() ) {
<.*?><.*?> *
12303 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12304 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12305 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12306 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12307 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12308 <.*?>
< table.height() ) {
<.*?><.*?> * { "class": "my_class" },
12309 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12310 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12311 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12312 <.*?>
< table.height() ) {
<.*?><.*?> * null
12313 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12314 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12315 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12316 <.*?>
< table.height() ) {
<.*?><.*?> */
12317 <.*?>
< table.height() ) {
<.*?><.*?> "sClass": "",
12318  
12319 <.*?>
< table.height() ) {
<.*?><.*?> /**
12320 <.*?>
< table.height() ) {
<.*?><.*?> * When DataTables calculates the column widths to assign to each column,
12321 <.*?>
< table.height() ) {
<.*?><.*?> * it finds the longest string in each column and then constructs a
12322 <.*?>
< table.height() ) {
<.*?><.*?> * temporary table and reads the widths from that. The problem with this
12323 <.*?>
< table.height() ) {
<.*?><.*?> * is that "mmm" is much wider then "iiii", but the latter is a longer
12324 <.*?>
< table.height() ) {
<.*?><.*?> * string - thus the calculation can go wrong (doing it properly and putting
12325 <.*?>
< table.height() ) {
<.*?><.*?> * it into an DOM object and measuring that is horribly(!) slow). Thus as
12326 <.*?>
< table.height() ) {
<.*?><.*?> * a "work around" we provide this option. It will append its value to the
12327 <.*?>
< table.height() ) {
<.*?><.*?> * text that is found to be the longest string for the column - i.e. padding.
12328 <.*?>
< table.height() ) {
<.*?><.*?> * Generally you shouldn't need this!
12329 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12330 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string<i>
12331 <.*?>
< table.height() ) {
<.*?><.*?> *
12332 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.contentPadding
12333 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12334 <.*?>
< table.height() ) {
<.*?><.*?> *
12335 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12336 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12337 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12338 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12339 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12340 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12341 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12342 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12343 <.*?>
< table.height() ) {
<.*?><.*?> * {
12344 <.*?>
< table.height() ) {
<.*?><.*?> * "contentPadding": "mmm"
12345 <.*?>
< table.height() ) {
<.*?><.*?> * }
12346 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12347 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12348 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12349 <.*?>
< table.height() ) {
<.*?><.*?> */
12350 <.*?>
< table.height() ) {
<.*?><.*?> "sContentPadding": "",
12351  
12352  
12353 <.*?>
< table.height() ) {
<.*?><.*?> /**
12354 <.*?>
< table.height() ) {
<.*?><.*?> * Allows a default value to be given for a column's data, and will be used
12355 <.*?>
< table.height() ) {
<.*?><.*?> * whenever a null data source is encountered (this can be because `data`
12356 <.*?>
< table.height() ) {
<.*?><.*?> * is set to null, or because the data source itself is null).
12357 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12358 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
12359 <.*?>
< table.height() ) {
<.*?><.*?> *
12360 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.defaultContent
12361 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12362 <.*?>
< table.height() ) {
<.*?><.*?> *
12363 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12364 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12365 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12366 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12367 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12368 <.*?>
< table.height() ) {
<.*?><.*?> * {
12369 <.*?>
< table.height() ) {
<.*?><.*?> * "data": null,
12370 <.*?>
< table.height() ) {
<.*?><.*?> * "defaultContent": "Edit",
12371 <.*?>
< table.height() ) {
<.*?><.*?> * "targets": [ -1 ]
12372 <.*?>
< table.height() ) {
<.*?><.*?> * }
12373 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12374 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12375 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12376 <.*?>
< table.height() ) {
<.*?><.*?> *
12377 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12378 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12379 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12380 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12381 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12382 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12383 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12384 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12385 <.*?>
< table.height() ) {
<.*?><.*?> * {
12386 <.*?>
< table.height() ) {
<.*?><.*?> * "data": null,
12387 <.*?>
< table.height() ) {
<.*?><.*?> * "defaultContent": "Edit"
12388 <.*?>
< table.height() ) {
<.*?><.*?> * }
12389 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12390 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12391 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12392 <.*?>
< table.height() ) {
<.*?><.*?> */
12393 <.*?>
< table.height() ) {
<.*?><.*?> "sDefaultContent": null,
12394  
12395  
12396 <.*?>
< table.height() ) {
<.*?><.*?> /**
12397 <.*?>
< table.height() ) {
<.*?><.*?> * This parameter is only used in DataTables' server-side processing. It can
12398 <.*?>
< table.height() ) {
<.*?><.*?> * be exceptionally useful to know what columns are being displayed on the
12399 <.*?>
< table.height() ) {
<.*?><.*?> * client side, and to map these to database fields. When defined, the names
12400 <.*?>
< table.height() ) {
<.*?><.*?> * also allow DataTables to reorder information from the server if it comes
12401 <.*?>
< table.height() ) {
<.*?><.*?> * back in an unexpected order (i.e. if you switch your columns around on the
12402 <.*?>
< table.height() ) {
<.*?><.*?> * client-side, your server-side code does not also need updating).
12403 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12404 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
12405 <.*?>
< table.height() ) {
<.*?><.*?> *
12406 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.name
12407 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12408 <.*?>
< table.height() ) {
<.*?><.*?> *
12409 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12410 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12411 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12412 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12413 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12414 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "engine", "targets": [ 0 ] },
12415 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "browser", "targets": [ 1 ] },
12416 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "platform", "targets": [ 2 ] },
12417 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "version", "targets": [ 3 ] },
12418 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "grade", "targets": [ 4 ] }
12419 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12420 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12421 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12422 <.*?>
< table.height() ) {
<.*?><.*?> *
12423 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12424 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12425 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12426 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12427 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12428 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "engine" },
12429 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "browser" },
12430 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "platform" },
12431 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "version" },
12432 <.*?>
< table.height() ) {
<.*?><.*?> * { "name": "grade" }
12433 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12434 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12435 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12436 <.*?>
< table.height() ) {
<.*?><.*?> */
12437 <.*?>
< table.height() ) {
<.*?><.*?> "sName": "",
12438  
12439  
12440 <.*?>
< table.height() ) {
<.*?><.*?> /**
12441 <.*?>
< table.height() ) {
<.*?><.*?> * Defines a data source type for the ordering which can be used to read
12442 <.*?>
< table.height() ) {
<.*?><.*?> * real-time information from the table (updating the internally cached
12443 <.*?>
< table.height() ) {
<.*?><.*?> * version) prior to ordering. This allows ordering to occur on user
12444 <.*?>
< table.height() ) {
<.*?><.*?> * editable elements such as form inputs.
12445 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12446 <.*?>
< table.height() ) {
<.*?><.*?> * @default std
12447 <.*?>
< table.height() ) {
<.*?><.*?> *
12448 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.orderDataType
12449 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12450 <.*?>
< table.height() ) {
<.*?><.*?> *
12451 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12452 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12453 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12454 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12455 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12456 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-text", "targets": [ 2, 3 ] },
12457 <.*?>
< table.height() ) {
<.*?><.*?> * { "type": "numeric", "targets": [ 3 ] },
12458 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-select", "targets": [ 4 ] },
12459 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-checkbox", "targets": [ 5 ] }
12460 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12461 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12462 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12463 <.*?>
< table.height() ) {
<.*?><.*?> *
12464 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12465 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12466 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12467 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12468 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12469 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12470 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12471 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-text" },
12472 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-text", "type": "numeric" },
12473 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-select" },
12474 <.*?>
< table.height() ) {
<.*?><.*?> * { "orderDataType": "dom-checkbox" }
12475 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12476 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12477 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12478 <.*?>
< table.height() ) {
<.*?><.*?> */
12479 <.*?>
< table.height() ) {
<.*?><.*?> "sSortDataType": "std",
12480  
12481  
12482 <.*?>
< table.height() ) {
<.*?><.*?> /**
12483 <.*?>
< table.height() ) {
<.*?><.*?> * The title of this column.
12484 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12485 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Derived from the 'TH' value for this column in the
12486 <.*?>
< table.height() ) {
<.*?><.*?> * original HTML table.</i>
12487 <.*?>
< table.height() ) {
<.*?><.*?> *
12488 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.title
12489 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12490 <.*?>
< table.height() ) {
<.*?><.*?> *
12491 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12492 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12493 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12494 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12495 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12496 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "My column title", "targets": [ 0 ] }
12497 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12498 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12499 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12500 <.*?>
< table.height() ) {
<.*?><.*?> *
12501 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12502 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12503 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12504 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12505 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12506 <.*?>
< table.height() ) {
<.*?><.*?> * { "title": "My column title" },
12507 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12508 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12509 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12510 <.*?>
< table.height() ) {
<.*?><.*?> * null
12511 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12512 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12513 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12514 <.*?>
< table.height() ) {
<.*?><.*?> */
12515 <.*?>
< table.height() ) {
<.*?><.*?> "sTitle": null,
12516  
12517  
12518 <.*?>
< table.height() ) {
<.*?><.*?> /**
12519 <.*?>
< table.height() ) {
<.*?><.*?> * The type allows you to specify how the data for this column will be
12520 <.*?>
< table.height() ) {
<.*?><.*?> * ordered. Four types (string, numeric, date and html (which will strip
12521 <.*?>
< table.height() ) {
<.*?><.*?> * HTML tags before ordering)) are currently available. Note that only date
12522 <.*?>
< table.height() ) {
<.*?><.*?> * formats understood by Javascript's Date() object will be accepted as type
12523 <.*?>
< table.height() ) {
<.*?><.*?> * date. For example: "Mar 26, 2008 5:03 PM". May take the values: 'string',
12524 <.*?>
< table.height() ) {
<.*?><.*?> * 'numeric', 'date' or 'html' (by default). Further types can be adding
12525 <.*?>
< table.height() ) {
<.*?><.*?> * through plug-ins.
12526 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12527 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Auto-detected from raw data</i>
12528 <.*?>
< table.height() ) {
<.*?><.*?> *
12529 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.type
12530 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12531 <.*?>
< table.height() ) {
<.*?><.*?> *
12532 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12533 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12534 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12535 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12536 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12537 <.*?>
< table.height() ) {
<.*?><.*?> * { "type": "html", "targets": [ 0 ] }
12538 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12539 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12540 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12541 <.*?>
< table.height() ) {
<.*?><.*?> *
12542 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12543 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12544 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12545 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12546 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12547 <.*?>
< table.height() ) {
<.*?><.*?> * { "type": "html" },
12548 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12549 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12550 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12551 <.*?>
< table.height() ) {
<.*?><.*?> * null
12552 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12553 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12554 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12555 <.*?>
< table.height() ) {
<.*?><.*?> */
12556 <.*?>
< table.height() ) {
<.*?><.*?> "sType": null,
12557  
12558  
12559 <.*?>
< table.height() ) {
<.*?><.*?> /**
12560 <.*?>
< table.height() ) {
<.*?><.*?> * Defining the width of the column, this parameter may take any CSS value
12561 <.*?>
< table.height() ) {
<.*?><.*?> * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not
12562 <.*?>
< table.height() ) {
<.*?><.*?> * been given a specific width through this interface ensuring that the table
12563 <.*?>
< table.height() ) {
<.*?><.*?> * remains readable.
12564 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12565 <.*?>
< table.height() ) {
<.*?><.*?> * @default null <i>Automatic</i>
12566 <.*?>
< table.height() ) {
<.*?><.*?> *
12567 <.*?>
< table.height() ) {
<.*?><.*?> * @name DataTable.defaults.column.width
12568 <.*?>
< table.height() ) {
<.*?><.*?> * @dtopt Columns
12569 <.*?>
< table.height() ) {
<.*?><.*?> *
12570 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12571 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columnDefs`
12572 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12573 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12574 <.*?>
< table.height() ) {
<.*?><.*?> * "columnDefs": [
12575 <.*?>
< table.height() ) {
<.*?><.*?> * { "width": "20%", "targets": [ 0 ] }
12576 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12577 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12578 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12579 <.*?>
< table.height() ) {
<.*?><.*?> *
12580 <.*?>
< table.height() ) {
<.*?><.*?> * @example
12581 <.*?>
< table.height() ) {
<.*?><.*?> * // Using `columns`
12582 <.*?>
< table.height() ) {
<.*?><.*?> * $(document).ready( function() {
12583 <.*?>
< table.height() ) {
<.*?><.*?> * $('#example').dataTable( {
12584 <.*?>
< table.height() ) {
<.*?><.*?> * "columns": [
12585 <.*?>
< table.height() ) {
<.*?><.*?> * { "width": "20%" },
12586 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12587 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12588 <.*?>
< table.height() ) {
<.*?><.*?> * null,
12589 <.*?>
< table.height() ) {
<.*?><.*?> * null
12590 <.*?>
< table.height() ) {
<.*?><.*?> * ]
12591 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12592 <.*?>
< table.height() ) {
<.*?><.*?> * } );
12593 <.*?>
< table.height() ) {
<.*?><.*?> */
12594 <.*?>
< table.height() ) {
<.*?><.*?> "sWidth": null
12595 <.*?>
< table.height() ) {
<.*?><.*?> };
12596  
12597 <.*?>
< table.height() ) {
<.*?><.*?> _fnHungarianMap( DataTable.defaults.column );
12598  
12599  
12600  
12601 <.*?>
< table.height() ) {
<.*?><.*?> /**
12602 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables settings object - this holds all the information needed for a
12603 <.*?>
< table.height() ) {
<.*?><.*?> * given table, including configuration, data and current application of the
12604 <.*?>
< table.height() ) {
<.*?><.*?> * table options. DataTables does not have a single instance for each DataTable
12605 <.*?>
< table.height() ) {
<.*?><.*?> * with the settings attached to that instance, but rather instances of the
12606 <.*?>
< table.height() ) {
<.*?><.*?> * DataTable "class" are created on-the-fly as needed (typically by a
12607 <.*?>
< table.height() ) {
<.*?><.*?> * $().dataTable() call) and the settings object is then applied to that
12608 <.*?>
< table.height() ) {
<.*?><.*?> * instance.
12609 <.*?>
< table.height() ) {
<.*?><.*?> *
12610 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this object is related to {@link DataTable.defaults} but this
12611 <.*?>
< table.height() ) {
<.*?><.*?> * one is the internal data store for DataTables's cache of columns. It should
12612 <.*?>
< table.height() ) {
<.*?><.*?> * NOT be manipulated outside of DataTables. Any configuration should be done
12613 <.*?>
< table.height() ) {
<.*?><.*?> * through the initialisation options.
12614 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12615 <.*?>
< table.height() ) {
<.*?><.*?> * @todo Really should attach the settings object to individual instances so we
12616 <.*?>
< table.height() ) {
<.*?><.*?> * don't need to create new instances on each $().dataTable() call (if the
12617 <.*?>
< table.height() ) {
<.*?><.*?> * table already exists). It would also save passing oSettings around and
12618 <.*?>
< table.height() ) {
<.*?><.*?> * into every single function. However, this is a very significant
12619 <.*?>
< table.height() ) {
<.*?><.*?> * architecture change for DataTables and will almost certainly break
12620 <.*?>
< table.height() ) {
<.*?><.*?> * backwards compatibility with older installations. This is something that
12621 <.*?>
< table.height() ) {
<.*?><.*?> * will be done in 2.0.
12622 <.*?>
< table.height() ) {
<.*?><.*?> */
12623 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.models.oSettings = {
12624 <.*?>
< table.height() ) {
<.*?><.*?> /**
12625 <.*?>
< table.height() ) {
<.*?><.*?> * Primary features of DataTables and their enablement state.
12626 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12627 <.*?>
< table.height() ) {
<.*?><.*?> */
12628 <.*?>
< table.height() ) {
<.*?><.*?> "oFeatures": {
12629  
12630 <.*?>
< table.height() ) {
<.*?><.*?> /**
12631 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to say if DataTables should automatically try to calculate the
12632 <.*?>
< table.height() ) {
<.*?><.*?> * optimum table and columns widths (true) or not (false).
12633 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12634 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12635 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12636 <.*?>
< table.height() ) {
<.*?><.*?> */
12637 <.*?>
< table.height() ) {
<.*?><.*?> "bAutoWidth": null,
12638  
12639 <.*?>
< table.height() ) {
<.*?><.*?> /**
12640 <.*?>
< table.height() ) {
<.*?><.*?> * Delay the creation of TR and TD elements until they are actually
12641 <.*?>
< table.height() ) {
<.*?><.*?> * needed by a driven page draw. This can give a significant speed
12642 <.*?>
< table.height() ) {
<.*?><.*?> * increase for Ajax source and Javascript source data, but makes no
12643 <.*?>
< table.height() ) {
<.*?><.*?> * difference at all fro DOM and server-side processing tables.
12644 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12645 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12646 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12647 <.*?>
< table.height() ) {
<.*?><.*?> */
12648 <.*?>
< table.height() ) {
<.*?><.*?> "bDeferRender": null,
12649  
12650 <.*?>
< table.height() ) {
<.*?><.*?> /**
12651 <.*?>
< table.height() ) {
<.*?><.*?> * Enable filtering on the table or not. Note that if this is disabled
12652 <.*?>
< table.height() ) {
<.*?><.*?> * then there is no filtering at all on the table, including fnFilter.
12653 <.*?>
< table.height() ) {
<.*?><.*?> * To just remove the filtering input use sDom and remove the 'f' option.
12654 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12655 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12656 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12657 <.*?>
< table.height() ) {
<.*?><.*?> */
12658 <.*?>
< table.height() ) {
<.*?><.*?> "bFilter": null,
12659  
12660 <.*?>
< table.height() ) {
<.*?><.*?> /**
12661 <.*?>
< table.height() ) {
<.*?><.*?> * Table information element (the 'Showing x of y records' div) enable
12662 <.*?>
< table.height() ) {
<.*?><.*?> * flag.
12663 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12664 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12665 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12666 <.*?>
< table.height() ) {
<.*?><.*?> */
12667 <.*?>
< table.height() ) {
<.*?><.*?> "bInfo": null,
12668  
12669 <.*?>
< table.height() ) {
<.*?><.*?> /**
12670 <.*?>
< table.height() ) {
<.*?><.*?> * Present a user control allowing the end user to change the page size
12671 <.*?>
< table.height() ) {
<.*?><.*?> * when pagination is enabled.
12672 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12673 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12674 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12675 <.*?>
< table.height() ) {
<.*?><.*?> */
12676 <.*?>
< table.height() ) {
<.*?><.*?> "bLengthChange": null,
12677  
12678 <.*?>
< table.height() ) {
<.*?><.*?> /**
12679 <.*?>
< table.height() ) {
<.*?><.*?> * Pagination enabled or not. Note that if this is disabled then length
12680 <.*?>
< table.height() ) {
<.*?><.*?> * changing must also be disabled.
12681 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12682 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12683 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12684 <.*?>
< table.height() ) {
<.*?><.*?> */
12685 <.*?>
< table.height() ) {
<.*?><.*?> "bPaginate": null,
12686  
12687 <.*?>
< table.height() ) {
<.*?><.*?> /**
12688 <.*?>
< table.height() ) {
<.*?><.*?> * Processing indicator enable flag whenever DataTables is enacting a
12689 <.*?>
< table.height() ) {
<.*?><.*?> * user request - typically an Ajax request for server-side processing.
12690 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12691 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12692 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12693 <.*?>
< table.height() ) {
<.*?><.*?> */
12694 <.*?>
< table.height() ) {
<.*?><.*?> "bProcessing": null,
12695  
12696 <.*?>
< table.height() ) {
<.*?><.*?> /**
12697 <.*?>
< table.height() ) {
<.*?><.*?> * Server-side processing enabled flag - when enabled DataTables will
12698 <.*?>
< table.height() ) {
<.*?><.*?> * get all data from the server for every draw - there is no filtering,
12699 <.*?>
< table.height() ) {
<.*?><.*?> * sorting or paging done on the client-side.
12700 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12701 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12702 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12703 <.*?>
< table.height() ) {
<.*?><.*?> */
12704 <.*?>
< table.height() ) {
<.*?><.*?> "bServerSide": null,
12705  
12706 <.*?>
< table.height() ) {
<.*?><.*?> /**
12707 <.*?>
< table.height() ) {
<.*?><.*?> * Sorting enablement flag.
12708 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12709 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12710 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12711 <.*?>
< table.height() ) {
<.*?><.*?> */
12712 <.*?>
< table.height() ) {
<.*?><.*?> "bSort": null,
12713  
12714 <.*?>
< table.height() ) {
<.*?><.*?> /**
12715 <.*?>
< table.height() ) {
<.*?><.*?> * Multi-column sorting
12716 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12717 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12718 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12719 <.*?>
< table.height() ) {
<.*?><.*?> */
12720 <.*?>
< table.height() ) {
<.*?><.*?> "bSortMulti": null,
12721  
12722 <.*?>
< table.height() ) {
<.*?><.*?> /**
12723 <.*?>
< table.height() ) {
<.*?><.*?> * Apply a class to the columns which are being sorted to provide a
12724 <.*?>
< table.height() ) {
<.*?><.*?> * visual highlight or not. This can slow things down when enabled since
12725 <.*?>
< table.height() ) {
<.*?><.*?> * there is a lot of DOM interaction.
12726 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12727 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12728 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12729 <.*?>
< table.height() ) {
<.*?><.*?> */
12730 <.*?>
< table.height() ) {
<.*?><.*?> "bSortClasses": null,
12731  
12732 <.*?>
< table.height() ) {
<.*?><.*?> /**
12733 <.*?>
< table.height() ) {
<.*?><.*?> * State saving enablement flag.
12734 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12735 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12736 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12737 <.*?>
< table.height() ) {
<.*?><.*?> */
12738 <.*?>
< table.height() ) {
<.*?><.*?> "bStateSave": null
12739 <.*?>
< table.height() ) {
<.*?><.*?> },
12740  
12741  
12742 <.*?>
< table.height() ) {
<.*?><.*?> /**
12743 <.*?>
< table.height() ) {
<.*?><.*?> * Scrolling settings for a table.
12744 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12745 <.*?>
< table.height() ) {
<.*?><.*?> */
12746 <.*?>
< table.height() ) {
<.*?><.*?> "oScroll": {
12747 <.*?>
< table.height() ) {
<.*?><.*?> /**
12748 <.*?>
< table.height() ) {
<.*?><.*?> * When the table is shorter in height than sScrollY, collapse the
12749 <.*?>
< table.height() ) {
<.*?><.*?> * table container down to the height of the table (when true).
12750 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12751 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12752 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12753 <.*?>
< table.height() ) {
<.*?><.*?> */
12754 <.*?>
< table.height() ) {
<.*?><.*?> "bCollapse": null,
12755  
12756 <.*?>
< table.height() ) {
<.*?><.*?> /**
12757 <.*?>
< table.height() ) {
<.*?><.*?> * Width of the scrollbar for the web-browser's platform. Calculated
12758 <.*?>
< table.height() ) {
<.*?><.*?> * during table initialisation.
12759 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
12760 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
12761 <.*?>
< table.height() ) {
<.*?><.*?> */
12762 <.*?>
< table.height() ) {
<.*?><.*?> "iBarWidth": 0,
12763  
12764 <.*?>
< table.height() ) {
<.*?><.*?> /**
12765 <.*?>
< table.height() ) {
<.*?><.*?> * Viewport width for horizontal scrolling. Horizontal scrolling is
12766 <.*?>
< table.height() ) {
<.*?><.*?> * disabled if an empty string.
12767 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12768 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12769 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12770 <.*?>
< table.height() ) {
<.*?><.*?> */
12771 <.*?>
< table.height() ) {
<.*?><.*?> "sX": null,
12772  
12773 <.*?>
< table.height() ) {
<.*?><.*?> /**
12774 <.*?>
< table.height() ) {
<.*?><.*?> * Width to expand the table to when using x-scrolling. Typically you
12775 <.*?>
< table.height() ) {
<.*?><.*?> * should not need to use this.
12776 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12777 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12778 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12779 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated
12780 <.*?>
< table.height() ) {
<.*?><.*?> */
12781 <.*?>
< table.height() ) {
<.*?><.*?> "sXInner": null,
12782  
12783 <.*?>
< table.height() ) {
<.*?><.*?> /**
12784 <.*?>
< table.height() ) {
<.*?><.*?> * Viewport height for vertical scrolling. Vertical scrolling is disabled
12785 <.*?>
< table.height() ) {
<.*?><.*?> * if an empty string.
12786 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12787 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12788 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
12789 <.*?>
< table.height() ) {
<.*?><.*?> */
12790 <.*?>
< table.height() ) {
<.*?><.*?> "sY": null
12791 <.*?>
< table.height() ) {
<.*?><.*?> },
12792  
12793 <.*?>
< table.height() ) {
<.*?><.*?> /**
12794 <.*?>
< table.height() ) {
<.*?><.*?> * Language information for the table.
12795 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12796 <.*?>
< table.height() ) {
<.*?><.*?> * @extends DataTable.defaults.oLanguage
12797 <.*?>
< table.height() ) {
<.*?><.*?> */
12798 <.*?>
< table.height() ) {
<.*?><.*?> "oLanguage": {
12799 <.*?>
< table.height() ) {
<.*?><.*?> /**
12800 <.*?>
< table.height() ) {
<.*?><.*?> * Information callback function. See
12801 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.defaults.fnInfoCallback}
12802 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
12803 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
12804 <.*?>
< table.height() ) {
<.*?><.*?> */
12805 <.*?>
< table.height() ) {
<.*?><.*?> "fnInfoCallback": null
12806 <.*?>
< table.height() ) {
<.*?><.*?> },
12807  
12808 <.*?>
< table.height() ) {
<.*?><.*?> /**
12809 <.*?>
< table.height() ) {
<.*?><.*?> * Browser support parameters
12810 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12811 <.*?>
< table.height() ) {
<.*?><.*?> */
12812 <.*?>
< table.height() ) {
<.*?><.*?> "oBrowser": {
12813 <.*?>
< table.height() ) {
<.*?><.*?> /**
12814 <.*?>
< table.height() ) {
<.*?><.*?> * Indicate if the browser incorrectly calculates width:100% inside a
12815 <.*?>
< table.height() ) {
<.*?><.*?> * scrolling element (IE6/7)
12816 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12817 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
12818 <.*?>
< table.height() ) {
<.*?><.*?> */
12819 <.*?>
< table.height() ) {
<.*?><.*?> "bScrollOversize": false,
12820  
12821 <.*?>
< table.height() ) {
<.*?><.*?> /**
12822 <.*?>
< table.height() ) {
<.*?><.*?> * Determine if the vertical scrollbar is on the right or left of the
12823 <.*?>
< table.height() ) {
<.*?><.*?> * scrolling container - needed for rtl language layout, although not
12824 <.*?>
< table.height() ) {
<.*?><.*?> * all browsers move the scrollbar (Safari).
12825 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
12826 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
12827 <.*?>
< table.height() ) {
<.*?><.*?> */
12828 <.*?>
< table.height() ) {
<.*?><.*?> "bScrollbarLeft": false
12829 <.*?>
< table.height() ) {
<.*?><.*?> },
12830  
12831  
12832 <.*?>
< table.height() ) {
<.*?><.*?> "ajax": null,
12833  
12834  
12835 <.*?>
< table.height() ) {
<.*?><.*?> /**
12836 <.*?>
< table.height() ) {
<.*?><.*?> * Array referencing the nodes which are used for the features. The
12837 <.*?>
< table.height() ) {
<.*?><.*?> * parameters of this object match what is allowed by sDom - i.e.
12838 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
12839 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'l' - Length changing</li>
12840 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'f' - Filtering input</li>
12841 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'t' - The table!</li>
12842 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'i' - Information</li>
12843 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'p' - Pagination</li>
12844 <.*?>
< table.height() ) {
<.*?><.*?> * <li>'r' - pRocessing</li>
12845 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
12846 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12847 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12848 <.*?>
< table.height() ) {
<.*?><.*?> */
12849 <.*?>
< table.height() ) {
<.*?><.*?> "aanFeatures": [],
12850  
12851 <.*?>
< table.height() ) {
<.*?><.*?> /**
12852 <.*?>
< table.height() ) {
<.*?><.*?> * Store data information - see {@link DataTable.models.oRow} for detailed
12853 <.*?>
< table.height() ) {
<.*?><.*?> * information.
12854 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12855 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12856 <.*?>
< table.height() ) {
<.*?><.*?> */
12857 <.*?>
< table.height() ) {
<.*?><.*?> "aoData": [],
12858  
12859 <.*?>
< table.height() ) {
<.*?><.*?> /**
12860 <.*?>
< table.height() ) {
<.*?><.*?> * Array of indexes which are in the current display (after filtering etc)
12861 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12862 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12863 <.*?>
< table.height() ) {
<.*?><.*?> */
12864 <.*?>
< table.height() ) {
<.*?><.*?> "aiDisplay": [],
12865  
12866 <.*?>
< table.height() ) {
<.*?><.*?> /**
12867 <.*?>
< table.height() ) {
<.*?><.*?> * Array of indexes for display - no filtering
12868 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12869 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12870 <.*?>
< table.height() ) {
<.*?><.*?> */
12871 <.*?>
< table.height() ) {
<.*?><.*?> "aiDisplayMaster": [],
12872  
12873 <.*?>
< table.height() ) {
<.*?><.*?> /**
12874 <.*?>
< table.height() ) {
<.*?><.*?> * Store information about each column that is in use
12875 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12876 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12877 <.*?>
< table.height() ) {
<.*?><.*?> */
12878 <.*?>
< table.height() ) {
<.*?><.*?> "aoColumns": [],
12879  
12880 <.*?>
< table.height() ) {
<.*?><.*?> /**
12881 <.*?>
< table.height() ) {
<.*?><.*?> * Store information about the table's header
12882 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12883 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12884 <.*?>
< table.height() ) {
<.*?><.*?> */
12885 <.*?>
< table.height() ) {
<.*?><.*?> "aoHeader": [],
12886  
12887 <.*?>
< table.height() ) {
<.*?><.*?> /**
12888 <.*?>
< table.height() ) {
<.*?><.*?> * Store information about the table's footer
12889 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12890 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12891 <.*?>
< table.height() ) {
<.*?><.*?> */
12892 <.*?>
< table.height() ) {
<.*?><.*?> "aoFooter": [],
12893  
12894 <.*?>
< table.height() ) {
<.*?><.*?> /**
12895 <.*?>
< table.height() ) {
<.*?><.*?> * Store the applied global search information in case we want to force a
12896 <.*?>
< table.height() ) {
<.*?><.*?> * research or compare the old search to a new one.
12897 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12898 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12899 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
12900 <.*?>
< table.height() ) {
<.*?><.*?> * @extends DataTable.models.oSearch
12901 <.*?>
< table.height() ) {
<.*?><.*?> */
12902 <.*?>
< table.height() ) {
<.*?><.*?> "oPreviousSearch": {},
12903  
12904 <.*?>
< table.height() ) {
<.*?><.*?> /**
12905 <.*?>
< table.height() ) {
<.*?><.*?> * Store the applied search for each column - see
12906 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.models.oSearch} for the format that is used for the
12907 <.*?>
< table.height() ) {
<.*?><.*?> * filtering information for each column.
12908 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12909 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12910 <.*?>
< table.height() ) {
<.*?><.*?> */
12911 <.*?>
< table.height() ) {
<.*?><.*?> "aoPreSearchCols": [],
12912  
12913 <.*?>
< table.height() ) {
<.*?><.*?> /**
12914 <.*?>
< table.height() ) {
<.*?><.*?> * Sorting that is applied to the table. Note that the inner arrays are
12915 <.*?>
< table.height() ) {
<.*?><.*?> * used in the following manner:
12916 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
12917 <.*?>
< table.height() ) {
<.*?><.*?> * <li>Index 0 - column number</li>
12918 <.*?>
< table.height() ) {
<.*?><.*?> * <li>Index 1 - current sorting direction</li>
12919 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
12920 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12921 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12922 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12923 <.*?>
< table.height() ) {
<.*?><.*?> * @todo These inner arrays should really be objects
12924 <.*?>
< table.height() ) {
<.*?><.*?> */
12925 <.*?>
< table.height() ) {
<.*?><.*?> "aaSorting": null,
12926  
12927 <.*?>
< table.height() ) {
<.*?><.*?> /**
12928 <.*?>
< table.height() ) {
<.*?><.*?> * Sorting that is always applied to the table (i.e. prefixed in front of
12929 <.*?>
< table.height() ) {
<.*?><.*?> * aaSorting).
12930 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12931 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12932 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12933 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12934 <.*?>
< table.height() ) {
<.*?><.*?> */
12935 <.*?>
< table.height() ) {
<.*?><.*?> "aaSortingFixed": [],
12936  
12937 <.*?>
< table.height() ) {
<.*?><.*?> /**
12938 <.*?>
< table.height() ) {
<.*?><.*?> * Classes to use for the striping of a table.
12939 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
12940 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
12941 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12942 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12943 <.*?>
< table.height() ) {
<.*?><.*?> */
12944 <.*?>
< table.height() ) {
<.*?><.*?> "asStripeClasses": null,
12945  
12946 <.*?>
< table.height() ) {
<.*?><.*?> /**
12947 <.*?>
< table.height() ) {
<.*?><.*?> * If restoring a table - we should restore its striping classes as well
12948 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12949 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12950 <.*?>
< table.height() ) {
<.*?><.*?> */
12951 <.*?>
< table.height() ) {
<.*?><.*?> "asDestroyStripes": [],
12952  
12953 <.*?>
< table.height() ) {
<.*?><.*?> /**
12954 <.*?>
< table.height() ) {
<.*?><.*?> * If restoring a table - we should restore its width
12955 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
12956 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
12957 <.*?>
< table.height() ) {
<.*?><.*?> */
12958 <.*?>
< table.height() ) {
<.*?><.*?> "sDestroyWidth": 0,
12959  
12960 <.*?>
< table.height() ) {
<.*?><.*?> /**
12961 <.*?>
< table.height() ) {
<.*?><.*?> * Callback functions array for every time a row is inserted (i.e. on a draw).
12962 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12963 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12964 <.*?>
< table.height() ) {
<.*?><.*?> */
12965 <.*?>
< table.height() ) {
<.*?><.*?> "aoRowCallback": [],
12966  
12967 <.*?>
< table.height() ) {
<.*?><.*?> /**
12968 <.*?>
< table.height() ) {
<.*?><.*?> * Callback functions for the header on each draw.
12969 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12970 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12971 <.*?>
< table.height() ) {
<.*?><.*?> */
12972 <.*?>
< table.height() ) {
<.*?><.*?> "aoHeaderCallback": [],
12973  
12974 <.*?>
< table.height() ) {
<.*?><.*?> /**
12975 <.*?>
< table.height() ) {
<.*?><.*?> * Callback function for the footer on each draw.
12976 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12977 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12978 <.*?>
< table.height() ) {
<.*?><.*?> */
12979 <.*?>
< table.height() ) {
<.*?><.*?> "aoFooterCallback": [],
12980  
12981 <.*?>
< table.height() ) {
<.*?><.*?> /**
12982 <.*?>
< table.height() ) {
<.*?><.*?> * Array of callback functions for draw callback functions
12983 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12984 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12985 <.*?>
< table.height() ) {
<.*?><.*?> */
12986 <.*?>
< table.height() ) {
<.*?><.*?> "aoDrawCallback": [],
12987  
12988 <.*?>
< table.height() ) {
<.*?><.*?> /**
12989 <.*?>
< table.height() ) {
<.*?><.*?> * Array of callback functions for row created function
12990 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12991 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
12992 <.*?>
< table.height() ) {
<.*?><.*?> */
12993 <.*?>
< table.height() ) {
<.*?><.*?> "aoRowCreatedCallback": [],
12994  
12995 <.*?>
< table.height() ) {
<.*?><.*?> /**
12996 <.*?>
< table.height() ) {
<.*?><.*?> * Callback functions for just before the table is redrawn. A return of
12997 <.*?>
< table.height() ) {
<.*?><.*?> * false will be used to cancel the draw.
12998 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
12999 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13000 <.*?>
< table.height() ) {
<.*?><.*?> */
13001 <.*?>
< table.height() ) {
<.*?><.*?> "aoPreDrawCallback": [],
13002  
13003 <.*?>
< table.height() ) {
<.*?><.*?> /**
13004 <.*?>
< table.height() ) {
<.*?><.*?> * Callback functions for when the table has been initialised.
13005 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13006 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13007 <.*?>
< table.height() ) {
<.*?><.*?> */
13008 <.*?>
< table.height() ) {
<.*?><.*?> "aoInitComplete": [],
13009  
13010  
13011 <.*?>
< table.height() ) {
<.*?><.*?> /**
13012 <.*?>
< table.height() ) {
<.*?><.*?> * Callbacks for modifying the settings to be stored for state saving, prior to
13013 <.*?>
< table.height() ) {
<.*?><.*?> * saving state.
13014 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13015 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13016 <.*?>
< table.height() ) {
<.*?><.*?> */
13017 <.*?>
< table.height() ) {
<.*?><.*?> "aoStateSaveParams": [],
13018  
13019 <.*?>
< table.height() ) {
<.*?><.*?> /**
13020 <.*?>
< table.height() ) {
<.*?><.*?> * Callbacks for modifying the settings that have been stored for state saving
13021 <.*?>
< table.height() ) {
<.*?><.*?> * prior to using the stored values to restore the state.
13022 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13023 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13024 <.*?>
< table.height() ) {
<.*?><.*?> */
13025 <.*?>
< table.height() ) {
<.*?><.*?> "aoStateLoadParams": [],
13026  
13027 <.*?>
< table.height() ) {
<.*?><.*?> /**
13028 <.*?>
< table.height() ) {
<.*?><.*?> * Callbacks for operating on the settings object once the saved state has been
13029 <.*?>
< table.height() ) {
<.*?><.*?> * loaded
13030 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13031 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13032 <.*?>
< table.height() ) {
<.*?><.*?> */
13033 <.*?>
< table.height() ) {
<.*?><.*?> "aoStateLoaded": [],
13034  
13035 <.*?>
< table.height() ) {
<.*?><.*?> /**
13036 <.*?>
< table.height() ) {
<.*?><.*?> * Cache the table ID for quick access
13037 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13038 <.*?>
< table.height() ) {
<.*?><.*?> * @default <i>Empty string</i>
13039 <.*?>
< table.height() ) {
<.*?><.*?> */
13040 <.*?>
< table.height() ) {
<.*?><.*?> "sTableId": "",
13041  
13042 <.*?>
< table.height() ) {
<.*?><.*?> /**
13043 <.*?>
< table.height() ) {
<.*?><.*?> * The TABLE node for the main table
13044 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
13045 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13046 <.*?>
< table.height() ) {
<.*?><.*?> */
13047 <.*?>
< table.height() ) {
<.*?><.*?> "nTable": null,
13048  
13049 <.*?>
< table.height() ) {
<.*?><.*?> /**
13050 <.*?>
< table.height() ) {
<.*?><.*?> * Permanent ref to the thead element
13051 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
13052 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13053 <.*?>
< table.height() ) {
<.*?><.*?> */
13054 <.*?>
< table.height() ) {
<.*?><.*?> "nTHead": null,
13055  
13056 <.*?>
< table.height() ) {
<.*?><.*?> /**
13057 <.*?>
< table.height() ) {
<.*?><.*?> * Permanent ref to the tfoot element - if it exists
13058 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
13059 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13060 <.*?>
< table.height() ) {
<.*?><.*?> */
13061 <.*?>
< table.height() ) {
<.*?><.*?> "nTFoot": null,
13062  
13063 <.*?>
< table.height() ) {
<.*?><.*?> /**
13064 <.*?>
< table.height() ) {
<.*?><.*?> * Permanent ref to the tbody element
13065 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
13066 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13067 <.*?>
< table.height() ) {
<.*?><.*?> */
13068 <.*?>
< table.height() ) {
<.*?><.*?> "nTBody": null,
13069  
13070 <.*?>
< table.height() ) {
<.*?><.*?> /**
13071 <.*?>
< table.height() ) {
<.*?><.*?> * Cache the wrapper node (contains all DataTables controlled elements)
13072 <.*?>
< table.height() ) {
<.*?><.*?> * @type node
13073 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13074 <.*?>
< table.height() ) {
<.*?><.*?> */
13075 <.*?>
< table.height() ) {
<.*?><.*?> "nTableWrapper": null,
13076  
13077 <.*?>
< table.height() ) {
<.*?><.*?> /**
13078 <.*?>
< table.height() ) {
<.*?><.*?> * Indicate if when using server-side processing the loading of data
13079 <.*?>
< table.height() ) {
<.*?><.*?> * should be deferred until the second draw.
13080 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13081 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13082 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13083 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
13084 <.*?>
< table.height() ) {
<.*?><.*?> */
13085 <.*?>
< table.height() ) {
<.*?><.*?> "bDeferLoading": false,
13086  
13087 <.*?>
< table.height() ) {
<.*?><.*?> /**
13088 <.*?>
< table.height() ) {
<.*?><.*?> * Indicate if all required information has been read in
13089 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13090 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
13091 <.*?>
< table.height() ) {
<.*?><.*?> */
13092 <.*?>
< table.height() ) {
<.*?><.*?> "bInitialised": false,
13093  
13094 <.*?>
< table.height() ) {
<.*?><.*?> /**
13095 <.*?>
< table.height() ) {
<.*?><.*?> * Information about open rows. Each object in the array has the parameters
13096 <.*?>
< table.height() ) {
<.*?><.*?> * 'nTr' and 'nParent'
13097 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13098 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13099 <.*?>
< table.height() ) {
<.*?><.*?> */
13100 <.*?>
< table.height() ) {
<.*?><.*?> "aoOpenRows": [],
13101  
13102 <.*?>
< table.height() ) {
<.*?><.*?> /**
13103 <.*?>
< table.height() ) {
<.*?><.*?> * Dictate the positioning of DataTables' control elements - see
13104 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.model.oInit.sDom}.
13105 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13106 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13107 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13108 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13109 <.*?>
< table.height() ) {
<.*?><.*?> */
13110 <.*?>
< table.height() ) {
<.*?><.*?> "sDom": null,
13111  
13112 <.*?>
< table.height() ) {
<.*?><.*?> /**
13113 <.*?>
< table.height() ) {
<.*?><.*?> * Search delay (in mS)
13114 <.*?>
< table.height() ) {
<.*?><.*?> * @type integer
13115 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13116 <.*?>
< table.height() ) {
<.*?><.*?> */
13117 <.*?>
< table.height() ) {
<.*?><.*?> "searchDelay": null,
13118  
13119 <.*?>
< table.height() ) {
<.*?><.*?> /**
13120 <.*?>
< table.height() ) {
<.*?><.*?> * Which type of pagination should be used.
13121 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13122 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13123 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13124 <.*?>
< table.height() ) {
<.*?><.*?> * @default two_button
13125 <.*?>
< table.height() ) {
<.*?><.*?> */
13126 <.*?>
< table.height() ) {
<.*?><.*?> "sPaginationType": "two_button",
13127  
13128 <.*?>
< table.height() ) {
<.*?><.*?> /**
13129 <.*?>
< table.height() ) {
<.*?><.*?> * The state duration (for `stateSave`) in seconds.
13130 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13131 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13132 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13133 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
13134 <.*?>
< table.height() ) {
<.*?><.*?> */
13135 <.*?>
< table.height() ) {
<.*?><.*?> "iStateDuration": 0,
13136  
13137 <.*?>
< table.height() ) {
<.*?><.*?> /**
13138 <.*?>
< table.height() ) {
<.*?><.*?> * Array of callback functions for state saving. Each array element is an
13139 <.*?>
< table.height() ) {
<.*?><.*?> * object with the following parameters:
13140 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
13141 <.*?>
< table.height() ) {
<.*?><.*?> * <li>function:fn - function to call. Takes two parameters, oSettings
13142 <.*?>
< table.height() ) {
<.*?><.*?> * and the JSON string to save that has been thus far created. Returns
13143 <.*?>
< table.height() ) {
<.*?><.*?> * a JSON string to be inserted into a json object
13144 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. '"param": [ 0, 1, 2]')</li>
13145 <.*?>
< table.height() ) {
<.*?><.*?> * <li>string:sName - name of callback</li>
13146 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
13147 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13148 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13149 <.*?>
< table.height() ) {
<.*?><.*?> */
13150 <.*?>
< table.height() ) {
<.*?><.*?> "aoStateSave": [],
13151  
13152 <.*?>
< table.height() ) {
<.*?><.*?> /**
13153 <.*?>
< table.height() ) {
<.*?><.*?> * Array of callback functions for state loading. Each array element is an
13154 <.*?>
< table.height() ) {
<.*?><.*?> * object with the following parameters:
13155 <.*?>
< table.height() ) {
<.*?><.*?> * <ul>
13156 <.*?>
< table.height() ) {
<.*?><.*?> * <li>function:fn - function to call. Takes two parameters, oSettings
13157 <.*?>
< table.height() ) {
<.*?><.*?> * and the object stored. May return false to cancel state loading</li>
13158 <.*?>
< table.height() ) {
<.*?><.*?> * <li>string:sName - name of callback</li>
13159 <.*?>
< table.height() ) {
<.*?><.*?> * </ul>
13160 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13161 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13162 <.*?>
< table.height() ) {
<.*?><.*?> */
13163 <.*?>
< table.height() ) {
<.*?><.*?> "aoStateLoad": [],
13164  
13165 <.*?>
< table.height() ) {
<.*?><.*?> /**
13166 <.*?>
< table.height() ) {
<.*?><.*?> * State that was saved. Useful for back reference
13167 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13168 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13169 <.*?>
< table.height() ) {
<.*?><.*?> */
13170 <.*?>
< table.height() ) {
<.*?><.*?> "oSavedState": null,
13171  
13172 <.*?>
< table.height() ) {
<.*?><.*?> /**
13173 <.*?>
< table.height() ) {
<.*?><.*?> * State that was loaded. Useful for back reference
13174 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13175 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13176 <.*?>
< table.height() ) {
<.*?><.*?> */
13177 <.*?>
< table.height() ) {
<.*?><.*?> "oLoadedState": null,
13178  
13179 <.*?>
< table.height() ) {
<.*?><.*?> /**
13180 <.*?>
< table.height() ) {
<.*?><.*?> * Source url for AJAX data for the table.
13181 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13182 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13183 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13184 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13185 <.*?>
< table.height() ) {
<.*?><.*?> */
13186 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxSource": null,
13187  
13188 <.*?>
< table.height() ) {
<.*?><.*?> /**
13189 <.*?>
< table.height() ) {
<.*?><.*?> * Property from a given object from which to read the table data from. This
13190 <.*?>
< table.height() ) {
<.*?><.*?> * can be an empty string (when not server-side processing), in which case
13191 <.*?>
< table.height() ) {
<.*?><.*?> * it is assumed an an array is given directly.
13192 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13193 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13194 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13195 <.*?>
< table.height() ) {
<.*?><.*?> */
13196 <.*?>
< table.height() ) {
<.*?><.*?> "sAjaxDataProp": null,
13197  
13198 <.*?>
< table.height() ) {
<.*?><.*?> /**
13199 <.*?>
< table.height() ) {
<.*?><.*?> * Note if draw should be blocked while getting data
13200 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13201 <.*?>
< table.height() ) {
<.*?><.*?> * @default true
13202 <.*?>
< table.height() ) {
<.*?><.*?> */
13203 <.*?>
< table.height() ) {
<.*?><.*?> "bAjaxDataGet": true,
13204  
13205 <.*?>
< table.height() ) {
<.*?><.*?> /**
13206 <.*?>
< table.height() ) {
<.*?><.*?> * The last jQuery XHR object that was used for server-side data gathering.
13207 <.*?>
< table.height() ) {
<.*?><.*?> * This can be used for working with the XHR information in one of the
13208 <.*?>
< table.height() ) {
<.*?><.*?> * callbacks
13209 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13210 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13211 <.*?>
< table.height() ) {
<.*?><.*?> */
13212 <.*?>
< table.height() ) {
<.*?><.*?> "jqXHR": null,
13213  
13214 <.*?>
< table.height() ) {
<.*?><.*?> /**
13215 <.*?>
< table.height() ) {
<.*?><.*?> * JSON returned from the server in the last Ajax request
13216 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13217 <.*?>
< table.height() ) {
<.*?><.*?> * @default undefined
13218 <.*?>
< table.height() ) {
<.*?><.*?> */
13219 <.*?>
< table.height() ) {
<.*?><.*?> "json": undefined,
13220  
13221 <.*?>
< table.height() ) {
<.*?><.*?> /**
13222 <.*?>
< table.height() ) {
<.*?><.*?> * Data submitted as part of the last Ajax request
13223 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13224 <.*?>
< table.height() ) {
<.*?><.*?> * @default undefined
13225 <.*?>
< table.height() ) {
<.*?><.*?> */
13226 <.*?>
< table.height() ) {
<.*?><.*?> "oAjaxData": undefined,
13227  
13228 <.*?>
< table.height() ) {
<.*?><.*?> /**
13229 <.*?>
< table.height() ) {
<.*?><.*?> * Function to get the server-side data.
13230 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13231 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13232 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13233 <.*?>
< table.height() ) {
<.*?><.*?> */
13234 <.*?>
< table.height() ) {
<.*?><.*?> "fnServerData": null,
13235  
13236 <.*?>
< table.height() ) {
<.*?><.*?> /**
13237 <.*?>
< table.height() ) {
<.*?><.*?> * Functions which are called prior to sending an Ajax request so extra
13238 <.*?>
< table.height() ) {
<.*?><.*?> * parameters can easily be sent to the server
13239 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13240 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13241 <.*?>
< table.height() ) {
<.*?><.*?> */
13242 <.*?>
< table.height() ) {
<.*?><.*?> "aoServerParams": [],
13243  
13244 <.*?>
< table.height() ) {
<.*?><.*?> /**
13245 <.*?>
< table.height() ) {
<.*?><.*?> * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
13246 <.*?>
< table.height() ) {
<.*?><.*?> * required).
13247 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13248 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13249 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13250 <.*?>
< table.height() ) {
<.*?><.*?> */
13251 <.*?>
< table.height() ) {
<.*?><.*?> "sServerMethod": null,
13252  
13253 <.*?>
< table.height() ) {
<.*?><.*?> /**
13254 <.*?>
< table.height() ) {
<.*?><.*?> * Format numbers for display.
13255 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13256 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13257 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13258 <.*?>
< table.height() ) {
<.*?><.*?> */
13259 <.*?>
< table.height() ) {
<.*?><.*?> "fnFormatNumber": null,
13260  
13261 <.*?>
< table.height() ) {
<.*?><.*?> /**
13262 <.*?>
< table.height() ) {
<.*?><.*?> * List of options that can be used for the user selectable length menu.
13263 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13264 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13265 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13266 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13267 <.*?>
< table.height() ) {
<.*?><.*?> */
13268 <.*?>
< table.height() ) {
<.*?><.*?> "aLengthMenu": null,
13269  
13270 <.*?>
< table.height() ) {
<.*?><.*?> /**
13271 <.*?>
< table.height() ) {
<.*?><.*?> * Counter for the draws that the table does. Also used as a tracker for
13272 <.*?>
< table.height() ) {
<.*?><.*?> * server-side processing
13273 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13274 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
13275 <.*?>
< table.height() ) {
<.*?><.*?> */
13276 <.*?>
< table.height() ) {
<.*?><.*?> "iDraw": 0,
13277  
13278 <.*?>
< table.height() ) {
<.*?><.*?> /**
13279 <.*?>
< table.height() ) {
<.*?><.*?> * Indicate if a redraw is being done - useful for Ajax
13280 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13281 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
13282 <.*?>
< table.height() ) {
<.*?><.*?> */
13283 <.*?>
< table.height() ) {
<.*?><.*?> "bDrawing": false,
13284  
13285 <.*?>
< table.height() ) {
<.*?><.*?> /**
13286 <.*?>
< table.height() ) {
<.*?><.*?> * Draw index (iDraw) of the last error when parsing the returned data
13287 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13288 <.*?>
< table.height() ) {
<.*?><.*?> * @default -1
13289 <.*?>
< table.height() ) {
<.*?><.*?> */
13290 <.*?>
< table.height() ) {
<.*?><.*?> "iDrawError": -1,
13291  
13292 <.*?>
< table.height() ) {
<.*?><.*?> /**
13293 <.*?>
< table.height() ) {
<.*?><.*?> * Paging display length
13294 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13295 <.*?>
< table.height() ) {
<.*?><.*?> * @default 10
13296 <.*?>
< table.height() ) {
<.*?><.*?> */
13297 <.*?>
< table.height() ) {
<.*?><.*?> "_iDisplayLength": 10,
13298  
13299 <.*?>
< table.height() ) {
<.*?><.*?> /**
13300 <.*?>
< table.height() ) {
<.*?><.*?> * Paging start point - aiDisplay index
13301 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13302 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
13303 <.*?>
< table.height() ) {
<.*?><.*?> */
13304 <.*?>
< table.height() ) {
<.*?><.*?> "_iDisplayStart": 0,
13305  
13306 <.*?>
< table.height() ) {
<.*?><.*?> /**
13307 <.*?>
< table.height() ) {
<.*?><.*?> * Server-side processing - number of records in the result set
13308 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. before filtering), Use fnRecordsTotal rather than
13309 <.*?>
< table.height() ) {
<.*?><.*?> * this property to get the value of the number of records, regardless of
13310 <.*?>
< table.height() ) {
<.*?><.*?> * the server-side processing setting.
13311 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13312 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
13313 <.*?>
< table.height() ) {
<.*?><.*?> * @private
13314 <.*?>
< table.height() ) {
<.*?><.*?> */
13315 <.*?>
< table.height() ) {
<.*?><.*?> "_iRecordsTotal": 0,
13316  
13317 <.*?>
< table.height() ) {
<.*?><.*?> /**
13318 <.*?>
< table.height() ) {
<.*?><.*?> * Server-side processing - number of records in the current display set
13319 <.*?>
< table.height() ) {
<.*?><.*?> * (i.e. after filtering). Use fnRecordsDisplay rather than
13320 <.*?>
< table.height() ) {
<.*?><.*?> * this property to get the value of the number of records, regardless of
13321 <.*?>
< table.height() ) {
<.*?><.*?> * the server-side processing setting.
13322 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13323 <.*?>
< table.height() ) {
<.*?><.*?> * @default 0
13324 <.*?>
< table.height() ) {
<.*?><.*?> * @private
13325 <.*?>
< table.height() ) {
<.*?><.*?> */
13326 <.*?>
< table.height() ) {
<.*?><.*?> "_iRecordsDisplay": 0,
13327  
13328 <.*?>
< table.height() ) {
<.*?><.*?> /**
13329 <.*?>
< table.height() ) {
<.*?><.*?> * Flag to indicate if jQuery UI marking and classes should be used.
13330 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13331 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13332 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13333 <.*?>
< table.height() ) {
<.*?><.*?> */
13334 <.*?>
< table.height() ) {
<.*?><.*?> "bJUI": null,
13335  
13336 <.*?>
< table.height() ) {
<.*?><.*?> /**
13337 <.*?>
< table.height() ) {
<.*?><.*?> * The classes to use for the table
13338 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13339 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13340 <.*?>
< table.height() ) {
<.*?><.*?> */
13341 <.*?>
< table.height() ) {
<.*?><.*?> "oClasses": {},
13342  
13343 <.*?>
< table.height() ) {
<.*?><.*?> /**
13344 <.*?>
< table.height() ) {
<.*?><.*?> * Flag attached to the settings object so you can check in the draw
13345 <.*?>
< table.height() ) {
<.*?><.*?> * callback if filtering has been done in the draw. Deprecated in favour of
13346 <.*?>
< table.height() ) {
<.*?><.*?> * events.
13347 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13348 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
13349 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated
13350 <.*?>
< table.height() ) {
<.*?><.*?> */
13351 <.*?>
< table.height() ) {
<.*?><.*?> "bFiltered": false,
13352  
13353 <.*?>
< table.height() ) {
<.*?><.*?> /**
13354 <.*?>
< table.height() ) {
<.*?><.*?> * Flag attached to the settings object so you can check in the draw
13355 <.*?>
< table.height() ) {
<.*?><.*?> * callback if sorting has been done in the draw. Deprecated in favour of
13356 <.*?>
< table.height() ) {
<.*?><.*?> * events.
13357 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13358 <.*?>
< table.height() ) {
<.*?><.*?> * @default false
13359 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated
13360 <.*?>
< table.height() ) {
<.*?><.*?> */
13361 <.*?>
< table.height() ) {
<.*?><.*?> "bSorted": false,
13362  
13363 <.*?>
< table.height() ) {
<.*?><.*?> /**
13364 <.*?>
< table.height() ) {
<.*?><.*?> * Indicate that if multiple rows are in the header and there is more than
13365 <.*?>
< table.height() ) {
<.*?><.*?> * one unique cell per column, if the top one (true) or bottom one (false)
13366 <.*?>
< table.height() ) {
<.*?><.*?> * should be used for sorting / title by DataTables.
13367 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this parameter will be set by the initialisation routine. To
13368 <.*?>
< table.height() ) {
<.*?><.*?> * set a default use {@link DataTable.defaults}.
13369 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13370 <.*?>
< table.height() ) {
<.*?><.*?> */
13371 <.*?>
< table.height() ) {
<.*?><.*?> "bSortCellsTop": null,
13372  
13373 <.*?>
< table.height() ) {
<.*?><.*?> /**
13374 <.*?>
< table.height() ) {
<.*?><.*?> * Initialisation object that is used for the table
13375 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13376 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13377 <.*?>
< table.height() ) {
<.*?><.*?> */
13378 <.*?>
< table.height() ) {
<.*?><.*?> "oInit": null,
13379  
13380 <.*?>
< table.height() ) {
<.*?><.*?> /**
13381 <.*?>
< table.height() ) {
<.*?><.*?> * Destroy callback functions - for plug-ins to attach themselves to the
13382 <.*?>
< table.height() ) {
<.*?><.*?> * destroy so they can clean up markup and events.
13383 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13384 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13385 <.*?>
< table.height() ) {
<.*?><.*?> */
13386 <.*?>
< table.height() ) {
<.*?><.*?> "aoDestroyCallback": [],
13387  
13388  
13389 <.*?>
< table.height() ) {
<.*?><.*?> /**
13390 <.*?>
< table.height() ) {
<.*?><.*?> * Get the number of records in the current record set, before filtering
13391 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13392 <.*?>
< table.height() ) {
<.*?><.*?> */
13393 <.*?>
< table.height() ) {
<.*?><.*?> "fnRecordsTotal": function ()
13394 <.*?>
< table.height() ) {
<.*?><.*?> {
13395 <.*?>
< table.height() ) {
<.*?><.*?> return _fnDataSource( this ) == 'ssp' ?
13396 <.*?>
< table.height() ) {
<.*?><.*?> this._iRecordsTotal * 1 :
13397 <.*?>
< table.height() ) {
<.*?><.*?> this.aiDisplayMaster.length;
13398 <.*?>
< table.height() ) {
<.*?><.*?> },
13399  
13400 <.*?>
< table.height() ) {
<.*?><.*?> /**
13401 <.*?>
< table.height() ) {
<.*?><.*?> * Get the number of records in the current record set, after filtering
13402 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13403 <.*?>
< table.height() ) {
<.*?><.*?> */
13404 <.*?>
< table.height() ) {
<.*?><.*?> "fnRecordsDisplay": function ()
13405 <.*?>
< table.height() ) {
<.*?><.*?> {
13406 <.*?>
< table.height() ) {
<.*?><.*?> return _fnDataSource( this ) == 'ssp' ?
13407 <.*?>
< table.height() ) {
<.*?><.*?> this._iRecordsDisplay * 1 :
13408 <.*?>
< table.height() ) {
<.*?><.*?> this.aiDisplay.length;
13409 <.*?>
< table.height() ) {
<.*?><.*?> },
13410  
13411 <.*?>
< table.height() ) {
<.*?><.*?> /**
13412 <.*?>
< table.height() ) {
<.*?><.*?> * Get the display end point - aiDisplay index
13413 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13414 <.*?>
< table.height() ) {
<.*?><.*?> */
13415 <.*?>
< table.height() ) {
<.*?><.*?> "fnDisplayEnd": function ()
13416 <.*?>
< table.height() ) {
<.*?><.*?> {
13417 <.*?>
< table.height() ) {
<.*?><.*?> var
13418 <.*?>
< table.height() ) {
<.*?><.*?> len = this._iDisplayLength,
13419 <.*?>
< table.height() ) {
<.*?><.*?> start = this._iDisplayStart,
13420 <.*?>
< table.height() ) {
<.*?><.*?> calc = start + len,
13421 <.*?>
< table.height() ) {
<.*?><.*?> records = this.aiDisplay.length,
13422 <.*?>
< table.height() ) {
<.*?><.*?> features = this.oFeatures,
13423 <.*?>
< table.height() ) {
<.*?><.*?> paginate = features.bPaginate;
13424  
13425 <.*?>
< table.height() ) {
<.*?><.*?> if ( features.bServerSide ) {
13426 <.*?>
< table.height() ) {
<.*?><.*?> return paginate === false || len === -1 ?
13427 <.*?>
< table.height() ) {
<.*?><.*?> start + records :
13428 <.*?>
< table.height() ) {
<.*?><.*?> Math.min( start+len, this._iRecordsDisplay );
13429 <.*?>
< table.height() ) {
<.*?><.*?> }
13430 <.*?>
< table.height() ) {
<.*?><.*?> else {
13431 <.*?>
< table.height() ) {
<.*?><.*?> return ! paginate || calc>records || len===-1 ?
13432 <.*?>
< table.height() ) {
<.*?><.*?> records :
13433 <.*?>
< table.height() ) {
<.*?><.*?> calc;
13434 <.*?>
< table.height() ) {
<.*?><.*?> }
13435 <.*?>
< table.height() ) {
<.*?><.*?> },
13436  
13437 <.*?>
< table.height() ) {
<.*?><.*?> /**
13438 <.*?>
< table.height() ) {
<.*?><.*?> * The DataTables object for this table
13439 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13440 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13441 <.*?>
< table.height() ) {
<.*?><.*?> */
13442 <.*?>
< table.height() ) {
<.*?><.*?> "oInstance": null,
13443  
13444 <.*?>
< table.height() ) {
<.*?><.*?> /**
13445 <.*?>
< table.height() ) {
<.*?><.*?> * Unique identifier for each instance of the DataTables object. If there
13446 <.*?>
< table.height() ) {
<.*?><.*?> * is an ID on the table node, then it takes that value, otherwise an
13447 <.*?>
< table.height() ) {
<.*?><.*?> * incrementing internal counter is used.
13448 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
13449 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13450 <.*?>
< table.height() ) {
<.*?><.*?> */
13451 <.*?>
< table.height() ) {
<.*?><.*?> "sInstance": null,
13452  
13453 <.*?>
< table.height() ) {
<.*?><.*?> /**
13454 <.*?>
< table.height() ) {
<.*?><.*?> * tabindex attribute value that is added to DataTables control elements, allowing
13455 <.*?>
< table.height() ) {
<.*?><.*?> * keyboard navigation of the table and its controls.
13456 <.*?>
< table.height() ) {
<.*?><.*?> */
13457 <.*?>
< table.height() ) {
<.*?><.*?> "iTabIndex": 0,
13458  
13459 <.*?>
< table.height() ) {
<.*?><.*?> /**
13460 <.*?>
< table.height() ) {
<.*?><.*?> * DIV container for the footer scrolling table if scrolling
13461 <.*?>
< table.height() ) {
<.*?><.*?> */
13462 <.*?>
< table.height() ) {
<.*?><.*?> "nScrollHead": null,
13463  
13464 <.*?>
< table.height() ) {
<.*?><.*?> /**
13465 <.*?>
< table.height() ) {
<.*?><.*?> * DIV container for the footer scrolling table if scrolling
13466 <.*?>
< table.height() ) {
<.*?><.*?> */
13467 <.*?>
< table.height() ) {
<.*?><.*?> "nScrollFoot": null,
13468  
13469 <.*?>
< table.height() ) {
<.*?><.*?> /**
13470 <.*?>
< table.height() ) {
<.*?><.*?> * Last applied sort
13471 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13472 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13473 <.*?>
< table.height() ) {
<.*?><.*?> */
13474 <.*?>
< table.height() ) {
<.*?><.*?> "aLastSort": [],
13475  
13476 <.*?>
< table.height() ) {
<.*?><.*?> /**
13477 <.*?>
< table.height() ) {
<.*?><.*?> * Stored plug-in instances
13478 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13479 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13480 <.*?>
< table.height() ) {
<.*?><.*?> */
13481 <.*?>
< table.height() ) {
<.*?><.*?> "oPlugins": {}
13482 <.*?>
< table.height() ) {
<.*?><.*?> };
13483  
13484 <.*?>
< table.height() ) {
<.*?><.*?> /**
13485 <.*?>
< table.height() ) {
<.*?><.*?> * Extension object for DataTables that is used to provide all extension
13486 <.*?>
< table.height() ) {
<.*?><.*?> * options.
13487 <.*?>
< table.height() ) {
<.*?><.*?> *
13488 <.*?>
< table.height() ) {
<.*?><.*?> * Note that the `DataTable.ext` object is available through
13489 <.*?>
< table.height() ) {
<.*?><.*?> * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is
13490 <.*?>
< table.height() ) {
<.*?><.*?> * also aliased to `jQuery.fn.dataTableExt` for historic reasons.
13491 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
13492 <.*?>
< table.height() ) {
<.*?><.*?> * @extends DataTable.models.ext
13493 <.*?>
< table.height() ) {
<.*?><.*?> */
13494  
13495  
13496 <.*?>
< table.height() ) {
<.*?><.*?> /**
13497 <.*?>
< table.height() ) {
<.*?><.*?> * DataTables extensions
13498 <.*?>
< table.height() ) {
<.*?><.*?> *
13499 <.*?>
< table.height() ) {
<.*?><.*?> * This namespace acts as a collection area for plug-ins that can be used to
13500 <.*?>
< table.height() ) {
<.*?><.*?> * extend DataTables capabilities. Indeed many of the build in methods
13501 <.*?>
< table.height() ) {
<.*?><.*?> * use this method to provide their own capabilities (sorting methods for
13502 <.*?>
< table.height() ) {
<.*?><.*?> * example).
13503 <.*?>
< table.height() ) {
<.*?><.*?> *
13504 <.*?>
< table.height() ) {
<.*?><.*?> * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy
13505 <.*?>
< table.height() ) {
<.*?><.*?> * reasons
13506 <.*?>
< table.height() ) {
<.*?><.*?> *
13507 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
13508 <.*?>
< table.height() ) {
<.*?><.*?> */
13509 <.*?>
< table.height() ) {
<.*?><.*?> DataTable.ext = _ext = {
13510 <.*?>
< table.height() ) {
<.*?><.*?> /**
13511 <.*?>
< table.height() ) {
<.*?><.*?> * Buttons. For use with the Buttons extension for DataTables. This is
13512 <.*?>
< table.height() ) {
<.*?><.*?> * defined here so other extensions can define buttons regardless of load
13513 <.*?>
< table.height() ) {
<.*?><.*?> * order. It is _not_ used by DataTables core.
13514 <.*?>
< table.height() ) {
<.*?><.*?> *
13515 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13516 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13517 <.*?>
< table.height() ) {
<.*?><.*?> */
13518 <.*?>
< table.height() ) {
<.*?><.*?> buttons: {},
13519  
13520  
13521 <.*?>
< table.height() ) {
<.*?><.*?> /**
13522 <.*?>
< table.height() ) {
<.*?><.*?> * Element class names
13523 <.*?>
< table.height() ) {
<.*?><.*?> *
13524 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13525 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13526 <.*?>
< table.height() ) {
<.*?><.*?> */
13527 <.*?>
< table.height() ) {
<.*?><.*?> classes: {},
13528  
13529  
13530 <.*?>
< table.height() ) {
<.*?><.*?> /**
13531 <.*?>
< table.height() ) {
<.*?><.*?> * Error reporting.
13532 <.*?>
< table.height() ) {
<.*?><.*?> *
13533 <.*?>
< table.height() ) {
<.*?><.*?> * How should DataTables report an error. Can take the value 'alert',
13534 <.*?>
< table.height() ) {
<.*?><.*?> * 'throw', 'none' or a function.
13535 <.*?>
< table.height() ) {
<.*?><.*?> *
13536 <.*?>
< table.height() ) {
<.*?><.*?> * @type string|function
13537 <.*?>
< table.height() ) {
<.*?><.*?> * @default alert
13538 <.*?>
< table.height() ) {
<.*?><.*?> */
13539 <.*?>
< table.height() ) {
<.*?><.*?> errMode: "alert",
13540  
13541  
13542 <.*?>
< table.height() ) {
<.*?><.*?> /**
13543 <.*?>
< table.height() ) {
<.*?><.*?> * Feature plug-ins.
13544 <.*?>
< table.height() ) {
<.*?><.*?> *
13545 <.*?>
< table.height() ) {
<.*?><.*?> * This is an array of objects which describe the feature plug-ins that are
13546 <.*?>
< table.height() ) {
<.*?><.*?> * available to DataTables. These feature plug-ins are then available for
13547 <.*?>
< table.height() ) {
<.*?><.*?> * use through the `dom` initialisation option.
13548 <.*?>
< table.height() ) {
<.*?><.*?> *
13549 <.*?>
< table.height() ) {
<.*?><.*?> * Each feature plug-in is described by an object which must have the
13550 <.*?>
< table.height() ) {
<.*?><.*?> * following properties:
13551 <.*?>
< table.height() ) {
<.*?><.*?> *
13552 <.*?>
< table.height() ) {
<.*?><.*?> * * `fnInit` - function that is used to initialise the plug-in,
13553 <.*?>
< table.height() ) {
<.*?><.*?> * * `cFeature` - a character so the feature can be enabled by the `dom`
13554 <.*?>
< table.height() ) {
<.*?><.*?> * instillation option. This is case sensitive.
13555 <.*?>
< table.height() ) {
<.*?><.*?> *
13556 <.*?>
< table.height() ) {
<.*?><.*?> * The `fnInit` function has the following input parameters:
13557 <.*?>
< table.height() ) {
<.*?><.*?> *
13558 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{object}` DataTables settings object: see
13559 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.models.oSettings}
13560 <.*?>
< table.height() ) {
<.*?><.*?> *
13561 <.*?>
< table.height() ) {
<.*?><.*?> * And the following return is expected:
13562 <.*?>
< table.height() ) {
<.*?><.*?> *
13563 <.*?>
< table.height() ) {
<.*?><.*?> * * {node|null} The element which contains your feature. Note that the
13564 <.*?>
< table.height() ) {
<.*?><.*?> * return may also be void if your plug-in does not require to inject any
13565 <.*?>
< table.height() ) {
<.*?><.*?> * DOM elements into DataTables control (`dom`) - for example this might
13566 <.*?>
< table.height() ) {
<.*?><.*?> * be useful when developing a plug-in which allows table control via
13567 <.*?>
< table.height() ) {
<.*?><.*?> * keyboard entry
13568 <.*?>
< table.height() ) {
<.*?><.*?> *
13569 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13570 <.*?>
< table.height() ) {
<.*?><.*?> *
13571 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13572 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTable.ext.features.push( {
13573 <.*?>
< table.height() ) {
<.*?><.*?> * "fnInit": function( oSettings ) {
13574 <.*?>
< table.height() ) {
<.*?><.*?> * return new TableTools( { "oDTSettings": oSettings } );
13575 <.*?>
< table.height() ) {
<.*?><.*?> * },
13576 <.*?>
< table.height() ) {
<.*?><.*?> * "cFeature": "T"
13577 <.*?>
< table.height() ) {
<.*?><.*?> * } );
13578 <.*?>
< table.height() ) {
<.*?><.*?> */
13579 <.*?>
< table.height() ) {
<.*?><.*?> feature: [],
13580  
13581  
13582 <.*?>
< table.height() ) {
<.*?><.*?> /**
13583 <.*?>
< table.height() ) {
<.*?><.*?> * Row searching.
13584 <.*?>
< table.height() ) {
<.*?><.*?> *
13585 <.*?>
< table.height() ) {
<.*?><.*?> * This method of searching is complimentary to the default type based
13586 <.*?>
< table.height() ) {
<.*?><.*?> * searching, and a lot more comprehensive as it allows you complete control
13587 <.*?>
< table.height() ) {
<.*?><.*?> * over the searching logic. Each element in this array is a function
13588 <.*?>
< table.height() ) {
<.*?><.*?> * (parameters described below) that is called for every row in the table,
13589 <.*?>
< table.height() ) {
<.*?><.*?> * and your logic decides if it should be included in the searching data set
13590 <.*?>
< table.height() ) {
<.*?><.*?> * or not.
13591 <.*?>
< table.height() ) {
<.*?><.*?> *
13592 <.*?>
< table.height() ) {
<.*?><.*?> * Searching functions have the following input parameters:
13593 <.*?>
< table.height() ) {
<.*?><.*?> *
13594 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{object}` DataTables settings object: see
13595 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.models.oSettings}
13596 <.*?>
< table.height() ) {
<.*?><.*?> * 2. `{array|object}` Data for the row to be processed (same as the
13597 <.*?>
< table.height() ) {
<.*?><.*?> * original format that was passed in as the data source, or an array
13598 <.*?>
< table.height() ) {
<.*?><.*?> * from a DOM data source
13599 <.*?>
< table.height() ) {
<.*?><.*?> * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which
13600 <.*?>
< table.height() ) {
<.*?><.*?> * can be useful to retrieve the `TR` element if you need DOM interaction.
13601 <.*?>
< table.height() ) {
<.*?><.*?> *
13602 <.*?>
< table.height() ) {
<.*?><.*?> * And the following return is expected:
13603 <.*?>
< table.height() ) {
<.*?><.*?> *
13604 <.*?>
< table.height() ) {
<.*?><.*?> * * {boolean} Include the row in the searched result set (true) or not
13605 <.*?>
< table.height() ) {
<.*?><.*?> * (false)
13606 <.*?>
< table.height() ) {
<.*?><.*?> *
13607 <.*?>
< table.height() ) {
<.*?><.*?> * Note that as with the main search ability in DataTables, technically this
13608 <.*?>
< table.height() ) {
<.*?><.*?> * is "filtering", since it is subtractive. However, for consistency in
13609 <.*?>
< table.height() ) {
<.*?><.*?> * naming we call it searching here.
13610 <.*?>
< table.height() ) {
<.*?><.*?> *
13611 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13612 <.*?>
< table.height() ) {
<.*?><.*?> * @default []
13613 <.*?>
< table.height() ) {
<.*?><.*?> *
13614 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13615 <.*?>
< table.height() ) {
<.*?><.*?> * // The following example shows custom search being applied to the
13616 <.*?>
< table.height() ) {
<.*?><.*?> * // fourth column (i.e. the data[3] index) based on two input values
13617 <.*?>
< table.height() ) {
<.*?><.*?> * // from the end-user, matching the data in a certain range.
13618 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTable.ext.search.push(
13619 <.*?>
< table.height() ) {
<.*?><.*?> * function( settings, data, dataIndex ) {
13620 <.*?>
< table.height() ) {
<.*?><.*?> * var min = document.getElementById('min').value * 1;
13621 <.*?>
< table.height() ) {
<.*?><.*?> * var max = document.getElementById('max').value * 1;
13622 <.*?>
< table.height() ) {
<.*?><.*?> * var version = data[3] == "-" ? 0 : data[3]*1;
13623 <.*?>
< table.height() ) {
<.*?><.*?> *
13624 <.*?>
< table.height() ) {
<.*?><.*?> * if ( min == "" && max == "" ) {
13625 <.*?>
< table.height() ) {
<.*?><.*?> * return true;
13626 <.*?>
< table.height() ) {
<.*?><.*?> * }
13627 <.*?>
< table.height() ) {
<.*?><.*?> * else if ( min == "" && version < max ) {
13628 <.*?>
< table.height() ) {
<.*?><.*?> * return true;
13629 <.*?>
< table.height() ) {
<.*?><.*?> * }
13630 <.*?>
< table.height() ) {
<.*?><.*?> * else if ( min < version && "" == max ) {
13631 <.*?>
< table.height() ) {
<.*?><.*?> * return true;
13632 <.*?>
< table.height() ) {
<.*?><.*?> * }
13633 <.*?>
< table.height() ) {
<.*?><.*?> * else if ( min < version && version < max ) {
13634 <.*?>
< table.height() ) {
<.*?><.*?> * return true;
13635 <.*?>
< table.height() ) {
<.*?><.*?> * }
13636 <.*?>
< table.height() ) {
<.*?><.*?> * return false;
13637 <.*?>
< table.height() ) {
<.*?><.*?> * }
13638 <.*?>
< table.height() ) {
<.*?><.*?> * );
13639 <.*?>
< table.height() ) {
<.*?><.*?> */
13640 <.*?>
< table.height() ) {
<.*?><.*?> search: [],
13641  
13642  
13643 <.*?>
< table.height() ) {
<.*?><.*?> /**
13644 <.*?>
< table.height() ) {
<.*?><.*?> * Selector extensions
13645 <.*?>
< table.height() ) {
<.*?><.*?> *
13646 <.*?>
< table.height() ) {
<.*?><.*?> * The `selector` option can be used to extend the options available for the
13647 <.*?>
< table.height() ) {
<.*?><.*?> * selector modifier options (`selector-modifier` object data type) that
13648 <.*?>
< table.height() ) {
<.*?><.*?> * each of the three built in selector types offer (row, column and cell +
13649 <.*?>
< table.height() ) {
<.*?><.*?> * their plural counterparts). For example the Select extension uses this
13650 <.*?>
< table.height() ) {
<.*?><.*?> * mechanism to provide an option to select only rows, columns and cells
13651 <.*?>
< table.height() ) {
<.*?><.*?> * that have been marked as selected by the end user (`{selected: true}`),
13652 <.*?>
< table.height() ) {
<.*?><.*?> * which can be used in conjunction with the existing built in selector
13653 <.*?>
< table.height() ) {
<.*?><.*?> * options.
13654 <.*?>
< table.height() ) {
<.*?><.*?> *
13655 <.*?>
< table.height() ) {
<.*?><.*?> * Each property is an array to which functions can be pushed. The functions
13656 <.*?>
< table.height() ) {
<.*?><.*?> * take three attributes:
13657 <.*?>
< table.height() ) {
<.*?><.*?> *
13658 <.*?>
< table.height() ) {
<.*?><.*?> * * Settings object for the host table
13659 <.*?>
< table.height() ) {
<.*?><.*?> * * Options object (`selector-modifier` object type)
13660 <.*?>
< table.height() ) {
<.*?><.*?> * * Array of selected item indexes
13661 <.*?>
< table.height() ) {
<.*?><.*?> *
13662 <.*?>
< table.height() ) {
<.*?><.*?> * The return is an array of the resulting item indexes after the custom
13663 <.*?>
< table.height() ) {
<.*?><.*?> * selector has been applied.
13664 <.*?>
< table.height() ) {
<.*?><.*?> *
13665 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13666 <.*?>
< table.height() ) {
<.*?><.*?> */
13667 <.*?>
< table.height() ) {
<.*?><.*?> selector: {
13668 <.*?>
< table.height() ) {
<.*?><.*?> cell: [],
13669 <.*?>
< table.height() ) {
<.*?><.*?> column: [],
13670 <.*?>
< table.height() ) {
<.*?><.*?> row: []
13671 <.*?>
< table.height() ) {
<.*?><.*?> },
13672  
13673  
13674 <.*?>
< table.height() ) {
<.*?><.*?> /**
13675 <.*?>
< table.height() ) {
<.*?><.*?> * Internal functions, exposed for used in plug-ins.
13676 <.*?>
< table.height() ) {
<.*?><.*?> *
13677 <.*?>
< table.height() ) {
<.*?><.*?> * Please note that you should not need to use the internal methods for
13678 <.*?>
< table.height() ) {
<.*?><.*?> * anything other than a plug-in (and even then, try to avoid if possible).
13679 <.*?>
< table.height() ) {
<.*?><.*?> * The internal function may change between releases.
13680 <.*?>
< table.height() ) {
<.*?><.*?> *
13681 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13682 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13683 <.*?>
< table.height() ) {
<.*?><.*?> */
13684 <.*?>
< table.height() ) {
<.*?><.*?> internal: {},
13685  
13686  
13687 <.*?>
< table.height() ) {
<.*?><.*?> /**
13688 <.*?>
< table.height() ) {
<.*?><.*?> * Legacy configuration options. Enable and disable legacy options that
13689 <.*?>
< table.height() ) {
<.*?><.*?> * are available in DataTables.
13690 <.*?>
< table.height() ) {
<.*?><.*?> *
13691 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13692 <.*?>
< table.height() ) {
<.*?><.*?> */
13693 <.*?>
< table.height() ) {
<.*?><.*?> legacy: {
13694 <.*?>
< table.height() ) {
<.*?><.*?> /**
13695 <.*?>
< table.height() ) {
<.*?><.*?> * Enable / disable DataTables 1.9 compatible server-side processing
13696 <.*?>
< table.height() ) {
<.*?><.*?> * requests
13697 <.*?>
< table.height() ) {
<.*?><.*?> *
13698 <.*?>
< table.height() ) {
<.*?><.*?> * @type boolean
13699 <.*?>
< table.height() ) {
<.*?><.*?> * @default null
13700 <.*?>
< table.height() ) {
<.*?><.*?> */
13701 <.*?>
< table.height() ) {
<.*?><.*?> ajax: null
13702 <.*?>
< table.height() ) {
<.*?><.*?> },
13703  
13704  
13705 <.*?>
< table.height() ) {
<.*?><.*?> /**
13706 <.*?>
< table.height() ) {
<.*?><.*?> * Pagination plug-in methods.
13707 <.*?>
< table.height() ) {
<.*?><.*?> *
13708 <.*?>
< table.height() ) {
<.*?><.*?> * Each entry in this object is a function and defines which buttons should
13709 <.*?>
< table.height() ) {
<.*?><.*?> * be shown by the pagination rendering method that is used for the table:
13710 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the
13711 <.*?>
< table.height() ) {
<.*?><.*?> * buttons are displayed in the document, while the functions here tell it
13712 <.*?>
< table.height() ) {
<.*?><.*?> * what buttons to display. This is done by returning an array of button
13713 <.*?>
< table.height() ) {
<.*?><.*?> * descriptions (what each button will do).
13714 <.*?>
< table.height() ) {
<.*?><.*?> *
13715 <.*?>
< table.height() ) {
<.*?><.*?> * Pagination types (the four built in options and any additional plug-in
13716 <.*?>
< table.height() ) {
<.*?><.*?> * options defined here) can be used through the `paginationType`
13717 <.*?>
< table.height() ) {
<.*?><.*?> * initialisation parameter.
13718 <.*?>
< table.height() ) {
<.*?><.*?> *
13719 <.*?>
< table.height() ) {
<.*?><.*?> * The functions defined take two parameters:
13720 <.*?>
< table.height() ) {
<.*?><.*?> *
13721 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{int} page` The current page index
13722 <.*?>
< table.height() ) {
<.*?><.*?> * 2. `{int} pages` The number of pages in the table
13723 <.*?>
< table.height() ) {
<.*?><.*?> *
13724 <.*?>
< table.height() ) {
<.*?><.*?> * Each function is expected to return an array where each element of the
13725 <.*?>
< table.height() ) {
<.*?><.*?> * array can be one of:
13726 <.*?>
< table.height() ) {
<.*?><.*?> *
13727 <.*?>
< table.height() ) {
<.*?><.*?> * * `first` - Jump to first page when activated
13728 <.*?>
< table.height() ) {
<.*?><.*?> * * `last` - Jump to last page when activated
13729 <.*?>
< table.height() ) {
<.*?><.*?> * * `previous` - Show previous page when activated
13730 <.*?>
< table.height() ) {
<.*?><.*?> * * `next` - Show next page when activated
13731 <.*?>
< table.height() ) {
<.*?><.*?> * * `{int}` - Show page of the index given
13732 <.*?>
< table.height() ) {
<.*?><.*?> * * `{array}` - A nested array containing the above elements to add a
13733 <.*?>
< table.height() ) {
<.*?><.*?> * containing 'DIV' element (might be useful for styling).
13734 <.*?>
< table.height() ) {
<.*?><.*?> *
13735 <.*?>
< table.height() ) {
<.*?><.*?> * Note that DataTables v1.9- used this object slightly differently whereby
13736 <.*?>
< table.height() ) {
<.*?><.*?> * an object with two functions would be defined for each plug-in. That
13737 <.*?>
< table.height() ) {
<.*?><.*?> * ability is still supported by DataTables 1.10+ to provide backwards
13738 <.*?>
< table.height() ) {
<.*?><.*?> * compatibility, but this option of use is now decremented and no longer
13739 <.*?>
< table.height() ) {
<.*?><.*?> * documented in DataTables 1.10+.
13740 <.*?>
< table.height() ) {
<.*?><.*?> *
13741 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13742 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13743 <.*?>
< table.height() ) {
<.*?><.*?> *
13744 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13745 <.*?>
< table.height() ) {
<.*?><.*?> * // Show previous, next and current page buttons only
13746 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTableExt.oPagination.current = function ( page, pages ) {
13747 <.*?>
< table.height() ) {
<.*?><.*?> * return [ 'previous', page, 'next' ];
13748 <.*?>
< table.height() ) {
<.*?><.*?> * };
13749 <.*?>
< table.height() ) {
<.*?><.*?> */
13750 <.*?>
< table.height() ) {
<.*?><.*?> pager: {},
13751  
13752  
13753 <.*?>
< table.height() ) {
<.*?><.*?> renderer: {
13754 <.*?>
< table.height() ) {
<.*?><.*?> pageButton: {},
13755 <.*?>
< table.height() ) {
<.*?><.*?> header: {}
13756 <.*?>
< table.height() ) {
<.*?><.*?> },
13757  
13758  
13759 <.*?>
< table.height() ) {
<.*?><.*?> /**
13760 <.*?>
< table.height() ) {
<.*?><.*?> * Ordering plug-ins - custom data source
13761 <.*?>
< table.height() ) {
<.*?><.*?> *
13762 <.*?>
< table.height() ) {
<.*?><.*?> * The extension options for ordering of data available here is complimentary
13763 <.*?>
< table.height() ) {
<.*?><.*?> * to the default type based ordering that DataTables typically uses. It
13764 <.*?>
< table.height() ) {
<.*?><.*?> * allows much greater control over the the data that is being used to
13765 <.*?>
< table.height() ) {
<.*?><.*?> * order a column, but is necessarily therefore more complex.
13766 <.*?>
< table.height() ) {
<.*?><.*?> *
13767 <.*?>
< table.height() ) {
<.*?><.*?> * This type of ordering is useful if you want to do ordering based on data
13768 <.*?>
< table.height() ) {
<.*?><.*?> * live from the DOM (for example the contents of an 'input' element) rather
13769 <.*?>
< table.height() ) {
<.*?><.*?> * than just the static string that DataTables knows of.
13770 <.*?>
< table.height() ) {
<.*?><.*?> *
13771 <.*?>
< table.height() ) {
<.*?><.*?> * The way these plug-ins work is that you create an array of the values you
13772 <.*?>
< table.height() ) {
<.*?><.*?> * wish to be ordering for the column in question and then return that
13773 <.*?>
< table.height() ) {
<.*?><.*?> * array. The data in the array much be in the index order of the rows in
13774 <.*?>
< table.height() ) {
<.*?><.*?> * the table (not the currently ordering order!). Which order data gathering
13775 <.*?>
< table.height() ) {
<.*?><.*?> * function is run here depends on the `dt-init columns.orderDataType`
13776 <.*?>
< table.height() ) {
<.*?><.*?> * parameter that is used for the column (if any).
13777 <.*?>
< table.height() ) {
<.*?><.*?> *
13778 <.*?>
< table.height() ) {
<.*?><.*?> * The functions defined take two parameters:
13779 <.*?>
< table.height() ) {
<.*?><.*?> *
13780 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{object}` DataTables settings object: see
13781 <.*?>
< table.height() ) {
<.*?><.*?> * {@link DataTable.models.oSettings}
13782 <.*?>
< table.height() ) {
<.*?><.*?> * 2. `{int}` Target column index
13783 <.*?>
< table.height() ) {
<.*?><.*?> *
13784 <.*?>
< table.height() ) {
<.*?><.*?> * Each function is expected to return an array:
13785 <.*?>
< table.height() ) {
<.*?><.*?> *
13786 <.*?>
< table.height() ) {
<.*?><.*?> * * `{array}` Data for the column to be ordering upon
13787 <.*?>
< table.height() ) {
<.*?><.*?> *
13788 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13789 <.*?>
< table.height() ) {
<.*?><.*?> *
13790 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13791 <.*?>
< table.height() ) {
<.*?><.*?> * // Ordering using `input` node values
13792 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
13793 <.*?>
< table.height() ) {
<.*?><.*?> * {
13794 <.*?>
< table.height() ) {
<.*?><.*?> * return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
13795 <.*?>
< table.height() ) {
<.*?><.*?> * return $('input', td).val();
13796 <.*?>
< table.height() ) {
<.*?><.*?> * } );
13797 <.*?>
< table.height() ) {
<.*?><.*?> * }
13798 <.*?>
< table.height() ) {
<.*?><.*?> */
13799 <.*?>
< table.height() ) {
<.*?><.*?> order: {},
13800  
13801  
13802 <.*?>
< table.height() ) {
<.*?><.*?> /**
13803 <.*?>
< table.height() ) {
<.*?><.*?> * Type based plug-ins.
13804 <.*?>
< table.height() ) {
<.*?><.*?> *
13805 <.*?>
< table.height() ) {
<.*?><.*?> * Each column in DataTables has a type assigned to it, either by automatic
13806 <.*?>
< table.height() ) {
<.*?><.*?> * detection or by direct assignment using the `type` option for the column.
13807 <.*?>
< table.height() ) {
<.*?><.*?> * The type of a column will effect how it is ordering and search (plug-ins
13808 <.*?>
< table.height() ) {
<.*?><.*?> * can also make use of the column type if required).
13809 <.*?>
< table.height() ) {
<.*?><.*?> *
13810 <.*?>
< table.height() ) {
<.*?><.*?> * @namespace
13811 <.*?>
< table.height() ) {
<.*?><.*?> */
13812 <.*?>
< table.height() ) {
<.*?><.*?> type: {
13813 <.*?>
< table.height() ) {
<.*?><.*?> /**
13814 <.*?>
< table.height() ) {
<.*?><.*?> * Type detection functions.
13815 <.*?>
< table.height() ) {
<.*?><.*?> *
13816 <.*?>
< table.height() ) {
<.*?><.*?> * The functions defined in this object are used to automatically detect
13817 <.*?>
< table.height() ) {
<.*?><.*?> * a column's type, making initialisation of DataTables super easy, even
13818 <.*?>
< table.height() ) {
<.*?><.*?> * when complex data is in the table.
13819 <.*?>
< table.height() ) {
<.*?><.*?> *
13820 <.*?>
< table.height() ) {
<.*?><.*?> * The functions defined take two parameters:
13821 <.*?>
< table.height() ) {
<.*?><.*?> *
13822 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{*}` Data from the column cell to be analysed
13823 <.*?>
< table.height() ) {
<.*?><.*?> * 2. `{settings}` DataTables settings object. This can be used to
13824 <.*?>
< table.height() ) {
<.*?><.*?> * perform context specific type detection - for example detection
13825 <.*?>
< table.height() ) {
<.*?><.*?> * based on language settings such as using a comma for a decimal
13826 <.*?>
< table.height() ) {
<.*?><.*?> * place. Generally speaking the options from the settings will not
13827 <.*?>
< table.height() ) {
<.*?><.*?> * be required
13828 <.*?>
< table.height() ) {
<.*?><.*?> *
13829 <.*?>
< table.height() ) {
<.*?><.*?> * Each function is expected to return:
13830 <.*?>
< table.height() ) {
<.*?><.*?> *
13831 <.*?>
< table.height() ) {
<.*?><.*?> * * `{string|null}` Data type detected, or null if unknown (and thus
13832 <.*?>
< table.height() ) {
<.*?><.*?> * pass it on to the other type detection functions.
13833 <.*?>
< table.height() ) {
<.*?><.*?> *
13834 <.*?>
< table.height() ) {
<.*?><.*?> * @type array
13835 <.*?>
< table.height() ) {
<.*?><.*?> *
13836 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13837 <.*?>
< table.height() ) {
<.*?><.*?> * // Currency type detection plug-in:
13838 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTable.ext.type.detect.push(
13839 <.*?>
< table.height() ) {
<.*?><.*?> * function ( data, settings ) {
13840 <.*?>
< table.height() ) {
<.*?><.*?> * // Check the numeric part
13841 <.*?>
< table.height() ) {
<.*?><.*?> * if ( ! $.isNumeric( data.substring(1) ) ) {
13842 <.*?>
< table.height() ) {
<.*?><.*?> * return null;
13843 <.*?>
< table.height() ) {
<.*?><.*?> * }
13844 <.*?>
< table.height() ) {
<.*?><.*?> *
13845 <.*?>
< table.height() ) {
<.*?><.*?> * // Check prefixed by currency
13846 <.*?>
< table.height() ) {
<.*?><.*?> * if ( data.charAt(0) == '$' || data.charAt(0) == '&pound;' ) {
13847 <.*?>
< table.height() ) {
<.*?><.*?> * return 'currency';
13848 <.*?>
< table.height() ) {
<.*?><.*?> * }
13849 <.*?>
< table.height() ) {
<.*?><.*?> * return null;
13850 <.*?>
< table.height() ) {
<.*?><.*?> * }
13851 <.*?>
< table.height() ) {
<.*?><.*?> * );
13852 <.*?>
< table.height() ) {
<.*?><.*?> */
13853 <.*?>
< table.height() ) {
<.*?><.*?> detect: [],
13854  
13855  
13856 <.*?>
< table.height() ) {
<.*?><.*?> /**
13857 <.*?>
< table.height() ) {
<.*?><.*?> * Type based search formatting.
13858 <.*?>
< table.height() ) {
<.*?><.*?> *
13859 <.*?>
< table.height() ) {
<.*?><.*?> * The type based searching functions can be used to pre-format the
13860 <.*?>
< table.height() ) {
<.*?><.*?> * data to be search on. For example, it can be used to strip HTML
13861 <.*?>
< table.height() ) {
<.*?><.*?> * tags or to de-format telephone numbers for numeric only searching.
13862 <.*?>
< table.height() ) {
<.*?><.*?> *
13863 <.*?>
< table.height() ) {
<.*?><.*?> * Note that is a search is not defined for a column of a given type,
13864 <.*?>
< table.height() ) {
<.*?><.*?> * no search formatting will be performed.
13865 <.*?>
< table.height() ) {
<.*?><.*?> *
13866 <.*?>
< table.height() ) {
<.*?><.*?> * Pre-processing of searching data plug-ins - When you assign the sType
13867 <.*?>
< table.height() ) {
<.*?><.*?> * for a column (or have it automatically detected for you by DataTables
13868 <.*?>
< table.height() ) {
<.*?><.*?> * or a type detection plug-in), you will typically be using this for
13869 <.*?>
< table.height() ) {
<.*?><.*?> * custom sorting, but it can also be used to provide custom searching
13870 <.*?>
< table.height() ) {
<.*?><.*?> * by allowing you to pre-processing the data and returning the data in
13871 <.*?>
< table.height() ) {
<.*?><.*?> * the format that should be searched upon. This is done by adding
13872 <.*?>
< table.height() ) {
<.*?><.*?> * functions this object with a parameter name which matches the sType
13873 <.*?>
< table.height() ) {
<.*?><.*?> * for that target column. This is the corollary of <i>afnSortData</i>
13874 <.*?>
< table.height() ) {
<.*?><.*?> * for searching data.
13875 <.*?>
< table.height() ) {
<.*?><.*?> *
13876 <.*?>
< table.height() ) {
<.*?><.*?> * The functions defined take a single parameter:
13877 <.*?>
< table.height() ) {
<.*?><.*?> *
13878 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{*}` Data from the column cell to be prepared for searching
13879 <.*?>
< table.height() ) {
<.*?><.*?> *
13880 <.*?>
< table.height() ) {
<.*?><.*?> * Each function is expected to return:
13881 <.*?>
< table.height() ) {
<.*?><.*?> *
13882 <.*?>
< table.height() ) {
<.*?><.*?> * * `{string|null}` Formatted string that will be used for the searching.
13883 <.*?>
< table.height() ) {
<.*?><.*?> *
13884 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13885 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13886 <.*?>
< table.height() ) {
<.*?><.*?> *
13887 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13888 <.*?>
< table.height() ) {
<.*?><.*?> * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {
13889 <.*?>
< table.height() ) {
<.*?><.*?> * return d.replace(/\n/g," ").replace( /<.*?>/g, "" );
13890 <.*?>
< table.height() ) {
<.*?><.*?> * }
13891 <.*?>
< table.height() ) {
<.*?><.*?> */
13892 <.*?>
< table.height() ) {
<.*?><.*?> search: {},
13893  
13894  
13895 <.*?>
< table.height() ) {
<.*?><.*?> /**
13896 <.*?>
< table.height() ) {
<.*?><.*?> * Type based ordering.
13897 <.*?>
< table.height() ) {
<.*?><.*?> *
13898 <.*?>
< table.height() ) {
<.*?><.*?> * The column type tells DataTables what ordering to apply to the table
13899 <.*?>
< table.height() ) {
<.*?><.*?> * when a column is sorted upon. The order for each type that is defined,
13900 <.*?>
< table.height() ) {
<.*?><.*?> * is defined by the functions available in this object.
13901 <.*?>
< table.height() ) {
<.*?><.*?> *
13902 <.*?>
< table.height() ) {
<.*?><.*?> * Each ordering option can be described by three properties added to
13903 <.*?>
< table.height() ) {
<.*?><.*?> * this object:
13904 <.*?>
< table.height() ) {
<.*?><.*?> *
13905 <.*?>
< table.height() ) {
<.*?><.*?> * * `{type}-pre` - Pre-formatting function
13906 <.*?>
< table.height() ) {
<.*?><.*?> * * `{type}-asc` - Ascending order function
13907 <.*?>
< table.height() ) {
<.*?><.*?> * * `{type}-desc` - Descending order function
13908 <.*?>
< table.height() ) {
<.*?><.*?> *
13909 <.*?>
< table.height() ) {
<.*?><.*?> * All three can be used together, only `{type}-pre` or only
13910 <.*?>
< table.height() ) {
<.*?><.*?> * `{type}-asc` and `{type}-desc` together. It is generally recommended
13911 <.*?>
< table.height() ) {
<.*?><.*?> * that only `{type}-pre` is used, as this provides the optimal
13912 <.*?>
< table.height() ) {
<.*?><.*?> * implementation in terms of speed, although the others are provided
13913 <.*?>
< table.height() ) {
<.*?><.*?> * for compatibility with existing Javascript sort functions.
13914 <.*?>
< table.height() ) {
<.*?><.*?> *
13915 <.*?>
< table.height() ) {
<.*?><.*?> * `{type}-pre`: Functions defined take a single parameter:
13916 <.*?>
< table.height() ) {
<.*?><.*?> *
13917 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{*}` Data from the column cell to be prepared for ordering
13918 <.*?>
< table.height() ) {
<.*?><.*?> *
13919 <.*?>
< table.height() ) {
<.*?><.*?> * And return:
13920 <.*?>
< table.height() ) {
<.*?><.*?> *
13921 <.*?>
< table.height() ) {
<.*?><.*?> * * `{*}` Data to be sorted upon
13922 <.*?>
< table.height() ) {
<.*?><.*?> *
13923 <.*?>
< table.height() ) {
<.*?><.*?> * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort
13924 <.*?>
< table.height() ) {
<.*?><.*?> * functions, taking two parameters:
13925 <.*?>
< table.height() ) {
<.*?><.*?> *
13926 <.*?>
< table.height() ) {
<.*?><.*?> * 1. `{*}` Data to compare to the second parameter
13927 <.*?>
< table.height() ) {
<.*?><.*?> * 2. `{*}` Data to compare to the first parameter
13928 <.*?>
< table.height() ) {
<.*?><.*?> *
13929 <.*?>
< table.height() ) {
<.*?><.*?> * And returning:
13930 <.*?>
< table.height() ) {
<.*?><.*?> *
13931 <.*?>
< table.height() ) {
<.*?><.*?> * * `{*}` Ordering match: <0 if first parameter should be sorted lower
13932 <.*?>
< table.height() ) {
<.*?><.*?> * than the second parameter, ===0 if the two parameters are equal and
13933 <.*?>
< table.height() ) {
<.*?><.*?> * >0 if the first parameter should be sorted height than the second
13934 <.*?>
< table.height() ) {
<.*?><.*?> * parameter.
13935 <.*?>
< table.height() ) {
<.*?><.*?> *
13936 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13937 <.*?>
< table.height() ) {
<.*?><.*?> * @default {}
13938 <.*?>
< table.height() ) {
<.*?><.*?> *
13939 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13940 <.*?>
< table.height() ) {
<.*?><.*?> * // Numeric ordering of formatted numbers with a pre-formatter
13941 <.*?>
< table.height() ) {
<.*?><.*?> * $.extend( $.fn.dataTable.ext.type.order, {
13942 <.*?>
< table.height() ) {
<.*?><.*?> * "string-pre": function(x) {
13943 <.*?>
< table.height() ) {
<.*?><.*?> * a = (a === "-" || a === "") ? 0 : a.replace( /[^\d\-\.]/g, "" );
13944 <.*?>
< table.height() ) {
<.*?><.*?> * return parseFloat( a );
13945 <.*?>
< table.height() ) {
<.*?><.*?> * }
13946 <.*?>
< table.height() ) {
<.*?><.*?> * } );
13947 <.*?>
< table.height() ) {
<.*?><.*?> *
13948 <.*?>
< table.height() ) {
<.*?><.*?> * @example
13949 <.*?>
< table.height() ) {
<.*?><.*?> * // Case-sensitive string ordering, with no pre-formatting method
13950 <.*?>
< table.height() ) {
<.*?><.*?> * $.extend( $.fn.dataTable.ext.order, {
13951 <.*?>
< table.height() ) {
<.*?><.*?> * "string-case-asc": function(x,y) {
13952 <.*?>
< table.height() ) {
<.*?><.*?> * return ((x < y) ? -1 : ((x > y) ? 1 : 0));
13953 <.*?>
< table.height() ) {
<.*?><.*?> * },
13954 <.*?>
< table.height() ) {
<.*?><.*?> * "string-case-desc": function(x,y) {
13955 <.*?>
< table.height() ) {
<.*?><.*?> * return ((x < y) ? 1 : ((x > y) ? -1 : 0));
13956 <.*?>
< table.height() ) {
<.*?><.*?> * }
13957 <.*?>
< table.height() ) {
<.*?><.*?> * } );
13958 <.*?>
< table.height() ) {
<.*?><.*?> */
13959 <.*?>
< table.height() ) {
<.*?><.*?> order: {}
13960 <.*?>
< table.height() ) {
<.*?><.*?> },
13961  
13962 <.*?>
< table.height() ) {
<.*?><.*?> /**
13963 <.*?>
< table.height() ) {
<.*?><.*?> * Unique DataTables instance counter
13964 <.*?>
< table.height() ) {
<.*?><.*?> *
13965 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13966 <.*?>
< table.height() ) {
<.*?><.*?> * @private
13967 <.*?>
< table.height() ) {
<.*?><.*?> */
13968 <.*?>
< table.height() ) {
<.*?><.*?> _unique: 0,
13969  
13970  
13971 <.*?>
< table.height() ) {
<.*?><.*?> //
13972 <.*?>
< table.height() ) {
<.*?><.*?> // Depreciated
13973 <.*?>
< table.height() ) {
<.*?><.*?> // The following properties are retained for backwards compatiblity only.
13974 <.*?>
< table.height() ) {
<.*?><.*?> // The should not be used in new projects and will be removed in a future
13975 <.*?>
< table.height() ) {
<.*?><.*?> // version
13976 <.*?>
< table.height() ) {
<.*?><.*?> //
13977  
13978 <.*?>
< table.height() ) {
<.*?><.*?> /**
13979 <.*?>
< table.height() ) {
<.*?><.*?> * Version check function.
13980 <.*?>
< table.height() ) {
<.*?><.*?> * @type function
13981 <.*?>
< table.height() ) {
<.*?><.*?> * @depreciated Since 1.10
13982 <.*?>
< table.height() ) {
<.*?><.*?> */
13983 <.*?>
< table.height() ) {
<.*?><.*?> fnVersionCheck: DataTable.fnVersionCheck,
13984  
13985  
13986 <.*?>
< table.height() ) {
<.*?><.*?> /**
13987 <.*?>
< table.height() ) {
<.*?><.*?> * Index for what 'this' index API functions should use
13988 <.*?>
< table.height() ) {
<.*?><.*?> * @type int
13989 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
13990 <.*?>
< table.height() ) {
<.*?><.*?> */
13991 <.*?>
< table.height() ) {
<.*?><.*?> iApiIndex: 0,
13992  
13993  
13994 <.*?>
< table.height() ) {
<.*?><.*?> /**
13995 <.*?>
< table.height() ) {
<.*?><.*?> * jQuery UI class container
13996 <.*?>
< table.height() ) {
<.*?><.*?> * @type object
13997 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
13998 <.*?>
< table.height() ) {
<.*?><.*?> */
13999 <.*?>
< table.height() ) {
<.*?><.*?> oJUIClasses: {},
14000  
14001  
14002 <.*?>
< table.height() ) {
<.*?><.*?> /**
14003 <.*?>
< table.height() ) {
<.*?><.*?> * Software version
14004 <.*?>
< table.height() ) {
<.*?><.*?> * @type string
14005 <.*?>
< table.height() ) {
<.*?><.*?> * @deprecated Since v1.10
14006 <.*?>
< table.height() ) {
<.*?><.*?> */
14007 <.*?>
< table.height() ) {
<.*?><.*?> sVersion: DataTable.version
14008 <.*?>
< table.height() ) {
<.*?><.*?> };
14009  
14010  
14011 <.*?>
< table.height() ) {
<.*?><.*?> //
14012 <.*?>
< table.height() ) {
<.*?><.*?> // Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts
14013 <.*?>
< table.height() ) {
<.*?><.*?> //
14014 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( _ext, {
14015 <.*?>
< table.height() ) {
<.*?><.*?> afnFiltering: _ext.search,
14016 <.*?>
< table.height() ) {
<.*?><.*?> aTypes: _ext.type.detect,
14017 <.*?>
< table.height() ) {
<.*?><.*?> ofnSearch: _ext.type.search,
14018 <.*?>
< table.height() ) {
<.*?><.*?> oSort: _ext.type.order,
14019 <.*?>
< table.height() ) {
<.*?><.*?> afnSortData: _ext.order,
14020 <.*?>
< table.height() ) {
<.*?><.*?> aoFeatures: _ext.feature,
14021 <.*?>
< table.height() ) {
<.*?><.*?> oApi: _ext.internal,
14022 <.*?>
< table.height() ) {
<.*?><.*?> oStdClasses: _ext.classes,
14023 <.*?>
< table.height() ) {
<.*?><.*?> oPagination: _ext.pager
14024 <.*?>
< table.height() ) {
<.*?><.*?> } );
14025  
14026  
14027 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( DataTable.ext.classes, {
14028 <.*?>
< table.height() ) {
<.*?><.*?> "sTable": "dataTable",
14029 <.*?>
< table.height() ) {
<.*?><.*?> "sNoFooter": "no-footer",
14030  
14031 <.*?>
< table.height() ) {
<.*?><.*?> /* Paging buttons */
14032 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButton": "paginate_button",
14033 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButtonActive": "current",
14034 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButtonDisabled": "disabled",
14035  
14036 <.*?>
< table.height() ) {
<.*?><.*?> /* Striping classes */
14037 <.*?>
< table.height() ) {
<.*?><.*?> "sStripeOdd": "odd",
14038 <.*?>
< table.height() ) {
<.*?><.*?> "sStripeEven": "even",
14039  
14040 <.*?>
< table.height() ) {
<.*?><.*?> /* Empty row */
14041 <.*?>
< table.height() ) {
<.*?><.*?> "sRowEmpty": "dataTables_empty",
14042  
14043 <.*?>
< table.height() ) {
<.*?><.*?> /* Features */
14044 <.*?>
< table.height() ) {
<.*?><.*?> "sWrapper": "dataTables_wrapper",
14045 <.*?>
< table.height() ) {
<.*?><.*?> "sFilter": "dataTables_filter",
14046 <.*?>
< table.height() ) {
<.*?><.*?> "sInfo": "dataTables_info",
14047 <.*?>
< table.height() ) {
<.*?><.*?> "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
14048 <.*?>
< table.height() ) {
<.*?><.*?> "sLength": "dataTables_length",
14049 <.*?>
< table.height() ) {
<.*?><.*?> "sProcessing": "dataTables_processing",
14050  
14051 <.*?>
< table.height() ) {
<.*?><.*?> /* Sorting */
14052 <.*?>
< table.height() ) {
<.*?><.*?> "sSortAsc": "sorting_asc",
14053 <.*?>
< table.height() ) {
<.*?><.*?> "sSortDesc": "sorting_desc",
14054 <.*?>
< table.height() ) {
<.*?><.*?> "sSortable": "sorting", /* Sortable in both directions */
14055 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableAsc": "sorting_asc_disabled",
14056 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableDesc": "sorting_desc_disabled",
14057 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableNone": "sorting_disabled",
14058 <.*?>
< table.height() ) {
<.*?><.*?> "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
14059  
14060 <.*?>
< table.height() ) {
<.*?><.*?> /* Filtering */
14061 <.*?>
< table.height() ) {
<.*?><.*?> "sFilterInput": "",
14062  
14063 <.*?>
< table.height() ) {
<.*?><.*?> /* Page length */
14064 <.*?>
< table.height() ) {
<.*?><.*?> "sLengthSelect": "",
14065  
14066 <.*?>
< table.height() ) {
<.*?><.*?> /* Scrolling */
14067 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollWrapper": "dataTables_scroll",
14068 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollHead": "dataTables_scrollHead",
14069 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollHeadInner": "dataTables_scrollHeadInner",
14070 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollBody": "dataTables_scrollBody",
14071 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollFoot": "dataTables_scrollFoot",
14072 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollFootInner": "dataTables_scrollFootInner",
14073  
14074 <.*?>
< table.height() ) {
<.*?><.*?> /* Misc */
14075 <.*?>
< table.height() ) {
<.*?><.*?> "sHeaderTH": "",
14076 <.*?>
< table.height() ) {
<.*?><.*?> "sFooterTH": "",
14077  
14078 <.*?>
< table.height() ) {
<.*?><.*?> // Deprecated
14079 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIAsc": "",
14080 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIDesc": "",
14081 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUI": "",
14082 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIAscAllowed": "",
14083 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIDescAllowed": "",
14084 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIWrapper": "",
14085 <.*?>
< table.height() ) {
<.*?><.*?> "sSortIcon": "",
14086 <.*?>
< table.height() ) {
<.*?><.*?> "sJUIHeader": "",
14087 <.*?>
< table.height() ) {
<.*?><.*?> "sJUIFooter": ""
14088 <.*?>
< table.height() ) {
<.*?><.*?> } );
14089  
14090  
14091 <.*?>
< table.height() ) {
<.*?><.*?> (function() {
14092  
14093 <.*?>
< table.height() ) {
<.*?><.*?> // Reused strings for better compression. Closure compiler appears to have a
14094 <.*?>
< table.height() ) {
<.*?><.*?> // weird edge case where it is trying to expand strings rather than use the
14095 <.*?>
< table.height() ) {
<.*?><.*?> // variable version. This results in about 200 bytes being added, for very
14096 <.*?>
< table.height() ) {
<.*?><.*?> // little preference benefit since it this run on script load only.
14097 <.*?>
< table.height() ) {
<.*?><.*?> var _empty = '';
14098 <.*?>
< table.height() ) {
<.*?><.*?> _empty = '';
14099  
14100 <.*?>
< table.height() ) {
<.*?><.*?> var _stateDefault = _empty + 'ui-state-default';
14101 <.*?>
< table.height() ) {
<.*?><.*?> var _sortIcon = _empty + 'css_right ui-icon ui-icon-';
14102 <.*?>
< table.height() ) {
<.*?><.*?> var _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix';
14103  
14104 <.*?>
< table.height() ) {
<.*?><.*?> $.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, {
14105 <.*?>
< table.height() ) {
<.*?><.*?> /* Full numbers paging buttons */
14106 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButton": "fg-button ui-button "+_stateDefault,
14107 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButtonActive": "ui-state-disabled",
14108 <.*?>
< table.height() ) {
<.*?><.*?> "sPageButtonDisabled": "ui-state-disabled",
14109  
14110 <.*?>
< table.height() ) {
<.*?><.*?> /* Features */
14111 <.*?>
< table.height() ) {
<.*?><.*?> "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
14112 <.*?>
< table.height() ) {
<.*?><.*?> "ui-buttonset-multi paging_", /* Note that the type is postfixed */
14113  
14114 <.*?>
< table.height() ) {
<.*?><.*?> /* Sorting */
14115 <.*?>
< table.height() ) {
<.*?><.*?> "sSortAsc": _stateDefault+" sorting_asc",
14116 <.*?>
< table.height() ) {
<.*?><.*?> "sSortDesc": _stateDefault+" sorting_desc",
14117 <.*?>
< table.height() ) {
<.*?><.*?> "sSortable": _stateDefault+" sorting",
14118 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableAsc": _stateDefault+" sorting_asc_disabled",
14119 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableDesc": _stateDefault+" sorting_desc_disabled",
14120 <.*?>
< table.height() ) {
<.*?><.*?> "sSortableNone": _stateDefault+" sorting_disabled",
14121 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIAsc": _sortIcon+"triangle-1-n",
14122 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIDesc": _sortIcon+"triangle-1-s",
14123 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUI": _sortIcon+"carat-2-n-s",
14124 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIAscAllowed": _sortIcon+"carat-1-n",
14125 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIDescAllowed": _sortIcon+"carat-1-s",
14126 <.*?>
< table.height() ) {
<.*?><.*?> "sSortJUIWrapper": "DataTables_sort_wrapper",
14127 <.*?>
< table.height() ) {
<.*?><.*?> "sSortIcon": "DataTables_sort_icon",
14128  
14129 <.*?>
< table.height() ) {
<.*?><.*?> /* Scrolling */
14130 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollHead": "dataTables_scrollHead "+_stateDefault,
14131 <.*?>
< table.height() ) {
<.*?><.*?> "sScrollFoot": "dataTables_scrollFoot "+_stateDefault,
14132  
14133 <.*?>
< table.height() ) {
<.*?><.*?> /* Misc */
14134 <.*?>
< table.height() ) {
<.*?><.*?> "sHeaderTH": _stateDefault,
14135 <.*?>
< table.height() ) {
<.*?><.*?> "sFooterTH": _stateDefault,
14136 <.*?>
< table.height() ) {
<.*?><.*?> "sJUIHeader": _headerFooter+" ui-corner-tl ui-corner-tr",
14137 <.*?>
< table.height() ) {
<.*?><.*?> "sJUIFooter": _headerFooter+" ui-corner-bl ui-corner-br"
14138 <.*?>
< table.height() ) {
<.*?><.*?> } );
14139  
14140 <.*?>
< table.height() ) {
<.*?><.*?> }());
14141  
14142  
14143  
14144 <.*?>
< table.height() ) {
<.*?><.*?> var extPagination = DataTable.ext.pager;
14145  
14146 <.*?>
< table.height() ) {
<.*?><.*?> function _numbers ( page, pages ) {
14147 <.*?>
< table.height() ) {
<.*?><.*?> var
14148 <.*?>
< table.height() ) {
<.*?><.*?> numbers = [],
14149 <.*?>
< table.height() ) {
<.*?><.*?> buttons = extPagination.numbers_length,
14150 <.*?>
< table.height() ) {
<.*?><.*?> half = Math.floor( buttons / 2 ),
14151 <.*?>
< table.height() ) {
<.*?><.*?> i = 1;
14152  
14153 <.*?>
< table.height() ) {
<.*?><.*?> if ( pages <= buttons ) {
14154 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) { numbers = _range( 0, pages );
14155 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) { }
14156 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) { else if ( page <= half ) {
14157 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers = _range( 0, buttons-2 );
14158 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.push( 'ellipsis' );
14159 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.push( pages-1 );
14160 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { }
14161 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { else if ( page >= pages - 1 - half ) {
14162 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers = _range( pages-(buttons-2), pages );
14163 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6
14164 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.splice( 0, 0, 0 );
14165 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { }
14166 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { else {
14167 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers = _range( page-half+2, page+half-1 );
14168 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.push( 'ellipsis' );
14169 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.push( pages-1 );
14170 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.splice( 0, 0, 'ellipsis' );
14171 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.splice( 0, 0, 0 );
14172 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { }
14173  
14174 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers.DT_el = 'span';
14175 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { return numbers;
14176 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { }
14177  
14178  
14179 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { $.extend( extPagination, {
14180 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { simple: function ( page, pages ) {
14181 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { return [ 'previous', 'next' ];
14182 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { },
14183  
14184 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { full: function ( page, pages ) {
14185 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { return [ 'first', 'previous', 'next', 'last' ];
14186 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { },
14187  
14188 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { simple_numbers: function ( page, pages ) {
14189 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { return [ 'previous', _numbers(page, pages), 'next' ];
14190 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { },
14191  
14192 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { full_numbers: function ( page, pages ) {
14193 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];
14194 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { },
14195  
14196 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { // For testing and plug-ins to use
14197 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { _numbers: _numbers,
14198  
14199 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { // Number of number buttons (including ellipsis) to show. _Must be odd!_
14200 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { numbers_length: 7
14201 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { } );
14202  
14203  
14204 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { $.extend( true, DataTable.ext.renderer, {
14205 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { pageButton: {
14206 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { _: function ( settings, host, idx, buttons, page, pages ) {
14207 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var classes = settings.oClasses;
14208 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var lang = settings.oLanguage.oPaginate;
14209 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var btnDisplay, btnClass, counter=0;
14210  
14211 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var attach = function( container, buttons ) {
14212 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var i, ien, node, button;
14213 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { var clickHandler = function ( e ) {
14214 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { _fnPageChange( settings, e.data.action, true );
14215 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { };
14216  
14217 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { for ( i=0, ien=buttons.length ; i
14218 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {
14219  
14220 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {
14221 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {>' )
14222 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { .appendTo( container );
14223 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { attach( inner, button );
14224 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { }
14225 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { else {
14226 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnDisplay = '';
14227 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnClass = '';
14228  
14229 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { switch ( button ) {
14230 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { case 'ellipsis':
14231 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { container.append('<span class="ellipsis">&#x2026;</span>');
14232 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { break;
14233  
14234 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { case 'first':
14235 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnDisplay = lang.sFirst;
14236 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnClass = button + (page > 0 ?
14237 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { '' : ' '+classes.sPageButtonDisabled);
14238 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { break;
14239  
14240 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { case 'previous':
14241 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnDisplay = lang.sPrevious;
14242 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnClass = button + (page > 0 ?
14243 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { '' : ' '+classes.sPageButtonDisabled);
14244 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { break;
14245  
14246 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { case 'next':
14247 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnDisplay = lang.sNext;
14248 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) { btnClass = button + (page < pages-1 ?
14249 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ? '' : ' '+classes.sPageButtonDisabled);
14250 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ? break;
14251  
14252 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ? case 'last':
14253 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ? btnDisplay = lang.sLast;
14254 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ? btnClass = button + (page < pages-1 ?
14255 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? '' : ' '+classes.sPageButtonDisabled);
14256 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? break;
14257  
14258 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? default:
14259 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? btnDisplay = button + 1;
14260 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? btnClass = page === button ?
14261 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? classes.sPageButtonActive : '';
14262 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? break;
14263 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14264  
14265 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( btnDisplay ) {
14266 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? node = $('', {
14267 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'class': classes.sPageButton+' '+btnClass,
14268 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'aria-controls': settings.sTableId,
14269 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'data-dt-idx': counter,
14270 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'tabindex': settings.iTabIndex,
14271 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'id': idx === 0 && typeof button === 'string' ?
14272 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? settings.sTableId +'_'+ button :
14273 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? null
14274 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? } )
14275 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? .html( btnDisplay )
14276 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? .appendTo( container );
14277  
14278 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? _fnBindAction(
14279 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? node, {action: button}, clickHandler
14280 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? );
14281  
14282 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? counter++;
14283 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14284 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14285 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14286 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? };
14287  
14288 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // IE9 throws an 'unknown error' if document.activeElement is used
14289 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // inside an iframe or frame. Try / catch the error. Not good for
14290 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // accessibility, but neither are frames.
14291 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var activeEl;
14292  
14293 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? try {
14294 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Because this approach is destroying and recreating the paging
14295 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // elements, focus is lost on the select button which is bad for
14296 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // accessibility. So we want to restore focus once the draw has
14297 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // completed
14298 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? activeEl = $(document.activeElement).data('dt-idx');
14299 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14300 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? catch (e) {}
14301  
14302 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? attach( $(host).empty(), buttons );
14303  
14304 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( activeEl ) {
14305 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? $(host).find( '[data-dt-idx='+activeEl+']' ).focus();
14306 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14307 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14308 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14309 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? } );
14310  
14311  
14312  
14313 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Built in type detection. See model.ext.aTypes for information about
14314 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // what is required from this methods.
14315 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? $.extend( DataTable.ext.type.detect, [
14316 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Plain numbers - first since V8 detects some plain numbers as dates
14317 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...).
14318 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14319 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14320 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var decimal = settings.oLanguage.sDecimal;
14321 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _isNumber( d, decimal ) ? 'num'+decimal : null;
14322 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14323  
14324 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Dates (only those recognised by the browser's Date.parse)
14325 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14326 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14327 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // V8 will remove any unknown characters at the start and end of the
14328 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // expression, leading to false matches such as `$245.12` or `10%` being
14329 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // a valid date. See forum thread 18941 for detail.
14330 <.*?>
< table.height() ) {
14331 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return null;
14332 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14333 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var parsed = Date.parse(d);
14334 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null;
14335 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14336  
14337 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Formatted numbers
14338 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14339 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14340 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var decimal = settings.oLanguage.sDecimal;
14341 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null;
14342 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14343  
14344 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // HTML numeric
14345 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14346 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14347 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var decimal = settings.oLanguage.sDecimal;
14348 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null;
14349 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14350  
14351 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // HTML numeric, formatted
14352 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14353 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14354 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var decimal = settings.oLanguage.sDecimal;
14355 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null;
14356 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14357  
14358 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // HTML (this is strict checking - there must be html)
14359 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( d, settings )
14360 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14361 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ?
14362 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? 'html' : null;
14363 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14364 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? ] );
14365  
14366  
14367  
14368 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Filter formatting functions. See model.ext.ofnSearch for information about
14369 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // what is required from these methods.
14370 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? //
14371 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Note that additional search methods are added for the html numbers and
14372 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // html formatted numbers by `_addNumericSort()` when we know what the decimal
14373 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // place is
14374  
14375  
14376 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? $.extend( DataTable.ext.type.search, {
14377 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? html: function ( data ) {
14378 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _empty(data) ?
14379 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? data :
14380 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? typeof data === 'string' ?
14381 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? data
14382 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? .replace( _re_new_lines, " " )
14383 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? .replace( _re_html, "" ) :
14384 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? '';
14385 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14386  
14387 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? string: function ( data ) {
14388 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _empty(data) ?
14389 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? data :
14390 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? typeof data === 'string' ?
14391 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? data.replace( _re_new_lines, " " ) :
14392 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? data;
14393 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14394 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? } );
14395  
14396  
14397  
14398 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? var __numericReplace = function ( d, decimalPlace, re1, re2 ) {
14399 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( d !== 0 && (!d || d === '-') ) {
14400 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return -Infinity;
14401 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14402  
14403 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // If a decimal place other than `.` is used, it needs to be given to the
14404 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // function so we can detect it and replace with a `.` which is the only
14405 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // decimal place Javascript recognises - it is not locale aware.
14406 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( decimalPlace ) {
14407 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? d = _numToDecimal( d, decimalPlace );
14408 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14409  
14410 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( d.replace ) {
14411 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( re1 ) {
14412 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? d = d.replace( re1, '' );
14413 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14414  
14415 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( re2 ) {
14416 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? d = d.replace( re2, '' );
14417 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14418 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14419  
14420 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return d * 1;
14421 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? };
14422  
14423  
14424 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Add the numeric 'deformatting' functions for sorting and search. This is done
14425 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // in a function to provide an easy ability for the language options to add
14426 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // additional methods if a non-period decimal place is used.
14427 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function _addNumericSort ( decimalPlace ) {
14428 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? $.each(
14429 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? {
14430 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Plain numbers
14431 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "num": function ( d ) {
14432 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return __numericReplace( d, decimalPlace );
14433 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14434  
14435 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Formatted numbers
14436 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "num-fmt": function ( d ) {
14437 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return __numericReplace( d, decimalPlace, _re_formatted_numeric );
14438 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14439  
14440 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // HTML numeric
14441 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "html-num": function ( d ) {
14442 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return __numericReplace( d, decimalPlace, _re_html );
14443 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14444  
14445 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // HTML numeric, formatted
14446 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "html-num-fmt": function ( d ) {
14447 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );
14448 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14449 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14450 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? function ( key, fn ) {
14451 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Add the ordering method
14452 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? _ext.type.order[ key+decimalPlace+'-pre' ] = fn;
14453  
14454 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // For HTML types add a search formatter that will strip the HTML
14455 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? if ( key.match(/^html\-/) ) {
14456 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;
14457 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14458 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14459 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? );
14460 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? }
14461  
14462  
14463 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Default sort methods
14464 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? $.extend( _ext.type.order, {
14465 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // Dates
14466 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "date-pre": function ( d ) {
14467 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return Date.parse( d ) || 0;
14468 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? },
14469  
14470 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? // html
14471 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? "html-pre": function ( a ) {
14472 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? return _empty(a) ?
14473 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? '' :
14474 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? a.replace ?
14475 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ? a.replace( /<.*?>/g, "" ).toLowerCase() :
14476 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> a+'';
14477 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> },
14478  
14479 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // string
14480 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> "string-pre": function ( a ) {
14481 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // This is a little complex, but faster than always calling toString,
14482 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // http://jsperf.com/tostring-v-check
14483 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return _empty(a) ?
14484 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> '' :
14485 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> typeof a === 'string' ?
14486 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> a.toLowerCase() :
14487 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> ! a.toString ?
14488 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> '' :
14489 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> a.toString();
14490 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> },
14491  
14492 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // string-asc and -desc are retained only for compatibility with the old
14493 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // sort methods
14494 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> "string-asc": function ( x, y ) {
14495 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return ((x < y) ? -1 : ((x > y) ? 1 : 0));
14496 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> },
14497  
14498 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> "string-desc": function ( x, y ) {
14499 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return ((x < y) ? 1 : ((x > y) ? -1 : 0));
14500 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14501 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14502  
14503  
14504 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // Numeric sorting types - order doesn't matter here
14505 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _addNumericSort( '' );
14506  
14507  
14508 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.extend( true, DataTable.ext.renderer, {
14509 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> header: {
14510 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _: function ( settings, cell, column, classes ) {
14511 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // No additional mark-up required
14512 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // Attach a sort listener to update on sort - note that using the
14513 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // `DT` namespace will allow the event to be removed automatically
14514 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // on destroy, while the `dt` namespaced event is the one we are
14515 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // listening for
14516 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
14517 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> if ( settings !== ctx ) { // need to check this this is the host
14518 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return; // table, not a nested one
14519 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14520  
14521 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var colIdx = column.idx;
14522  
14523 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> cell
14524 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .removeClass(
14525 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> column.sSortingClass +' '+
14526 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortAsc +' '+
14527 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortDesc
14528 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> )
14529 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .addClass( columns[ colIdx ] == 'asc' ?
14530 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortAsc : columns[ colIdx ] == 'desc' ?
14531 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortDesc :
14532 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> column.sSortingClass
14533 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> );
14534 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14535 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> },
14536  
14537 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> jqueryui: function ( settings, cell, column, classes ) {
14538 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $('<div/>')
14539 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .addClass( classes.sSortJUIWrapper )
14540 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .append( cell.contents() )
14541 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .append( $('<span/>')
14542 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .addClass( classes.sSortIcon+' '+column.sSortingClassJUI )
14543 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> )
14544 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .appendTo( cell );
14545  
14546 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // Attach a sort listener to update on sort
14547 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
14548 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> if ( settings !== ctx ) {
14549 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return;
14550 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14551  
14552 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var colIdx = column.idx;
14553  
14554 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> cell
14555 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .removeClass( classes.sSortAsc +" "+classes.sSortDesc )
14556 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .addClass( columns[ colIdx ] == 'asc' ?
14557 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortAsc : columns[ colIdx ] == 'desc' ?
14558 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortDesc :
14559 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> column.sSortingClass
14560 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> );
14561  
14562 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> cell
14563 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .find( 'span.'+classes.sSortIcon )
14564 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .removeClass(
14565 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIAsc +" "+
14566 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIDesc +" "+
14567 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUI +" "+
14568 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIAscAllowed +" "+
14569 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIDescAllowed
14570 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> )
14571 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> .addClass( columns[ colIdx ] == 'asc' ?
14572 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIAsc : columns[ colIdx ] == 'desc' ?
14573 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> classes.sSortJUIDesc :
14574 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> column.sSortingClassJUI
14575 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> );
14576 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14577 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14578 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14579 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14580  
14581 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /*
14582 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Public helper functions. These aren't used internally by DataTables, or
14583 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * called by any of the options passed into DataTables, but they can be used
14584 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * externally by developers working with DataTables. They are helper functions
14585 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * to make working with DataTables a little bit easier.
14586 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14587  
14588 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14589 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Helpers for `columns.render`.
14590 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14591 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * The options defined here can be used with the `columns.render` initialisation
14592 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * option to provide a display renderer. The following functions are defined:
14593 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14594 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * * `number` - Will format numeric data (defined by `columns.data`) for
14595 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * display, retaining the original unformatted data for sorting and filtering.
14596 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * It takes 4 parameters:
14597 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * * `string` - Thousands grouping separator
14598 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * * `string` - Decimal point indicator
14599 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * * `integer` - Number of decimal points to show
14600 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * * `string` (optional) - Prefix.
14601 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14602 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @example
14603 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * // Column definition using the number renderer
14604 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * {
14605 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * data: "salary",
14606 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * render: $.fn.dataTable.render.number( '\'', '.', 0, '$' )
14607 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * }
14608 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14609 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @namespace
14610 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14611 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> DataTable.render = {
14612 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> number: function ( thousands, decimal, precision, prefix ) {
14613 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return {
14614 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> display: function ( d ) {
14615 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> if ( typeof d !== 'number' && typeof d !== 'string' ) {
14616 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return d;
14617 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14618  
14619 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var negative = d < 0 ? '-' : '';
14620 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> d = Math.abs( parseFloat( d ) );
14621  
14622 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var intPart = parseInt( d, 10 );
14623 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var floatPart = precision ?
14624 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> decimal+(d - intPart).toFixed( precision ).substring( 2 ):
14625 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> '';
14626  
14627 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return negative + (prefix||'') +
14628 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> intPart.toString().replace(
14629 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /\B(?=(\d{3})+(?!\d))/g, thousands
14630 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> ) +
14631 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> floatPart;
14632 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14633 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> };
14634 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14635 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> };
14636  
14637  
14638 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /*
14639 <.*?>
< table.height() ) {
14640 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * publicly... - To be fixed in 2.0 using methods on the prototype
14641 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14642  
14643  
14644 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14645 <.*?>
< table.height() ) {
14646 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {string} fn API function name
14647 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @returns {function} wrapped function
14648 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @memberof DataTable#internal
14649 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14650 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> function _fnExternApiFunc (fn)
14651 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> {
14652 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return function() {
14653 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> var args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat(
14654 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> Array.prototype.slice.call(arguments)
14655 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> );
14656 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return DataTable.ext.internal[fn].apply( this, args );
14657 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> };
14658 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> }
14659  
14660  
14661 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14662 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Reference to internal functions for use by plug-in developers. Note that
14663 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * these methods are references to internal functions and are considered to be
14664 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * private. If you use these methods, be aware that they are liable to change
14665 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * between versions.
14666 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @namespace
14667 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14668 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.extend( DataTable.ext.internal, {
14669 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnExternApiFunc: _fnExternApiFunc,
14670 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnBuildAjax: _fnBuildAjax,
14671 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAjaxUpdate: _fnAjaxUpdate,
14672 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAjaxParameters: _fnAjaxParameters,
14673 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAjaxUpdateDraw: _fnAjaxUpdateDraw,
14674 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAjaxDataSrc: _fnAjaxDataSrc,
14675 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAddColumn: _fnAddColumn,
14676 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnColumnOptions: _fnColumnOptions,
14677 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAdjustColumnSizing: _fnAdjustColumnSizing,
14678 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnVisibleToColumnIndex: _fnVisibleToColumnIndex,
14679 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnColumnIndexToVisible: _fnColumnIndexToVisible,
14680 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnVisbleColumns: _fnVisbleColumns,
14681 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetColumns: _fnGetColumns,
14682 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnColumnTypes: _fnColumnTypes,
14683 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnApplyColumnDefs: _fnApplyColumnDefs,
14684 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnHungarianMap: _fnHungarianMap,
14685 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCamelToHungarian: _fnCamelToHungarian,
14686 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnLanguageCompat: _fnLanguageCompat,
14687 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnBrowserDetect: _fnBrowserDetect,
14688 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAddData: _fnAddData,
14689 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAddTr: _fnAddTr,
14690 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnNodeToDataIndex: _fnNodeToDataIndex,
14691 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnNodeToColumnIndex: _fnNodeToColumnIndex,
14692 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetCellData: _fnGetCellData,
14693 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSetCellData: _fnSetCellData,
14694 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSplitObjNotation: _fnSplitObjNotation,
14695 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetObjectDataFn: _fnGetObjectDataFn,
14696 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSetObjectDataFn: _fnSetObjectDataFn,
14697 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetDataMaster: _fnGetDataMaster,
14698 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnClearTable: _fnClearTable,
14699 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnDeleteIndex: _fnDeleteIndex,
14700 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnInvalidate: _fnInvalidate,
14701 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetRowElements: _fnGetRowElements,
14702 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCreateTr: _fnCreateTr,
14703 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnBuildHead: _fnBuildHead,
14704 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnDrawHead: _fnDrawHead,
14705 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnDraw: _fnDraw,
14706 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnReDraw: _fnReDraw,
14707 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnAddOptionsHtml: _fnAddOptionsHtml,
14708 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnDetectHeader: _fnDetectHeader,
14709 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetUniqueThs: _fnGetUniqueThs,
14710 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlFilter: _fnFeatureHtmlFilter,
14711 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilterComplete: _fnFilterComplete,
14712 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilterCustom: _fnFilterCustom,
14713 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilterColumn: _fnFilterColumn,
14714 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilter: _fnFilter,
14715 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilterCreateSearch: _fnFilterCreateSearch,
14716 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnEscapeRegex: _fnEscapeRegex,
14717 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFilterData: _fnFilterData,
14718 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlInfo: _fnFeatureHtmlInfo,
14719 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnUpdateInfo: _fnUpdateInfo,
14720 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnInfoMacros: _fnInfoMacros,
14721 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnInitialise: _fnInitialise,
14722 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnInitComplete: _fnInitComplete,
14723 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnLengthChange: _fnLengthChange,
14724 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlLength: _fnFeatureHtmlLength,
14725 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate,
14726 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnPageChange: _fnPageChange,
14727 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing,
14728 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnProcessingDisplay: _fnProcessingDisplay,
14729 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnFeatureHtmlTable: _fnFeatureHtmlTable,
14730 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnScrollDraw: _fnScrollDraw,
14731 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnApplyToChildren: _fnApplyToChildren,
14732 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCalculateColumnWidths: _fnCalculateColumnWidths,
14733 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnThrottle: _fnThrottle,
14734 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnConvertToWidth: _fnConvertToWidth,
14735 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnScrollingWidthAdjust: _fnScrollingWidthAdjust,
14736 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetWidestNode: _fnGetWidestNode,
14737 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnGetMaxLenString: _fnGetMaxLenString,
14738 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnStringToCss: _fnStringToCss,
14739 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnScrollBarWidth: _fnScrollBarWidth,
14740 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortFlatten: _fnSortFlatten,
14741 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSort: _fnSort,
14742 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortAria: _fnSortAria,
14743 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortListener: _fnSortListener,
14744 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortAttachListener: _fnSortAttachListener,
14745 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortingClasses: _fnSortingClasses,
14746 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSortData: _fnSortData,
14747 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSaveState: _fnSaveState,
14748 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnLoadState: _fnLoadState,
14749 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnSettingsFromNode: _fnSettingsFromNode,
14750 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnLog: _fnLog,
14751 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnMap: _fnMap,
14752 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnBindAction: _fnBindAction,
14753 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCallbackReg: _fnCallbackReg,
14754 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCallbackFire: _fnCallbackFire,
14755 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnLengthOverflow: _fnLengthOverflow,
14756 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnRenderer: _fnRenderer,
14757 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnDataSource: _fnDataSource,
14758 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnRowAttributes: _fnRowAttributes,
14759 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> _fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant
14760 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // in 1.10, so this dead-end function is
14761 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // added to prevent errors
14762 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14763  
14764  
14765 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // jQuery access
14766 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.fn.dataTable = DataTable;
14767  
14768 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // Legacy aliases
14769 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.fn.dataTableSettings = DataTable.settings;
14770 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.fn.dataTableExt = DataTable.ext;
14771  
14772 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // With a capital `D` we return a DataTables API instance rather than a
14773 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // jQuery object
14774 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.fn.DataTable = function ( opts ) {
14775 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return $(this).dataTable( opts ).api();
14776 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> };
14777  
14778 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // All properties that are available to $.fn.dataTable should also be
14779 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // available on $.fn.DataTable
14780 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.each( DataTable, function ( prop, val ) {
14781 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> $.fn.DataTable[ prop ] = val;
14782 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> } );
14783  
14784  
14785 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> // Information about events fired by DataTables - for documentation.
14786 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14787 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Draw event, fired whenever the table is redrawn on the page, at the same
14788 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * point as fnDrawCallback. This may be useful for binding events or
14789 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * performing calculations when the table is altered at all.
14790 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#draw.dt
14791 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14792 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14793 <.*?>
< table.height() ) {
14794 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14795  
14796 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14797 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Search event, fired when the searching applied to the table (using the
14798 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * built-in global search, or column filters) is altered.
14799 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#search.dt
14800 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14801 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14802 <.*?>
< table.height() ) {
14803 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14804  
14805 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14806 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Page change event, fired when the paging of the table is altered.
14807 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#page.dt
14808 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14809 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14810 <.*?>
< table.height() ) {
14811 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14812  
14813 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14814 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Order event, fired when the ordering applied to the table is altered.
14815 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#order.dt
14816 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14817 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14818 <.*?>
< table.height() ) {
14819 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14820  
14821 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14822 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * DataTables initialisation complete event, fired when the table is fully
14823 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * drawn, including Ajax data loaded, if Ajax data is required.
14824 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#init.dt
14825 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14826 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14827 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} oSettings DataTables settings object
14828 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} json The JSON object request from the server - only
14829 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * present if client-side Ajax sourced data is used</li></ol>
14830 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14831  
14832 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14833 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * State save event, fired when the table has changed state a new state save
14834 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * is required. This event allows modification of the state saving object
14835 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * prior to actually doing the save, including addition or other state
14836 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * properties (for plug-ins) or modification of a DataTables core property.
14837 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#stateSaveParams.dt
14838 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14839 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14840 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} oSettings DataTables settings object
14841 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} json The state information to be saved
14842 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14843  
14844 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14845 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * State load event, fired when the table is loading state from the stored
14846 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * data, but prior to the settings object being modified by the saved state
14847 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * - allowing modification of the saved state is required or loading of
14848 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * state for a plug-in.
14849 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#stateLoadParams.dt
14850 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14851 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14852 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} oSettings DataTables settings object
14853 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} json The saved state information
14854 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14855  
14856 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14857 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * State loaded event, fired when state has been loaded from stored data and
14858 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * the settings object has been modified by the loaded data.
14859 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#stateLoaded.dt
14860 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14861 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14862 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} oSettings DataTables settings object
14863 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} json The saved state information
14864 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14865  
14866 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14867 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Processing event, fired when DataTables is doing some kind of processing
14868 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * (be it, order, searcg or anything else). It can be used to indicate to
14869 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * the end user that there is something happening, or that something has
14870 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * finished.
14871 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#processing.dt
14872 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14873 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14874 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} oSettings DataTables settings object
14875 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {boolean} bShow Flag for if DataTables is doing processing or not
14876 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14877  
14878 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14879 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Ajax (XHR) event, fired whenever an Ajax request is completed from a
14880 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * request to made to the server for new data. This event is called before
14881 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * DataTables processed the returned data, so it can also be used to pre-
14882 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * process the data returned from the server, if needed.
14883 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14884 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Note that this trigger is called in `fnServerData`, if you override
14885 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * `fnServerData` and which to use this event, you need to trigger it in you
14886 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * success function.
14887 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#xhr.dt
14888 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14889 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14890 <.*?>
< table.height() ) {
14891 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {object} json JSON returned from the server
14892 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14893 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @example
14894 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * // Use a custom property returned from the server in another DOM element
14895 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
14896 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * $('#status').html( json.status );
14897 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * } );
14898 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> *
14899 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @example
14900 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * // Pre-process the data returned from the server
14901 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
14902 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * for ( var i=0, ien=json.aaData.length ; i<ien ; i++ ) {
14903 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * json.aaData[i].sum = json.aaData[i].one + json.aaData[i].two;
14904 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * }
14905 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * // Note no return - manipulate the data directly in the JSON object.
14906 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * } );
14907 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14908  
14909 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14910 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Destroy event, fired when the DataTable is destroyed by calling fnDestroy
14911 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * or passing the bDestroy:true parameter in the initialisation object. This
14912 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * can be used to remove bound events, added DOM nodes, etc.
14913 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#destroy.dt
14914 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14915 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14916 <.*?>
< table.height() ) {
14917 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14918  
14919 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14920 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Page length change event, fired when number of records to show on each
14921 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * page (the length) is changed.
14922 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#length.dt
14923 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14924 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14925 <.*?>
< table.height() ) {
14926 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {integer} len New length
14927 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14928  
14929 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14930 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Column sizing has changed.
14931 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#column-sizing.dt
14932 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14933 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14934 <.*?>
< table.height() ) {
14935 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14936  
14937 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> /**
14938 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * Column visibility has changed.
14939 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @name DataTable#column-visibility.dt
14940 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @event
14941 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {event} e jQuery event object
14942 <.*?>
< table.height() ) {
14943 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {int} column Column index
14944 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> * @param {bool} vis `false` if column now hidden, or `true` if visible
14945 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> */
14946  
14947 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?> return $.fn.dataTable;
14948 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?>}));
14949  
14950 <.*?>
< table.height() ) {
<.*?><.*?><= buttons ) {<= half ) {< pages-1 ?< pages-1 ?<.*?>}(window, document));
14951