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