comparison DataTables-1.9.4/media/unit_testing/tests_onhold/6_delayed_rendering/bPaginate.js @ 0:ac5f9272033b draft

first upload
author saskia-hiltemann
date Tue, 01 Jul 2014 11:42:23 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ac5f9272033b
1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "bPaginate" );
3
4 $(document).ready( function () {
5 /* Check the default */
6 $('#example').dataTable( {
7 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
8 "bDeferRender": true
9 } );
10
11 oTest.fnWaitTest(
12 "Pagiantion div exists by default",
13 null,
14 function () { return document.getElementById('example_paginate') != null; }
15 );
16
17 oTest.fnWaitTest(
18 "Information div takes paging into account",
19 null,
20 function () { return document.getElementById('example_info').innerHTML ==
21 "Showing 1 to 10 of 57 entries"; }
22 );
23
24 /* Check can disable */
25 oTest.fnWaitTest(
26 "Pagiantion can be disabled",
27 function () {
28 oSession.fnRestore();
29 $('#example').dataTable( {
30 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
31 "bDeferRender": true,
32 "bPaginate": false
33 } );
34 },
35 function () { return document.getElementById('example_paginate') == null; }
36 );
37
38 oTest.fnWaitTest(
39 "Information div takes paging disabled into account",
40 null,
41 function () { return document.getElementById('example_info').innerHTML ==
42 "Showing 1 to 57 of 57 entries"; }
43 );
44
45 /* Enable makes no difference */
46 oTest.fnWaitTest(
47 "Pagiantion enabled override",
48 function () {
49 oSession.fnRestore();
50 $('#example').dataTable( {
51 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
52 "bDeferRender": true,
53 "bPaginate": true
54 } );
55 },
56 function () { return document.getElementById('example_paginate') != null; }
57 );
58
59
60
61 oTest.fnComplete();
62 } );