/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/2914-state-save-sort.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 3 months ago) by torben
File MIME type: application/javascript
File size: 903 byte(s)
initial import
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "2914 - State saving with an empty array" );
3
4 $(document).ready( function () {
5 document.cookie = "";
6 $('#example').dataTable( {
7 "bStateSave": true,
8 "aaSorting": []
9 } );
10
11 oTest.fnTest(
12 "No sort",
13 null,
14 function () { return $('#example tbody td:eq(3)').html() == "4"; }
15 );
16
17 oTest.fnTest(
18 "Next page",
19 function () {
20 $('#example').dataTable().fnPageChange( 'next' );
21 },
22 function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; }
23 );
24
25 oTest.fnTest(
26 "Destroy the table and remake it - checking we are still on the next page",
27 function () {
28 $('#example').dataTable( {
29 "bStateSave": true,
30 "aaSorting": [],
31 "bDestroy": true
32 } );
33 },
34 function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; }
35 );
36
37 oTest.fnCookieDestroy( $('#example').dataTable() );
38 oTest.fnComplete();
39 } );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20