Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Content/jQuery/jQueryPlugins/DataTables-1.7.6/media/unit_testing/tests_onhold/1_dom/bPaginate.js @ 6286

Last change on this file since 6286 was 6286, checked in by dkahn, 13 years ago

#1198 Added jQuery plus plugins

File size: 1.2 KB
RevLine 
[6286]1// DATA_TEMPLATE: dom_data
2oTest.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} );
Note: See TracBrowser for help on using the repository browser.