1 // DATA_TEMPLATE: js_data
2 oTest.fnStart( "oLanguage.sInfoPostFix" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable( {
9 var oSettings = oTable.fnSettings();
12 "Info post fix language is '' (blank) by default",
14 function () { return oSettings.oLanguage.sInfoPostFix == ""; }
18 "Width no post fix, the basic info shows",
20 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; }
25 "Info post fix language can be defined",
28 oTable = $('#example').dataTable( {
31 "sInfoPostFix": "unit test"
34 oSettings = oTable.fnSettings();
36 function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; }
40 "Info empty language default is in the DOM",
42 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; }
47 "Macros have no effect in the post fix",
50 oTable = $('#example').dataTable( {
53 "sInfoPostFix": "unit _START_ _END_ _TOTAL_ test"
57 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit _START_ _END_ _TOTAL_ test"; }
62 "Post fix is applied after fintering info",
65 oTable = $('#example').dataTable( {
68 "sInfoPostFix": "unit test"
71 oTable.fnFilter("nothinghere");
73 function () { return document.getElementById('example_info').innerHTML = "Showing 0 to 0 of 0 entries unit (filtered from 57 total entries) test"; }