Debian Codegraph @

old-tests/tests_onhold/1_dom/bPaginate.js

raw
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "bPaginate" );
3
4 $(document).ready( function () {
5 /* Check the default */
6 $('#example').dataTable();
7
8 oTest.fnTest(
9 "Pagiantion div exists by default",
10 null,
11 function () { return document.getElementById('example_paginate') != null; }
12 );
13
14 oTest.fnTest(
15 "Information div takes paging into account",
16 null,
17 function () { return document.getElementById('example_info').innerHTML ==
18 "Showing 1 to 10 of 57 entries"; }
19 );
20
21 /* Check can disable */
22 oTest.fnTest(
23 "Pagiantion can be disabled",
24 function () {
25 oSession.fnRestore();
26 $('#example').dataTable( {
27 "bPaginate": false
28 } );
29 },
30 function () { return document.getElementById('example_paginate') == null; }
31 );
32
33 oTest.fnTest(
34 "Information div takes paging disabled into account",
35 null,
36 function () { return document.getElementById('example_info').innerHTML ==
37 "Showing 1 to 57 of 57 entries"; }
38 );
39
40 /* Enable makes no difference */
41 oTest.fnTest(
42 "Pagiantion enabled override",
43 function () {
44 oSession.fnRestore();
45 $('#example').dataTable( {
46 "bPaginate": true
47 } );
48 },
49 function () { return document.getElementById('example_paginate') != null; }
50 );
51
52
53
54 oTest.fnComplete();
55 } );