1 |
// DATA_TEMPLATE: dom_data |
2 |
oTest.fnStart( "bFilter" ); |
3 |
|
4 |
$(document).ready( function () { |
5 |
/* Check the default */ |
6 |
$('#example').dataTable(); |
7 |
|
8 |
oTest.fnTest( |
9 |
"Filtering div exists by default", |
10 |
null, |
11 |
function () { return document.getElementById('example_filter') != null; } |
12 |
); |
13 |
|
14 |
/* Check can disable */ |
15 |
oTest.fnTest( |
16 |
"Fltering can be disabled", |
17 |
function () { |
18 |
oSession.fnRestore(); |
19 |
$('#example').dataTable( { |
20 |
"bFilter": false |
21 |
} ); |
22 |
}, |
23 |
function () { return document.getElementById('example_filter') == null; } |
24 |
); |
25 |
|
26 |
/* Enable makes no difference */ |
27 |
oTest.fnTest( |
28 |
"Filtering enabled override", |
29 |
function () { |
30 |
oSession.fnRestore(); |
31 |
$('#example').dataTable( { |
32 |
"bFilter": true |
33 |
} ); |
34 |
}, |
35 |
function () { return document.getElementById('example_filter') != null; } |
36 |
); |
37 |
|
38 |
|
39 |
oTest.fnComplete(); |
40 |
} ); |