1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "oLanguage.sZeroRecords" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable();
7 var oSettings = oTable.fnSettings();
10 "Zero records language is 'No matching records found' by default",
12 function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; }
16 "Text is shown when empty table (after filtering)",
17 function () { oTable.fnFilter('nothinghere'); },
18 function () { return $('#example tbody tr td')[0].innerHTML == "No matching records found" }
24 "Zero records language can be defined",
27 oTable = $('#example').dataTable( {
29 "sZeroRecords": "unit test"
32 oSettings = oTable.fnSettings();
34 function () { return oSettings.oLanguage.sZeroRecords == "unit test"; }
38 "Text is shown when empty table (after filtering)",
39 function () { oTable.fnFilter('nothinghere2'); },
40 function () { return $('#example tbody tr td')[0].innerHTML == "unit test" }