Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
8 lars 1
/**
2
 * Get information about the paging settings that DataTables is currently
3
 * using to display each page, including the number of records shown, start
4
 * and end points in the data set etc.
5
 *
6
 * DataTables 1.10+ provides the `dt-api page.info()` method, built-in, provide
7
 * the same information as this method. As such this method is marked
8
 * deprecated, but is available for use with legacy version of DataTables.
9
 * Please use the new API if you are used DataTables 1.10 or newer.
10
 *
11
 *  @name fnPagingInfo
12
 *  @summary Get information about the paging state of the table
13
 *  @author [Allan Jardine](http://sprymedia.co.uk)
14
 *  @deprecated
15
 *
16
 *  @example
17
 *    $(document).ready(function() {
18
 *        $('#example').dataTable( {
19
 *            "fnDrawCallback": function () {
20
 *            alert( 'Now on page'+ this.fnPagingInfo().iPage );
21
 *          }
22
 *        } );
23
 *    } );
24
 */
25
 
26
jQuery.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
27
{
28
	return {
29
		"iStart":         oSettings._iDisplayStart,
30
		"iEnd":           oSettings.fnDisplayEnd(),
31
		"iLength":        oSettings._iDisplayLength,
32
		"iTotal":         oSettings.fnRecordsTotal(),
33
		"iFilteredTotal": oSettings.fnRecordsDisplay(),
34
		"iPage":          oSettings._iDisplayLength === -1 ?
35
 
36
		"iTotalPages":    oSettings._iDisplayLength === -1 ?
37
 
38
	};
39
};