1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "aoColumns.bSeachable" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
7 "sAjaxSource": "../../../examples/ajax/sources/objects.txt",
10 { "mData": "browser" },
11 { "mData": "platform" },
12 { "mData": "version" },
16 var oSettings = oTable.fnSettings();
19 "Columns are searchable by default",
20 function () { oTable.fnFilter("Camino"); },
22 if ( $('#example tbody tr:eq(0) td:eq(1)')[0] )
23 return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/);
30 "Disabling sorting on a column removes it from the global filter",
33 oTable = $('#example').dataTable( {
34 "sAjaxSource": "../../../examples/ajax/sources/objects.txt",
36 { "mData": "engine" },
37 { "mData": "browser", "bSearchable": false },
38 { "mData": "platform" },
39 { "mData": "version" },
43 oSettings = oTable.fnSettings();
44 oTable.fnFilter("Camino");
46 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
50 "Disabled on one column has no effect on other columns",
51 function () { oTable.fnFilter("Webkit"); },
52 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; }
56 "Disable filtering on multiple columns",
59 oTable = $('#example').dataTable( {
60 "sAjaxSource": "../../../examples/ajax/sources/objects.txt",
62 { "mData": "engine", "bSearchable": false },
63 { "mData": "browser", "bSearchable": false },
64 { "mData": "platform" },
65 { "mData": "version" },
69 oSettings = oTable.fnSettings();
70 oTable.fnFilter("Webkit");
72 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
76 "Filter on second disabled column",
77 function () { oTable.fnFilter("Camino"); },
78 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }