/[projects]/misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/4_server-side/oLanguage.sUrl.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: 2081 byte(s)
initial import
1 // DATA_TEMPLATE: empty_table
2 oTest.fnStart( "oLanguage.sUrl" );
3
4 /* Note that we only test the internal storage of language information pulled form a file here
5 * as the other language tests will check it goes into the DOM correctly
6 */
7
8 $(document).ready( function () {
9 /* Check the default */
10 var oTable = $('#example').dataTable( {
11 "bServerSide": true,
12 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php"
13 } );
14 var oSettings = oTable.fnSettings();
15
16 oTest.fnTest(
17 "sUrl is blank by default",
18 null,
19 function () { return oSettings.oLanguage.sUrl == ""; }
20 );
21
22
23 oTest.fnWaitTest(
24 "Loading of German file loads language information",
25 function () {
26 oSession.fnRestore();
27 oTable = $('#example').dataTable( {
28 "bServerSide": true,
29 "sAjaxSource": "../../../examples/server_side/scripts/server_processing.php",
30 "oLanguage": {
31 "sUrl": "../../../examples/examples_support/de_DE.txt"
32 }
33 } );
34 oSettings = oTable.fnSettings();
35 },
36 function () {
37 var bReturn =
38 oSettings.oLanguage.sProcessing == "Bitte warten..." &&
39 oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" &&
40 oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." &&
41 oSettings.oLanguage.sInfo == "_START_ bis _END_ von _TOTAL_ Einträgen" &&
42 oSettings.oLanguage.sInfoEmpty == "0 bis 0 von 0 Einträgen" &&
43 oSettings.oLanguage.sInfoFiltered == "(gefiltert von _MAX_ Einträgen)" &&
44 oSettings.oLanguage.sInfoPostFix == "" &&
45 oSettings.oLanguage.sSearch == "Suchen" &&
46 oSettings.oLanguage.oPaginate.sFirst == "Erster" &&
47 oSettings.oLanguage.oPaginate.sPrevious == "Zurück" &&
48 oSettings.oLanguage.oPaginate.sNext == "Nächster" &&
49 oSettings.oLanguage.oPaginate.sLast == "Letzter";
50
51 return bReturn;
52 }
53 );
54
55 /* One DOM check just to ensure that they go into the DOM */
56 oTest.fnTest(
57 "Loaded language goes into the DOM",
58 null,
59 function () { return document.getElementById('example_info').innerHTML = "1 bis 10 von 57 Einträgen"; }
60 );
61
62
63 oTest.fnComplete();
64 } );

  ViewVC Help
Powered by ViewVC 1.1.20