1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "oLanguage.sSearch" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
9 var oSettings = oTable.fnSettings();
12 "Search language is 'Search:' by default",
14 function () { return oSettings.oLanguage.sSearch == "Search:"; }
18 "A label input is used",
20 function () { return $('label', oSettings.aanFeatures.f[0]).length == 1 }
24 "Search language default is in the DOM",
26 function () { return $('label', oSettings.aanFeatures.f[0]).text()
32 "Search language can be defined",
35 oTable = $('#example').dataTable( {
38 "sSearch": "unit test"
41 oSettings = oTable.fnSettings();
43 function () { return oSettings.oLanguage.sSearch == "unit test"; }
47 "Info language definition is in the DOM",
49 function () { return $('label', oSettings.aanFeatures.f[0]).text().indexOf('unit test') !== -1; }
54 "Blank search has a no (separator) inserted",
57 oTable = $('#example').dataTable( {
63 oSettings = oTable.fnSettings();
65 function () { return document.getElementById('example_filter').childNodes.length == 1; }