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