1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "oLanguage.sZeroRecords" );
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 "Zero records language is 'No matching records found' by default",
15 function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; }
19 "Text is shown when empty table (after filtering)",
20 function () { oTable.fnFilter('nothinghere'); },
21 function () { return $('#example tbody tr td')[0].innerHTML == "No matching records found" }
27 "Zero records language can be defined",
30 oTable = $('#example').dataTable( {
31 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
34 "sZeroRecords": "unit test"
37 oSettings = oTable.fnSettings();
39 function () { return oSettings.oLanguage.sZeroRecords == "unit test"; }
43 "Text is shown when empty table (after filtering)",
44 function () { oTable.fnFilter('nothinghere2'); },
45 function () { return $('#example tbody tr td')[0].innerHTML == "unit test" }