File: 2440.js

package info (click to toggle)
datatables.js 1.10.21%2Bdfsg-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,604 kB
  • sloc: javascript: 64,254; xml: 10,441; php: 4,623; sh: 523; makefile: 21
file content (32 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// DATA_TEMPLATE: empty_table
/*
 * NOTE: There are some differences in this zero config script for server-side
 * processing compared to the other data sources. The main reason for this is the
 * difference in how the server-side processing does it's filtering. Also the
 * sorting state is always reset on each draw.
 */
oTest.fnStart( "Info element with display all" );

$(document).ready( function () {
	var oTable = $('#example').dataTable( {
		"bServerSide": true,
		"sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
	} );
	
	oTable.fnSettings()._iDisplayLength = -1;
	oTable.oApi._fnCalculateEnd( oTable.fnSettings() );
	oTable.fnDraw();
	
	
	/* Basic checks */
	oTest.fnWaitTest( 
		"Check length is correct when -1 length given",
		null,
		function () {
			return document.getElementById('example_info').innerHTML == 
				"Showing 1 to 57 of 57 entries";
		}
	);
	
	oTest.fnComplete();
} );