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

Contents of /misc/horsensspejder-web/jquery/DataTables-1.9.4/media/unit_testing/tests_onhold/1_dom/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, 2 months ago) by torben
File MIME type: application/javascript
File size: 1865 byte(s)
initial import
1 // DATA_TEMPLATE: dom_data
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 var oSettings = oTable.fnSettings();
12
13 oTest.fnTest(
14 "sUrl is blank by default",
15 null,
16 function () { return oSettings.oLanguage.sUrl == ""; }
17 );
18
19
20 oTest.fnWaitTest(
21 "Loading of German file loads language information",
22 function () {
23 oSession.fnRestore();
24 oTable = $('#example').dataTable( {
25 "oLanguage": {
26 "sUrl": "../../../examples/examples_support/de_DE.txt"
27 }
28 } );
29 oSettings = oTable.fnSettings();
30 },
31 function () {
32 var bReturn =
33 oSettings.oLanguage.sProcessing == "Bitte warten..." &&
34 oSettings.oLanguage.sLengthMenu == "_MENU_ Einträge anzeigen" &&
35 oSettings.oLanguage.sZeroRecords == "Keine Einträge vorhanden." &&
36 oSettings.oLanguage.sInfo == "_START_ bis _END_ von _TOTAL_ Einträgen" &&
37 oSettings.oLanguage.sInfoEmpty == "0 bis 0 von 0 Einträgen" &&
38 oSettings.oLanguage.sInfoFiltered == "(gefiltert von _MAX_ Einträgen)" &&
39 oSettings.oLanguage.sInfoPostFix == "" &&
40 oSettings.oLanguage.sSearch == "Suchen" &&
41 oSettings.oLanguage.oPaginate.sFirst == "Erster" &&
42 oSettings.oLanguage.oPaginate.sPrevious == "Zurück" &&
43 oSettings.oLanguage.oPaginate.sNext == "Nächster" &&
44 oSettings.oLanguage.oPaginate.sLast == "Letzter";
45
46 return bReturn;
47 }
48 );
49
50 /* One DOM check just to ensure that they go into the DOM */
51 oTest.fnTest(
52 "Loaded language goes into the DOM",
53 null,
54 function () { return document.getElementById('example_info').innerHTML = "1 bis 10 von 57 Einträgen"; }
55 );
56
57
58 oTest.fnComplete();
59 } );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20