Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/MVC2/HeuristicLabWeb.PluginHost/HLWebPluginHost/Content/jQuery/jQueryPlugins/DataTables-1.7.6/media/unit_testing/tests_onhold/1_dom/oLanguage.sUrl.js @ 6286

Last change on this file since 6286 was 6286, checked in by dkahn, 13 years ago

#1198 Added jQuery plus plugins

File size: 1.8 KB
Line 
1// DATA_TEMPLATE: dom_data
2oTest.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} );
Note: See TracBrowser for help on using the repository browser.