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/arrays.txt"
9 var oSettings = oTable.fnSettings();
12 "Columns are searchable by default",
13 function () { oTable.fnFilter("Camino"); },
15 if ( $('#example tbody tr:eq(0) td:eq(1)')[0] )
16 return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/);
23 "Disabling sorting on a column removes it from the global filter",
26 oTable = $('#example').dataTable( {
27 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
30 { "bSearchable": false },
36 oSettings = oTable.fnSettings();
37 oTable.fnFilter("Camino");
39 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
43 "Disabled on one column has no effect on other columns",
44 function () { oTable.fnFilter("Webkit"); },
45 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; }
49 "Disable filtering on multiple columns",
52 oTable = $('#example').dataTable( {
53 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
55 { "bSearchable": false },
56 { "bSearchable": false },
62 oSettings = oTable.fnSettings();
63 oTable.fnFilter("Webkit");
65 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
69 "Filter on second disabled column",
70 function () { oTable.fnFilter("Camino"); },
71 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }