1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "oLanguage.sInfo" );
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 language is 'Showing _START_ to _END_ of _TOTAL_ entries' by default",
15 function () { return oSettings.oLanguage.sInfo == "Showing _START_ to _END_ of _TOTAL_ entries"; }
19 "Info language default is in the DOM",
21 function () { return document.getElementById('example_info').innerHTML = "Showing 1 to 10 of 57 entries"; }
26 "Info language can be defined - without any macros",
29 oTable = $('#example').dataTable( {
30 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
36 oSettings = oTable.fnSettings();
38 function () { return oSettings.oLanguage.sInfo == "unit test"; }
42 "Info language definition is in the DOM",
44 function () { return document.getElementById('example_info').innerHTML = "unit test"; }
48 "Info language can be defined - with macro _START_ only",
51 $('#example').dataTable( {
52 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
55 "sInfo": "unit _START_ test"
59 function () { return document.getElementById('example_info').innerHTML = "unit 1 test"; }
63 "Info language can be defined - with macro _END_ only",
66 $('#example').dataTable( {
67 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
70 "sInfo": "unit _END_ test"
74 function () { return document.getElementById('example_info').innerHTML = "unit 10 test"; }
78 "Info language can be defined - with macro _TOTAL_ only",
81 $('#example').dataTable( {
82 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
85 "sInfo": "unit _END_ test"
89 function () { return document.getElementById('example_info').innerHTML = "unit 57 test"; }
93 "Info language can be defined - with macros _START_ and _END_",
96 $('#example').dataTable( {
97 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
100 "sInfo": "unit _START_ _END_ test"
104 function () { return document.getElementById('example_info').innerHTML = "unit 1 10 test"; }
108 "Info language can be defined - with macros _START_, _END_ and _TOTAL_",
110 oSession.fnRestore();
111 $('#example').dataTable( {
112 "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
113 "bDeferRender": true,
115 "sInfo": "unit _START_ _END_ _TOTAL_ test"
119 function () { return document.getElementById('example_info').innerHTML = "unit 1 10 57 test"; }