| 1 |
// DATA_TEMPLATE: empty_table |
| 2 |
oTest.fnStart( "Destroy with hidden columns" ); |
| 3 |
|
| 4 |
$(document).ready( function () { |
| 5 |
var mTest; |
| 6 |
|
| 7 |
|
| 8 |
$('#example').dataTable( { |
| 9 |
"bServerSide": true, |
| 10 |
"sAjaxSource": "../../../examples/server_side/scripts/server_processing.php", |
| 11 |
"aoColumnDefs": [ |
| 12 |
{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, |
| 13 |
{ "bVisible": false, "aTargets": [ 3 ] } |
| 14 |
], |
| 15 |
"fnInitComplete": function () { |
| 16 |
this.fnDestroy(); |
| 17 |
} |
| 18 |
} ); |
| 19 |
|
| 20 |
oTest.fnWaitTest( |
| 21 |
"Check that the number of columns in table is correct", |
| 22 |
null, |
| 23 |
function () { return $('#example tbody tr:eq(0) td').length == 5; } |
| 24 |
); |
| 25 |
|
| 26 |
|
| 27 |
oTest.fnTest( |
| 28 |
"And with scrolling", |
| 29 |
function () { |
| 30 |
$('#example').dataTable( { |
| 31 |
"bServerSide": true, |
| 32 |
"sAjaxSource": "../../../examples/server_side/scripts/server_processing.php", |
| 33 |
"sScrollY": 200, |
| 34 |
"aoColumnDefs": [ |
| 35 |
{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] }, |
| 36 |
{ "bVisible": false, "aTargets": [ 3 ] } |
| 37 |
], |
| 38 |
"fnInitComplete": function () { |
| 39 |
this.fnDestroy(); |
| 40 |
} |
| 41 |
} ); |
| 42 |
}, |
| 43 |
function () { return $('#example tbody tr:eq(0) td').length == 5; } |
| 44 |
); |
| 45 |
|
| 46 |
oTest.fnComplete(); |
| 47 |
} ); |