You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by bu...@apache.org on 2014/04/29 00:31:02 UTC
svn commit: r907237 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/
content/download/test/download_droplist.js
Author: buildbot
Date: Mon Apr 28 22:31:01 2014
New Revision: 907237
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/test/download_droplist.js
Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Apr 28 22:31:01 2014
@@ -1 +1 @@
-1590827
+1590828
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Apr 28 22:31:01 2014
@@ -1 +1 @@
-1590827
+1590828
Modified: websites/staging/ooo-site/trunk/content/download/test/download_droplist.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download_droplist.js (original)
+++ websites/staging/ooo-site/trunk/content/download/test/download_droplist.js Mon Apr 28 22:31:01 2014
@@ -24,12 +24,13 @@ function initVars() {
LANG_ISO = ""; // The language as ISO code
LANG_ARRAY = ""; // This array contains all language specific data
- RELEASE_MATRIX_PLATFORM_POS_FULL = 0; // The position of the platform in the release matrix array
- RELEASE_MATRIX_PLATFORM_POS_LP = 0; // The position of the platform in the release matrix array
- RELEASE_MATRIX_PLATFORM = ""; // The platform in the release matrix array
UI_PLATFORM = ""; // The platform as readable string
URL_PLATFORM = ""; // The platform as part of the download URL
OLD_PLATFORM = false; // The browser platform is old (true) or not (false)
+ RELEASE_MATRIX_PLATFORM_POS_FULL = 0; // The position of the platform in the release matrix array
+ RELEASE_MATRIX_PLATFORM_POS_LP = 0; // The position of the platform in the release matrix array
+ RELEASE_MATRIX_PLATFORM = ""; // The platform in the release matrix array
+ VERSION_ALT = ""; // The selected version from drop-down-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)
@@ -61,6 +62,7 @@ function alertDbg( function_name ) {
+ "LANG_ISO: " + "\t\t\t\t\t" + LANG_ISO + "\n"
+ "UI_PLATFORM: " + "\t\t\t\t\t" + UI_PLATFORM + "\n"
+ "URL_PLATFORM: " + "\t\t\t\t\t" + URL_PLATFORM + "\n"
+ + "VERSION_ALT: " + "\t\t\t\t\t" + VERSION_ALT + "\n"
+ "EXTENSION: " + "\t\t\t\t\t" + EXTENSION + "\n"
+ "RELEASE_MATRIX_PLATFORM_POS_FULL: " + "\t" + RELEASE_MATRIX_PLATFORM_POS_FULL + "\n"
+ "RELEASE_MATRIX_PLATFORM_POS_LP: " + "\t" + RELEASE_MATRIX_PLATFORM_POS_LP + "\n"
@@ -169,6 +171,7 @@ function fillSelOS() {
}
sel_os.selectedIndex = 0; // set the first option as default
+ // Fill the next drop-down box
fillSelLang();
return;
@@ -184,10 +187,10 @@ function fillSelLang() {
var option = "";
for( i = 0; i < SEL_LANG.length; i = i + 2 ) { // fill the <select> element until all languages are used
- opt = document.createElement('option');
- opt.value = SEL_LANG[i]; // assign the language ISO code
- opt.text = SEL_LANG[i + 1]; // assign the UI name like "English (Native) (ISO code)"
- sel_lang.appendChild(opt);
+ option = document.createElement( "option" );
+ option.value = SEL_LANG[ i ]; // assign the language ISO code
+ option.text = SEL_LANG[ i + 1 ]; // assign the UI name like "English (Native) (ISO code)"
+ sel_lang.appendChild( option );
}
sel_lang.selectedIndex = 0; // set the first option as default
@@ -195,13 +198,37 @@ function fillSelLang() {
alert( languages[0]["ast"] + " " + SEL_LANG.length );
for( i = 0; i < SEL_LANG.length; i = i + 2 ) { // fill the <select> element until all languages are used
- opt = document.createElement('option');
- opt.value = languages[i]; // assign the language ISO code
- opt.text = languages[i + 1] + " (" + languages[i + 2] + ")"; // assign the UI name like "English (Native)"
- sel_lang.appendChild(opt);
+ option = document.createElement( "option" );
+ option.value = languages[ i ]; // assign the language ISO code
+ option.text = languages[ i + 1 ] + " (" + languages[ i + 2 ] + ")"; // assign the UI name like "English (Native)"
+ sel_lang.appendChild( option );
}
sel_lang.selectedIndex = 0; // set the first option as default
*/
+
+ // Fill the next drop-down box
+// fillSelVer();
+
+ return;
+}
+
+/*
+ * Set values into the <select> element for version (drop-down-box)
+ * Depends on array-lists
+ */
+function fillSelVer() {
+ var sel_ver = document.getElementById( "ver" );
+ var i = 0;
+ var option = "";
+
+ for( i = 0; i < SEL_VER.length; i = i + 2 ) { // fill the <select> element until all versions are used
+ option = document.createElement( "option" );
+ option.value = SEL_VER[ i ]; // assign the version
+ option.text = SEL_VER[ i + 1 ]; // assign the UI version
+ sel_ver.appendChild( option );
+ }
+ sel_ver.selectedIndex = 0; // set the first option as default
+
return;
}
@@ -228,60 +255,7 @@ function getSelOS() {
break;
}
}
-/*
- switch ( os_value ) {
- case "win32":
- UI_PLATFORM = "Windows (EXE)";
- URL_PLATFORM = "Win_x86_install";
- EXTENSION = ".exe";
- break;
- case "lnx64d":
- UI_PLATFORM = "Linux Debian 64-bit (DEB)";
- URL_PLATFORM = "Linux_x86-64_install-deb";
- EXTENSION = ".tar.gz";
- break;
- case "lnx64r":
- UI_PLATFORM = "Linux 64-bit (RPM)";
- URL_PLATFORM = "Linux_x86-64_install-rpm";
- EXTENSION = ".tar.gz";
- break;
- case "lnx32d":
- UI_PLATFORM = "Linux Debian 32-bit (DEB)";
- URL_PLATFORM = "Linux_x86_install-deb";
- EXTENSION = ".tar.gz";
- break;
- case "lnx32r":
- UI_PLATFORM = "Linux 32-bit (RPM)";
- URL_PLATFORM = "Linux_x86_install-rpm";
- EXTENSION = ".tar.gz";
- break;
- case "mac64":
- UI_PLATFORM = "OS X 64-bit Intel (DMG)";
- URL_PLATFORM = "MacOS_x86-64_install";
- EXTENSION = ".dmg";
- break;
- case "mac32":
- UI_PLATFORM = "OS X 32-bit Intel (DMG)";
- URL_PLATFORM = "MacOS_x86_install";
- EXTENSION = ".dmg";
- break;
- default:
- UI_PLATFORM = "";
- URL_PLATFORM = "";
- EXTENSION = "";
- }
-*/
-/*
- alert ( ""
- + "i: " + i + "\n"
- + "SEL_OS.length: " + SEL_OS.length + "\n"
- + "os_value: " + os_value + "\n"
- + "SEL_OS[ i ]: " + SEL_OS[ i ] + "\n"
- + "UI_PLATFORM: " + UI_PLATFORM + "\n"
- + "URL_PLATFORM: " + URL_PLATFORM + "\n"
- + "EXTENSION: " + EXTENSION + "\n"
- + "" );
-*/
+
return;
}
@@ -303,56 +277,29 @@ function getSelLang() {
break;
}
}
+
+ return;
+}
+
/*
- switch ( lang_value ) {
- case "ast": LANG_ISO = "ast"; break;
- case "bg": LANG_ISO = "bg"; break;
- case "cs": LANG_ISO = "cs"; break;
- case "da": LANG_ISO = "da"; break;
- case "de": LANG_ISO = "de"; break;
- case "el": LANG_ISO = "el"; break;
- case "en-GB": LANG_ISO = "en-GB"; break;
- case "en-US": LANG_ISO = "en-US"; break;
- case "es": LANG_ISO = "es"; break;
- case "eu": LANG_ISO = "eu"; break;
- case "fi": LANG_ISO = "fi"; break;
- case "fr": LANG_ISO = "fr"; break;
- case "gd": LANG_ISO = "gd"; break;
- case "hi": LANG_ISO = "hi"; break;
- case "hu": LANG_ISO = "hu"; break;
- case "it": LANG_ISO = "it"; break;
- case "ja": LANG_ISO = "ja"; break;
- case "km": LANG_ISO = "km"; break;
- case "ko": LANG_ISO = "ko"; break;
- case "lt": LANG_ISO = "lt"; break;
- case "nb": LANG_ISO = "nb"; break;
- case "nl": LANG_ISO = "nl"; break;
- case "pl": LANG_ISO = "pl"; break;
- case "pt-BR": LANG_ISO = "pt-BR"; break;
- case "pt-PT": LANG_ISO = "pt-PT"; break;
- case "ru": LANG_ISO = "ru"; break;
- case "sk": LANG_ISO = "sk"; break;
- case "sl": LANG_ISO = "sl"; break;
- case "sr": LANG_ISO = "sr"; break;
- case "sv": LANG_ISO = "sv"; break;
- case "ta": LANG_ISO = "ta"; break;
- case "th": LANG_ISO = "th"; break;
- case "tr": LANG_ISO = "tr"; break;
- case "vi": LANG_ISO = "vi"; break;
- case "zh-CN": LANG_ISO = "zh-CN"; break;
- case "zh-TW": LANG_ISO = "zh-TW"; break;
- default: LANG_ISO = "";
+ * Get values from the <select> element for version (drop-down-box)
+ * Depends on chosen version
+ */
+function getSelVer() {
+ var ver_value = document.download.ver.options[document.download.ver.selectedIndex].value;
+ var i = 0;
+
+ if ( ver_value == "e1" || ver_value == "e2" ) {
+ VERSION_ALT = "";
+ return;
}
-*/
-/*
- alert ( ""
- + "i: " + i + "\n"
- + "SEL_LANG.length: " + SEL_LANG.length + "\n"
- + "lang_value: " + lang_value + "\n"
- + "SEL_LANG[ i ]: " + SEL_LANG[ i ] + "\n"
- + "LANG_ISO: " + LANG_ISO + "\n"
- + "" );
-*/
+ for( i = 0; i < SEL_VER.length; i = i + 2 ) {
+ if ( SEL_VER[ i ] == ver_value ) {
+ VERSION_ALT = ver_value;
+ break;
+ }
+ }
+
return;
}
@@ -377,13 +324,7 @@ function getSelType() {
default:
TYPE = "";
}
-/*
- alert ( ""
- + "type_value: " + lang_value + "\n"
- + "URL_PLATFORM: " + URL_PLATFORM + "\n"
-// + "TYPE: " + TYPE + "\n"
- + "" );
-*/
+
return;
}
@@ -398,9 +339,7 @@ function resetSel() {
}
document.getElementById( "dl_full_link" ).href = "#";
-// document.getElementById( "dl_full_link" ).text = "Choose an OS, then the language";
document.getElementById( "dl_full_link" ).text = "";
-// document.getElementById( "dl_full_link" ).title = "Choose an OS, then the language";
document.getElementById( "dl_full_link" ).title = "";
document.getElementById( "dl_lp_link" ).href = "";
document.getElementById( "dl_lp_link" ).text = "";
@@ -717,9 +656,15 @@ function getLinkAlt( rel_mode ) {
getSelOS();
getSelLang();
+// getSelVer();
+
+ alertDbg( "getLinkAlt()" );
if ( URL_PLATFORM == "" || LANG_ISO == "" ) {
// When OS or language was not chosen, let the user choose again.
+
+// if ( URL_PLATFORM == "" || LANG_ISO == "" || VERSION_ALT == "" ) {
+ // When OS, language or version was not chosen, let the user choose again.
/*
resetSel();
document.getElementById( "dl_full_link" ).href = "#";
@@ -738,8 +683,6 @@ function getLinkAlt( rel_mode ) {
if ( LANG_ISO != "" && RELEASE_MATRIX_PLATFORM_POS_FULL > 0 ) {
// If platform was recognized, assemble the filenames for download and checksums.
- alertDbg( "getLinkAlt()" );
-
// Assign the file name (column 3) from the release matrix of language and platform.
FILENAME_FULL = release_matrix[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS_FULL ][ 3 ];
FILENAME_LP = release_matrix[ LANG_ISO ][ RELEASE_MATRIX_PLATFORM_POS_LP ][ 3 ];
@@ -822,8 +765,6 @@ function getLinkAlt( rel_mode ) {
*/
}
- alertDbg( "getLinkAlt()" );
-
return;
}