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",
10 var oSettings = oTable.fnSettings();
13 "Columns are searchable by default",
14 function () { oTable.fnFilter("Camino"); },
16 if ( $('#example tbody tr:eq(0) td:eq(1)')[0] )
17 return $('#example tbody tr:eq(0) td:eq(1)').html().match(/Camino/);
24 "Disabling sorting on a column removes it from the global filter",
27 oTable = $('#example').dataTable( {
28 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
32 { "bSearchable": false },
38 oSettings = oTable.fnSettings();
39 oTable.fnFilter("Camino");
41 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
45 "Disabled on one column has no effect on other columns",
46 function () { oTable.fnFilter("Webkit"); },
47 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "Webkit"; }
51 "Disable filtering on multiple columns",
54 oTable = $('#example').dataTable( {
55 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
58 { "bSearchable": false },
59 { "bSearchable": false },
65 oSettings = oTable.fnSettings();
66 oTable.fnFilter("Webkit");
68 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }
72 "Filter on second disabled column",
73 function () { oTable.fnFilter("Camino"); },
74 function () { return $('#example tbody tr:eq(0) td:eq(0)').html() == "No matching records found"; }