| 1 |
// DATA_TEMPLATE: -complex_header |
| 2 |
oTest.fnStart( "Complex header" ); |
| 3 |
|
| 4 |
|
| 5 |
$(document).ready( function () { |
| 6 |
$('#example').dataTable(); |
| 7 |
|
| 8 |
oTest.fnTest( |
| 9 |
"Sorting on colspan has no effect", |
| 10 |
function () { $('#example thead th:eq(1)').click(); }, |
| 11 |
function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } |
| 12 |
); |
| 13 |
|
| 14 |
oTest.fnTest( |
| 15 |
"Sorting on non-unique TH and first TH has no effect", |
| 16 |
function () { $('#example thead th:eq(2)').click(); }, |
| 17 |
function () { return $('#example tbody tr td:eq(1)').html() == "Firefox 1.0"; } |
| 18 |
); |
| 19 |
|
| 20 |
oTest.fnTest( |
| 21 |
"Sorting on non-unique TH and second TH will sort", |
| 22 |
function () { $('#example thead th:eq(6)').click(); }, |
| 23 |
function () { return $('#example tbody tr td:eq(4)').html() == "A"; } |
| 24 |
); |
| 25 |
|
| 26 |
oTest.fnTest( |
| 27 |
"Sorting on non-unique TH and second TH will sort - reserve", |
| 28 |
function () { $('#example thead th:eq(6)').click(); }, |
| 29 |
function () { return $('#example tbody tr td:eq(4)').html() == "X"; } |
| 30 |
); |
| 31 |
|
| 32 |
oTest.fnTest( |
| 33 |
"Sorting on unique TH will sort", |
| 34 |
function () { $('#example thead th:eq(5)').click(); }, |
| 35 |
function () { return $('#example tbody tr td:eq(3)').html() == "-"; } |
| 36 |
); |
| 37 |
|
| 38 |
oTest.fnTest( |
| 39 |
"Sorting on unique TH will sort - reserve", |
| 40 |
function () { $('#example thead th:eq(5)').click(); }, |
| 41 |
function () { return $('#example tbody tr td:eq(3)').html() == "522.1"; } |
| 42 |
); |
| 43 |
|
| 44 |
oTest.fnTest( |
| 45 |
"Sorting on unique rowspan TH will sort", |
| 46 |
function () { $('#example thead th:eq(0)').click(); }, |
| 47 |
function () { return $('#example tbody tr td:eq(0)').html() == "Gecko"; } |
| 48 |
); |
| 49 |
|
| 50 |
|
| 51 |
oTest.fnComplete(); |
| 52 |
} ); |