1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "aaSortingFixed" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
8 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
10 var oSettings = oTable.fnSettings();
13 "No fixed sorting by default",
16 return oSettings.aaSortingFixed == null;
22 "Fixed sorting on first column (string/asc) with user sorting on second column (string/asc)",
25 $('#example').dataTable( {
27 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
28 "aaSortingFixed": [['0','asc']]
30 $('#example thead th:eq(1)').click();
32 function () { return $('#example tbody td:eq(1)').html() == "Camino 1.0"; }
36 "Fixed sorting on first column (string/asc) with user sorting on second column (string/desc)",
38 $('#example thead th:eq(1)').click();
40 function () { return $('#example tbody td:eq(1)').html() == "Seamonkey 1.1"; }
44 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/asc)",
47 $('#example').dataTable( {
49 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
50 "aaSortingFixed": [['3','asc']]
52 $('#example thead th:eq(1)').click();
54 function () { return $('#example tbody td:eq(1)').html() == "All others"; }
58 "Fixed sorting on fourth column (int/asc) with user sorting on second column (string/desc)",
60 $('#example thead th:eq(1)').click();
62 function () { return $('#example tbody td:eq(1)').html() == "PSP browser"; }