1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "oLanguage.sInfoPostFix" );
4 $(document).ready( function () {
5 /* Check the default */
6 var oTable = $('#example').dataTable();
7 var oSettings = oTable.fnSettings();
10 "Info post fix language is '' (blank) by default",
12 function () { return oSettings.oLanguage.sInfoPostFix == ""; }
16 "Width no post fix, the basic info shows",
18 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; }
23 "Info post fix language can be defined",
26 oTable = $('#example').dataTable( {
28 "sInfoPostFix": "unit test"
31 oSettings = oTable.fnSettings();
33 function () { return oSettings.oLanguage.sInfoPostFix == "unit test"; }
37 "Info empty language default is in the DOM",
39 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit test"; }
44 "Macros have no effect in the post fix",
47 oTable = $('#example').dataTable( {
49 "sInfoPostFix": "unit _START_ _END_ _TOTAL_ test"
53 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries unit _START_ _END_ _TOTAL_ test"; }
58 "Post fix is applied after fintering info",
61 oTable = $('#example').dataTable( {
63 "sInfoPostFix": "unit test"
66 oTable.fnFilter("nothinghere");
68 function () { return document.getElementById('example_info').innerHTML = "Showing 0 to 0 of 0 entries unit (filtered from 57 total entries) test"; }