/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/5_ajax_objects/oLanguage.sProcessing.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 3 months ago) by torben
File MIME type: application/javascript
File size: 1676 byte(s)
initial import
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/objects.txt",
8 "aoColumns": [
9 { "mData": "engine" },
10 { "mData": "browser" },
11 { "mData": "platform" },
12 { "mData": "version" },
13 { "mData": "grade" }
14 ],
15 "bProcessing": true
16 } );
17 var oSettings = oTable.fnSettings();
18
19 oTest.fnWaitTest(
20 "Processing language is 'Processing...' by default",
21 null,
22 function () { return oSettings.oLanguage.sProcessing == "Processing..."; }
23 );
24
25 oTest.fnTest(
26 "Processing language default is in the DOM",
27 null,
28 function () { return document.getElementById('example_processing').innerHTML = "Processing..."; }
29 );
30
31
32 oTest.fnWaitTest(
33 "Processing language can be defined",
34 function () {
35 oSession.fnRestore();
36 oTable = $('#example').dataTable( {
37 "sAjaxSource": "../../../examples/ajax/sources/objects.txt",
38 "aoColumnDefs": [
39 { "mData": "engine", "aTargets": [0] },
40 { "mData": "browser", "aTargets": [1] },
41 { "mData": "platform", "aTargets": [2] },
42 { "mData": "version", "aTargets": [3] },
43 { "mData": "grade", "aTargets": [4] }
44 ],
45 "bProcessing": true,
46 "oLanguage": {
47 "sProcessing": "unit test"
48 }
49 } );
50 oSettings = oTable.fnSettings();
51 },
52 function () { return oSettings.oLanguage.sProcessing == "unit test"; }
53 );
54
55 oTest.fnTest(
56 "Processing language definition is in the DOM",
57 null,
58 function () { return document.getElementById('example_processing').innerHTML = "unit test"; }
59 );
60
61
62 oTest.fnComplete();
63 } );

  ViewVC Help
Powered by ViewVC 1.1.20