Subversion-Projekte lars-tiefland.webanos.zeldi.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
4 lars 1
/**
2
 * When DataTables removes columns from the display (bVisible or fnSetColumnVis)
3
 * it removes these elements from the DOM, effecting the index value for the
4
 * column positions. This function converts the visible column index into a data
5
 * column index (i.e. all columns regardless of visibility).
6
 *
7
 * DataTables 1.10+ has this ability built-in through the
8
 * `dt-api column.index()` method. As such this method is marked deprecated, but
9
 * is available for use with legacy version of DataTables.
10
 *
11
 *  @name fnVisibleToColumnIndex
12
 *  @summary Convert a column visible index to a data index.
13
 *  @author [Allan Jardine](http://sprymedia.co.uk)
14
 *  @deprecated
15
 *
16
 *  @param {integer} iMatch Column data index to convert to data index
17
 *  @returns {integer} Visible column index
18
 *
19
 *  @example
20
 *    var table = $('#example').dataTable( {
21
 *      aoColumnDefs: [
22
 *        { bVisible: false, aTargets: [1] }
23
 *      ]
24
 *    } );
25
 *
26
 *    // This will show 2
27
 *    alert( 'Visible Column 1 data index: '+table.fnVisibleToColumnIndex(1) );
28
 */
29
 
30
jQuery.fn.dataTableExt.oApi.fnVisibleToColumnIndex = function ( oSettings, iMatch )
31
{
32
	return oSettings.oApi._fnVisibleToColumnIndex( oSettings, iMatch );
33
};