1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "aoColumns.bSeachable" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
9 var oSettings = oTable.fnSettings();
12 "Columns are searchable by default",
13 function () { oTable.fnFilter("Camino"); },
14 function () { return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/); }
18 "Disabling sorting on a column removes it from the global filter",
21 oTable = $('#example').dataTable( {
25 { "bSearchable": false },
31 oSettings = oTable.fnSettings();
32 oTable.fnFilter("Camino");
34 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
38 "Disabled on one column has no effect on other columns",
39 function () { oTable.fnFilter("Webkit"); },
40 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; }
44 "Disable filtering on multiple columns",
47 oTable = $('#example').dataTable( {
50 { "bSearchable": false },
51 { "bSearchable": false },
57 oSettings = oTable.fnSettings();
58 oTable.fnFilter("Webkit");
60 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
64 "Filter on second disabled column",
65 function () { oTable.fnFilter("Camino"); },
66 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }