Rev | Line | |
---|
[6286] | 1 | // DATA_TEMPLATE: js_data |
---|
| 2 | oTest.fnStart( "oLanguage.sProcessing" ); |
---|
| 3 | |
---|
| 4 | $(document).ready( function () { |
---|
| 5 | /* Check the default */ |
---|
| 6 | var oTable = $('#example').dataTable( { |
---|
| 7 | "aaData": gaaData, |
---|
| 8 | "bProcessing": true |
---|
| 9 | } ); |
---|
| 10 | var oSettings = oTable.fnSettings(); |
---|
| 11 | |
---|
| 12 | oTest.fnTest( |
---|
| 13 | "Processing language is 'Processing...' by default", |
---|
| 14 | null, |
---|
| 15 | function () { return oSettings.oLanguage.sProcessing == "Processing..."; } |
---|
| 16 | ); |
---|
| 17 | |
---|
| 18 | oTest.fnTest( |
---|
| 19 | "Processing language default is in the DOM", |
---|
| 20 | null, |
---|
| 21 | function () { return document.getElementById('example_processing').innerHTML = "Processing..."; } |
---|
| 22 | ); |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | oTest.fnTest( |
---|
| 26 | "Processing language can be defined", |
---|
| 27 | function () { |
---|
| 28 | oSession.fnRestore(); |
---|
| 29 | oTable = $('#example').dataTable( { |
---|
| 30 | "aaData": gaaData, |
---|
| 31 | "bProcessing": true, |
---|
| 32 | "oLanguage": { |
---|
| 33 | "sProcessing": "unit test" |
---|
| 34 | } |
---|
| 35 | } ); |
---|
| 36 | oSettings = oTable.fnSettings(); |
---|
| 37 | }, |
---|
| 38 | function () { return oSettings.oLanguage.sProcessing == "unit test"; } |
---|
| 39 | ); |
---|
| 40 | |
---|
| 41 | oTest.fnTest( |
---|
| 42 | "Processing language definition is in the DOM", |
---|
| 43 | null, |
---|
| 44 | function () { return document.getElementById('example_processing').innerHTML = "unit test"; } |
---|
| 45 | ); |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | oTest.fnComplete(); |
---|
| 49 | } ); |
---|
Note: See
TracBrowser
for help on using the repository browser.