Author: buildbot
Date: Sat Jul 12 20:45:15 2014
New Revision: 915981

Log:
Staging update by buildbot for ooo-site

Modified:
    websites/staging/ooo-site/trunk/cgi-bin/   (props changed)
    websites/staging/ooo-site/trunk/content/   (props changed)
    websites/staging/ooo-site/trunk/content/download/download.js

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jul 12 20:45:15 2014
@@ -1 +1 @@
-1610044
+1610046

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jul 12 20:45:15 2014
@@ -1 +1 @@
-1610044
+1610046

Modified: websites/staging/ooo-site/trunk/content/download/download.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/download.js (original)
+++ websites/staging/ooo-site/trunk/content/download/download.js Sat Jul 12 
20:45:15 2014
@@ -1,6 +1,7 @@
 /*
  * Overview of all methods (functions) defined below of the global object "DL"
  * ---------------------------------------------------------------------------
+ * function DL.init                    ()
  * function DL.initVariables           ()
  * function DL.getLanguage             ()
  * function DL.fillOSSelection         ()
@@ -25,7 +26,6 @@
  *
  * Overview of global functions defined below
  * ------------------------------------------
- * function init                       ()
  * function openItem                   ( itemid, uri )
  */
 
@@ -264,14 +264,20 @@ DL.fillLanguageSelection = function() {
        var option    = "";
 
        // Fill the <select> element until all languages are used.
-       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 2 ) {
+       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 3 ) {
                option       = document.createElement( "option" );
                // Assign the language ISO code as index value.
                option.value = DL.SEL_LANG[ i ];
+/*
                // Assign the language ISO code as title.
                option.title = DL.SEL_LANG[ i ];
                // Assign the language name as "English name (Native name)".
                option.text  = DL.SEL_LANG[ i + 1 ];
+*/
+               // Assign the language name as "Native name" (or English name 
if localization is not available).
+               option.text  = DL.SEL_LANG[ i + 1 ];
+               // Assign the language as "English name (ISO code)" as title.
+               option.title = DL.SEL_LANG[ i + 2 ];
                // Add the new option to the already existing ones.
                selection.appendChild( option );
        }
@@ -283,6 +289,12 @@ DL.fillLanguageSelection = function() {
                for( i = 0, j = 
l10n.dl_green_box_select_box_language_values.length; i < j; i++ ) {
                        // Exchange only the default language name with the 
localized name.
                        selection.options[ i ].text = 
l10n.dl_green_box_select_box_language_values[ i ];
+/*
+                       alert( "i:              \t\t"   + i + "\n"
+                               + "Localized:   \t"     + 
l10n.dl_green_box_select_box_language_values[ i ]     + "\n"
+                               + "Text:        \t\t"   + selection.options[ i 
].text                           + "\n"
+                               + "Title:       \t\t"   + selection.options[ i 
].title );
+*/
                }
        }
 
@@ -370,10 +382,10 @@ DL.setLanguageSelection = function() {
        var found     = false;
 
        // Set the recognized browser language as default for the select box.
-       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 2 ) {
+       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 3 ) {
                // If the language was found, set it as pre-selected.
                if( DL.SEL_LANG[ i ] === DL.LANG_ISO ) {
-                       selection.selectedIndex = i / 2;
+                       selection.selectedIndex = i / 3;
                        found = true;
                        break;
                }
@@ -463,7 +475,7 @@ DL.getLanguageSelection = function() {
        var language_value = document[ "download" ][ "language" ].options[ 
document[ "download" ][ "language" ].selectedIndex ].value;
 
        // Search through the <select> element until the chosen language is 
found.
-       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 2 ) {
+       for( var i = 0, j = DL.SEL_LANG.length; i < j; i = i + 3 ) {
                if( DL.SEL_LANG[ i ] === language_value ) {
                        DL.LANG_SEL = language_value;
                        break;


Reply via email to