mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-04 16:24:11 +01:00
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
// DATA_TEMPLATE: empty_table
|
|
oTest.fnStart( "oLanguage.sProcessing" );
|
|
|
|
$(document).ready( function () {
|
|
/* Check the default */
|
|
var oTable = $('#example').dataTable( {
|
|
"sAjaxSource": "../../../examples/examples_support/json_source.txt",
|
|
"bProcessing": true
|
|
} );
|
|
var oSettings = oTable.fnSettings();
|
|
|
|
oTest.fnWaitTest(
|
|
"Processing language is 'Processing...' by default",
|
|
null,
|
|
function () { return oSettings.oLanguage.sProcessing == "Processing..."; }
|
|
);
|
|
|
|
oTest.fnTest(
|
|
"Processing language default is in the DOM",
|
|
null,
|
|
function () { return document.getElementById('example_processing').innerHTML = "Processing..."; }
|
|
);
|
|
|
|
|
|
oTest.fnWaitTest(
|
|
"Processing language can be defined",
|
|
function () {
|
|
oSession.fnRestore();
|
|
oTable = $('#example').dataTable( {
|
|
"sAjaxSource": "../../../examples/examples_support/json_source.txt",
|
|
"bProcessing": true,
|
|
"oLanguage": {
|
|
"sProcessing": "unit test"
|
|
}
|
|
} );
|
|
oSettings = oTable.fnSettings();
|
|
},
|
|
function () { return oSettings.oLanguage.sProcessing == "unit test"; }
|
|
);
|
|
|
|
oTest.fnTest(
|
|
"Processing language definition is in the DOM",
|
|
null,
|
|
function () { return document.getElementById('example_processing').innerHTML = "unit test"; }
|
|
);
|
|
|
|
|
|
oTest.fnComplete();
|
|
} ); |