1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "aoColumns.bSeachable" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable();
7 var oSettings = oTable.fnSettings();
10 "Columns are searchable by default",
11 function () { oTable.fnFilter("Camino"); },
12 function () { return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/); }
16 "Disabling sorting on a column removes it from the global filter",
19 oTable = $('#example').dataTable( {
22 { "bSearchable": false },
28 oSettings = oTable.fnSettings();
29 oTable.fnFilter("Camino");
31 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
35 "Disabled on one column has no effect on other columns",
36 function () { oTable.fnFilter("Webkit"); },
37 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; }
41 "Disable filtering on multiple columns",
44 oTable = $('#example').dataTable( {
46 { "bSearchable": false },
47 { "bSearchable": false },
53 oSettings = oTable.fnSettings();
54 oTable.fnFilter("Webkit");
56 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
60 "Filter on second disabled column",
61 function () { oTable.fnFilter("Camino"); },
62 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }