Author: marcus
Date: Thu May 29 18:34:47 2014
New Revision: 1598358

URL: http://svn.apache.org/r1598358
Log:
Fixed error:  was not recognized correct

Modified:
    openoffice/ooo-site/trunk/content/download/test/download_droplist.js

Modified: openoffice/ooo-site/trunk/content/download/test/download_droplist.js
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download_droplist.js?rev=1598358&r1=1598357&r2=1598358&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download_droplist.js 
(original)
+++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Thu 
May 29 18:34:47 2014
@@ -70,7 +70,7 @@ function initVars() {
        element_ids_lnk = [ "dl_f_lnk", "dl_lp_lnk", "dl_f_chk_keys", 
"dl_f_chk_asc", "dl_f_chk_md5", "dl_f_chk_sha256",
        "dl_chk_verify", "dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", 
"dl_lp_chk_sha256", "dl_hlp", "dl_rpt" ];
 
-       // The following are used in "index.html" and "download.js".
+       // The following are used in "download.js". and "index.html".
        LANG_ISO                                = "";    // The language as ISO 
code
        LANG_ARRAY                              = "";    // This array contains 
all language specific data
        UI_PLATFORM                             = "";    // The platform as 
readable string
@@ -81,9 +81,9 @@ function initVars() {
        RELEASE_PLATFORM_POS_LP                 = 0;     // The position of the 
platform in the release matrix array
        RELEASE_PLATFORM                        = "";    // The platform in the 
release matrix array
        RELEASE_LANG                            = "";    // The language 
specific data depending on LANG_ISO
-       LANG_SEL                                = "";    // The selected 
language as ISO code from drop-down-box
-       PLATFORM_SEL                            = "";    // The selected 
platform from drop-down-box
-       VERSION_SEL                             = "";    // The selected 
version from drop-down-box
+       LANG_SEL                                = "";    // The selected 
language as ISO code from select box
+       PLATFORM_SEL                            = "";    // The selected 
platform from select box
+       VERSION_SEL                             = "";    // The selected 
version from select box
        FILENAME_FULL                           = "";    // The complete 
filename of the download URL (for full installation)
        FILENAME_LP                             = "";    // The complete 
filename of the download URL (for language pack)
        FILESIZE_FULL                           = 0;     // The filesize of the 
download file (for full installation)
@@ -120,9 +120,8 @@ function initVars() {
  */
 function getLanguage() {
        var language = "";
-
-//     alertDbg( "getLanguage()" );
-/*     alert( ""
+/*
+       alert( ""
        + "getLanguage() : Begin" + "\n\n"
        + "language: " + language + "\n\n"
        + "NL_LANG: "  + NL_LANG  + "\n\n"
@@ -134,9 +133,11 @@ function getLanguage() {
        if( NL_LANG != "" )
                language = NL_LANG;
 
-       // If available, use the selected language form drop-down-box.
-       if( LANG_SEL != "" )
+       // Else if available, use the selected language from select box.
+       else if( LANG_SEL != "" )
                language = LANG_SEL;
+
+       // Else try to recognize the language from browser data.
        else if( navigator.language )
                language = navigator.language;
        else if( navigator.userLanguage )
@@ -215,7 +216,7 @@ function getLanguage() {
 }
 
 /*
- * Set values into the <select> element for OS (drop-down-box)
+ * Set values into the <select> element for OS (select box)
  * Depends on array-list
  */
 function fillOSSel() {
@@ -241,7 +242,7 @@ function fillOSSel() {
 }
 
 /*
- * Set values into the <select> element for language (drop-down-box)
+ * Set values into the <select> element for language (select box)
  * Depends on array-list
  */
 function fillLangSel() {
@@ -280,7 +281,7 @@ function fillLangSel() {
 }
 
 /*
- * Set values into the <select> element for version (drop-down-box)
+ * Set values into the <select> element for version (select box)
  * Depends on array-list
  */
 function fillVerSel() {
@@ -303,7 +304,7 @@ function fillVerSel() {
 }
 
 /*
- * Set value in the <select> element for OS (drop-down-box)
+ * Set value in the <select> element for OS (select box)
  * Depends on OS data from browser
  */
 function setOSSel() {
@@ -326,13 +327,13 @@ function setOSSel() {
 
 //     URL_PLATFORM = "";
 
-       // Set the recognized browser platform as default for the drop-down-box.
+       // Set the recognized browser platform as default for the select box.
 //     alert( "SEL_OS.length: " + SEL_OS.length / 3 );
 //     alert( "URL_PLATFORM: " + URL_PLATFORM );
 //     alert( "sel_os.selectedIndex: " + sel_os.selectedIndex );
 //     for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
        for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
-               // If the platform was found, assign the found index to the 
drop-down-box.
+               // If the platform was found, assign the found index to the 
select box.
 //             alert( "i: " + i / 2 + "\n" + "SEL_OS[ i ]: " + SEL_OS[ i ] );
                if( SEL_OS[ i ] == URL_PLATFORM ) {
                        sel_os.selectedIndex = i / 3;
@@ -341,7 +342,7 @@ function setOSSel() {
                }
        }
 
-       // If no selected platform for was set in the drop-down-box because it 
was not recognized from browser data,
+       // If no selected platform for was set in the select box because it was 
not recognized from browser data,
        // assign "Windows" as default.
 //     alert( "sel_os.selectedIndex: " + sel_os.selectedIndex );
        if( sel_os.selectedIndex == 0 ) {
@@ -349,7 +350,7 @@ function setOSSel() {
 //             alert( "SEL_OS.length: " + SEL_OS.length / 3 );
 //             for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
                for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
-                       // If the platform was found, assign the found index to 
the drop-down-box.
+                       // If the platform was found, assign the found index to 
the select box.
 //                     alert( "i: " + i / 2 + "\n" + "SEL_OS[ i ]: " + SEL_OS[ 
i ] );
                        if( SEL_OS[ i ] == "Win_x86_install" ) {
                                sel_os.selectedIndex = i / 3;
@@ -384,7 +385,7 @@ function setOSSel() {
                default:
                        // Default: Assign Windows.
                        for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
-                               // If the platform was found, assign the found 
index to the drop-down-box.
+                               // If the platform was found, assign the found 
index to the select box.
                                if( SEL_OS[ i ] == "Win_x86_install" ) {
                                        sel_os.selectedIndex = i/3;
                                        break;
@@ -411,7 +412,7 @@ function setOSSel() {
 }
 
 /*
- * Set value in the <select> element for language (drop-down-box)
+ * Set value in the <select> element for language (select box)
  * Depends on language data from browser
  */
 function setLangSel() {
@@ -433,13 +434,13 @@ function setLangSel() {
 
 //     LANG_ISO = "";
 
-       // Set the recognized browser language as default for the drop-down-box.
+       // Set the recognized browser language as default for the select box.
 //     alert( "SEL_LANG.length: " + SEL_LANG.length / 2 );
 //     alert( "LANG_ISO: " + LANG_ISO );
 //     alert( "sel_lang.selectedIndex: " + sel_lang.selectedIndex );
 //     for( var i = 0; i < SEL_LANG.length; i = i + 2 ) {
        for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
-               // If the language was found, assign the found index to the 
drop-down-box.
+               // If the language was found, assign the found index to the 
select box.
 //             alert( "i: " + i / 2 + "\n" + "SEL_LANG[ i ]: " + SEL_LANG[ i ] 
);
                if( SEL_LANG[ i ] == LANG_ISO ) {
                        sel_lang.selectedIndex = i / 2;
@@ -448,7 +449,7 @@ function setLangSel() {
                }
        }
 
-       // If no selected language was set in the drop-down-box because it was 
not recognized from browser data,
+       // If no selected language was set in the select box because it was not 
recognized from browser data,
        // assign "en-US" as default.
 //     alert( "sel_lang.selectedIndex: " + sel_lang.selectedIndex );
        if( sel_lang.selectedIndex == 0 ) {
@@ -456,7 +457,7 @@ function setLangSel() {
 //             alert( "SEL_LANG.length: " + SEL_LANG.length / 2 );
 //             for( var i = 0; i < SEL_LANG.length; i = i + 2 ) {
                for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
-                       // If the language was found, assign the found index to 
the drop-down-box.
+                       // If the language was found, assign the found index to 
the select box.
 //                     alert( "i: " + i / 2 + "\n" + "SEL_LANG[ i ]: " + 
SEL_LANG[ i ] );
                        if( SEL_LANG[ i ] == "en-US" ) {
                                sel_lang.selectedIndex = i / 2;
@@ -476,7 +477,7 @@ function setLangSel() {
                default:
                        // Default: Assign en-US.
                        for( var i = 0; i < SEL_LANG.length; i = i + 2 ) {
-                               // If the language was found, assign the found 
index to the drop-down-box.
+                               // If the language was found, assign the found 
index to the select box.
                                if( SEL_LANG[ i ] == "en-US" ) {
                                        sel_lang.selectedIndex = i/2;
                                        break;
@@ -503,7 +504,7 @@ function setLangSel() {
 }
 
 /*
- * Set value in the <select> element for version (drop-down-box)
+ * Set value in the <select> element for version (select box)
  * Depends on nothing
  */
 function setVerSel() {
@@ -514,13 +515,13 @@ function setVerSel() {
 
 //     VERSION = "";
 
-       // Set the value of $VERSION as default for the drop-down-box.
+       // Set the value of $VERSION as default for the select box.
 //     alert( "SEL_VER.length: " + SEL_VER.length / 2 );
 //     alert( "VERSION: " + VERSION );
 //     alert( "sel_ver.selectedIndex: " + sel_ver.selectedIndex );
 //     for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
        for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
-               // If the version was found, assign the found index to the 
drop-down-box.
+               // If the version was found, assign the found index to the 
select box.
 //             alert( "i: " + i / 2 );
                if( SEL_VER[ i ] == VERSION ) {
                        sel_ver.selectedIndex = i/2;
@@ -536,7 +537,7 @@ function setVerSel() {
                // Default: Assign "4.1.0".
 //             alert( "SEL_VER.length: " + SEL_VER.length / 2 );
                for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
-                       // If the version was found, assign the found index to 
the drop-down-box.
+                       // If the version was found, assign the found index to 
the select box.
 //                     alert( "i: " + i / 2 + "\n" + "SEL_VER[ i ]: " + 
SEL_VER[ i ] );
                        if( SEL_VER[ i ] == "4.1.0" ) {
                                sel_ver.selectedIndex = i / 2;
@@ -563,7 +564,7 @@ function setVerSel() {
                        // Default: Assign the most recent version.
                        // Search for the index value of the most recent 
version.
                        for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
-                               // If the version was found, assign the found 
index to the drop-down-box.
+                               // If the version was found, assign the found 
index to the select box.
                                if( SEL_VER[ i ] == "4.1.0 ) {
                                        sel_ver.selectedIndex = i/2;
                                        break;
@@ -580,7 +581,7 @@ function setVerSel() {
 }
 
 /*
- * Get values from the <select> element for OS (drop-down-box)
+ * Get values from the <select> element for OS (select box)
  * Depends on chosen OS
  */
 function getOSSel() {
@@ -645,7 +646,7 @@ function getOSSel() {
 }
 
 /*
- * Get values from the <select> element for language (drop-down-box)
+ * Get values from the <select> element for language (select box)
  * Depends on chosen language
  */
 function getLangSel() {
@@ -707,7 +708,7 @@ function getLangSel() {
 }
 
 /*
- * Get values from the <select> element for version (drop-down-box)
+ * Get values from the <select> element for version (select box)
  * Depends on chosen version
  */
 function getVerSel() {
@@ -735,7 +736,7 @@ function getVerSel() {
 }
 
 /*
- * Get values from the <select> element for type (drop-down-box)
+ * Get values from the <select> element for type (select box)
  * Depends on chosen type
  */
 function getTypeSel() {
@@ -1143,7 +1144,7 @@ function getLinkSel( rel_mode ) {
        if( rel_mode == undefined )
                rel_mode = 1;
 
-       // Get the selected data from the drop-down-boxes.
+       // Get the selected data from the select boxex.
        getOSSel();
        getLangSel();
        getVerSel();


Reply via email to