1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "oLanguage.sInfoPostFix" );
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 "Info post fix language is '' (blank) by default",
15 function () { return oSettings.oLanguage.sInfoPostFix == ""; }
19 "Width no post fix, the basic info shows",
21 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; }
26 "Info post fix language can be defined",
29 oTable = $('#example').dataTable( {
30 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
33 "sInfoPostFix": "unit test"
36 oSettings = oTable.fnSettings();
38 function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; }
42 "Info empty language default is in the DOM",
44 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; }
49 "Macros have no effect in the post fix",
52 oTable = $('#example').dataTable( {
53 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
56 "sInfoPostFix": "unit _START_ _END_ _TOTAL_ test"
60 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit _START_ _END_ _TOTAL_ test"; }
65 "Post fix is applied after fintering info",
68 oTable = $('#example').dataTable( {
69 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
72 "sInfoPostFix": "unit test"
75 oTable.fnFilter("nothinghere");
77 function () { return document.getElementById('example_info').innerHTML = "Showing 0 to 0 of 0 entries unit (filtered from 57 total entries) test"; }