1 |
// DATA_TEMPLATE: empty_table |
2 |
oTest.fnStart( "oLanguage.sProcessing" ); |
3 |
|
4 |
$(document).ready( function () { |
5 |
/* Check the default */ |
6 |
var oTable = $('#example').dataTable( { |
7 |
"sAjaxSource": "../../../examples/ajax/sources/arrays.txt", |
8 |
"bDeferRender": true, |
9 |
"bProcessing": true |
10 |
} ); |
11 |
var oSettings = oTable.fnSettings(); |
12 |
|
13 |
oTest.fnWaitTest( |
14 |
"Processing language is 'Processing...' by default", |
15 |
null, |
16 |
function () { return oSettings.oLanguage.sProcessing == "Processing..."; } |
17 |
); |
18 |
|
19 |
oTest.fnTest( |
20 |
"Processing language default is in the DOM", |
21 |
null, |
22 |
function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } |
23 |
); |
24 |
|
25 |
|
26 |
oTest.fnWaitTest( |
27 |
"Processing language can be defined", |
28 |
function () { |
29 |
oSession.fnRestore(); |
30 |
oTable = $('#example').dataTable( { |
31 |
"sAjaxSource": "../../../examples/ajax/sources/arrays.txt", |
32 |
"bDeferRender": true, |
33 |
"bProcessing": true, |
34 |
"oLanguage": { |
35 |
"sProcessing": "unit test" |
36 |
} |
37 |
} ); |
38 |
oSettings = oTable.fnSettings(); |
39 |
}, |
40 |
function () { return oSettings.oLanguage.sProcessing == "unit test"; } |
41 |
); |
42 |
|
43 |
oTest.fnTest( |
44 |
"Processing language definition is in the DOM", |
45 |
null, |
46 |
function () { return document.getElementById('example_processing').innerHTML = "unit test"; } |
47 |
); |
48 |
|
49 |
|
50 |
oTest.fnComplete(); |
51 |
} ); |