You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2014/06/05 01:11:36 UTC
svn commit: r1600536 -
/openoffice/ooo-site/trunk/content/download/test/download_droplist.js
Author: marcus
Date: Wed Jun 4 23:11:35 2014
New Revision: 1600536
URL: http://svn.apache.org/r1600536
Log:
Updated variables, added new function 'resetVars()' to empty global variables in order to avoid any mixed data and confusion
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=1600536&r1=1600535&r2=1600536&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download_droplist.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Wed Jun 4 23:11:35 2014
@@ -81,26 +81,33 @@ function initVars() {
R_MODE = ""; // The release mode (1 = stable release (default), 2 = beta release, etc.).
LANG_ISO = ""; // The language as ISO code.
// LANG_ARRAY = ""; // This array contains all language specific data.
+ LANG_SEL = ""; // The selected language as ISO code from select box.
UI_PLATFORM = ""; // The platform as readable string.
UI_PLATFORM_NO_SUP = ""; // The platform as readable string, if not supported.
PLATFORM = ""; // The platform in short form.
PLATFORM_FULL = ""; // The platform as part of the download URL (full install).
PLATFORM_LP = ""; // The platform as part of the download URL (langpack).
+ PLATFORM_SEL = ""; // The selected platform from select box.
OLD_PLATFORM = false; // Is the browser platform old (true) or not (false)?
RELEASE_PLATFORM_POS_FULL = -1; // The position of the platform in the release matrix array (full install).
RELEASE_PLATFORM_POS_LP = -1; // The position of the platform in the release matrix array (langpack).
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 select box.
- PLATFORM_SEL = ""; // The selected platform from select box.
+ REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date).
VERSION_SEL = ""; // The selected version from select box.
FILENAME_FULL = ""; // The complete filename of the download URL (full install).
FILENAME_LP = ""; // The complete filename of the download URL (langpack).
FILESIZE_FULL = -1; // The filesize of the download file (full install).
FILESIZE_LP = -1; // The filesize of the download file (langpack).
EXTENSION = ""; // The file extension of the download URL.
- REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date).
// TYPE = ""; // The installation type.
+ SOURCEFORGE_BASE_URL = ""; // The base URL for all binary files on Sourceforge.
+ SOURCEFORGE_PREV_URL = ""; // The base URL for all binary files (prev. version) on Sourceforge.
+ ASF_BASE_URL = ""; // The base URL for all binary files on Apache.
+// ASF_DIST_BASE_URL = ""; // The base URL for all checksum files on Apache.
+// ASF_DIST_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache.
+ ASF_ARC_BASE_URL = ""; // The base URL for all checksum files on Apache.
+ ASF_ARC_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache.
// LINK = ""; // The complete download URL.
LINK_FULL = ""; // The complete download URL (full install).
LINK_LP = ""; // The complete download URL (langpack).
@@ -111,13 +118,6 @@ function initVars() {
LINK_CHK_ASC_LP = ""; // The ASC file as download URL (langpack).
LINK_CHK_MD5_LP = ""; // The MD5 file as download URL (langpack).
LINK_CHK_SHA256_LP = ""; // The SHA256 file as download URL (langpack).
- SOURCEFORGE_BASE_URL = ""; // The base URL for all binary files on Sourceforge.
- SOURCEFORGE_PREV_URL = ""; // The base URL for all binary files (prev. version) on Sourceforge.
- ASF_BASE_URL = ""; // The base URL for all binary files on Apache.
-// ASF_DIST_BASE_URL = ""; // The base URL for all checksum files on Apache.
-// ASF_DIST_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache.
- ASF_ARC_BASE_URL = ""; // The base URL for all checksum files on Apache.
- ASF_ARC_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache.
SF = false; // Does the download URL points to Soureforge?
OTHER = false; // Does the download URL points to 'other.html'?
ARCHIVE = false; // Does the download URL points to the ASF archive?
@@ -775,6 +775,45 @@ function getTypeSel() {
}
/*
+ * Reset global variables
+ */
+function resetVars() {
+ // Empty global variables to avoid any mixed data and confusion.
+ UI_PLATFORM = "";
+ PLATFORM = "";
+ PLATFORM_FULL = "";
+ PLATFORM_LP = "";
+ RELEASE_PLATFORM_POS_FULL = -1;
+ RELEASE_PLATFORM_POS_LP = -1;
+ RELEASE_PLATFORM = "";
+ RELEASE_LANG = "";
+ FILENAME_FULL = "";
+ FILENAME_LP = "";
+ FILESIZE_FULL = -1;
+ FILESIZE_LP = -1;
+ EXTENSION = "";
+ REL_TEXT = "";
+ LINK_FULL = "";
+ LINK_LP = "";
+ LINK_CHK_KEYS = "";
+ LINK_CHK_ASC_FULL = "";
+ LINK_CHK_MD5_FULL = "";
+ LINK_CHK_SHA256_FULL = "";
+ LINK_CHK_ASC_LP = "";
+ LINK_CHK_MD5_LP = "";
+ LINK_CHK_SHA256_LP = "";
+ SOURCEFORGE_BASE_URL = "";
+ SOURCEFORGE_PREV_URL = "";
+ ASF_BASE_URL = "";
+ ASF_ARC_BASE_URL = "";
+ ASF_ARC_PREV_URL = "";
+ SF = false;
+ OTHER = false;
+ ARCHIVE = false;
+ ERROR = true;
+}
+
+/*
* Set CSS style for all elements with ID to make them invisible
*/
function resetElements() {
@@ -940,11 +979,13 @@ function showErrorMessage( error_text )
document.getElementById( "dl_f_link" ).style.display = "inline";
document.getElementById( "dl_f_link" ).style.cursor = "not-allowed";
document.getElementById( "dl_f_link" ).href = "javascript:void( 0 )";
+ document.getElementById( "dl_f_link" ).target = "";
document.getElementById( "dl_f_link" ).innerHTML = "No full installation available";
document.getElementById( "dl_f_link" ).title = "Please select another language, platform or version.";
document.getElementById( "dl_lp_link" ).style.display = "inline";
document.getElementById( "dl_lp_link" ).style.cursor = "not-allowed";
document.getElementById( "dl_lp_link" ).href = "javascript:void( 0 )";
+ document.getElementById( "dl_lp_link" ).target = "";
document.getElementById( "dl_lp_link" ).innerHTML = "No language pack available";
document.getElementById( "dl_lp_link" ).title = "Please select another language, platform or version.";
@@ -963,9 +1004,7 @@ function showErrorMessage( error_text )
// Delete previously set string to get the possibility back to choose a different platform
// and then to assemble a new download link.
UI_PLATFORM_NO_SUP = "";
-
- // Set some error flags.
- ERROR = true;
+ ERROR = true;
return ERROR;
}
@@ -1158,12 +1197,13 @@ function getLink( rel_mode ) {
*/
function getLinkSel() {
// Reset all error flags.
- SF = false;
- OTHER = false;
- ARCHIVE = false;
- ERROR = true;
- // Reset all variables that could have been set util now.
-// emptyVars();
+// SF = false;
+// OTHER = false;
+// ARCHIVE = false;
+// ERROR = true;
+
+ // Reset all variables that could have been set until now.
+ resetVars();
// If no mode was given, assume it is the release mode (stable release).
if( R_MODE === undefined )
@@ -1238,6 +1278,7 @@ function getLinkSel() {
// Set the values for only one download text button.
document.getElementById( "dl_f_link" ).href = LINK_FULL;
+ document.getElementById( "dl_f_link" ).target = "_blank";
document.getElementById( "dl_f_link" ).innerHTML = "Porting: Click to choose from 3rd party vendors";
document.getElementById( "dl_f_link" ).title = "Click to browse to the porting webpage and download from 3rd party vendors";
document.getElementById( "dl_f_link" ).style.display = "inline";
@@ -1260,6 +1301,7 @@ function getLinkSel() {
// Set the values for only one download text button.
document.getElementById( "dl_f_link" ).href = LINK_FULL;
+ document.getElementById( "dl_f_link" ).target = "_blank";
document.getElementById( "dl_f_link" ).innerHTML = "Archive: Click to choose from legacy releases";
document.getElementById( "dl_f_link" ).title = "Click to browse to the archive and download legacy releases";
document.getElementById( "dl_f_link" ).style.display = "inline";
@@ -1872,16 +1914,19 @@ function alertDbg( location ) {
+ "NL_LANG: " + "\t\t\t\t\t\t\t" + NL_LANG + "\n"
+ "LANG_ISO: " + "\t\t\t\t\t\t" + LANG_ISO + "\n"
// + "LANG_ARRAY: " + "\t\t\t\t\t\t" + LANG_ARRAY + "\n"
- + "RELEASE_PLATFORM_POS_FULL: " + "\t\t\t" + RELEASE_PLATFORM_POS_FULL + "\n"
- + "RELEASE_PLATFORM_POS_LP: " + "\t\t\t" + RELEASE_PLATFORM_POS_LP + "\n"
- + "RELEASE_PLATFORM: " + "\t\t\t\t\t" + RELEASE_PLATFORM + "\n"
- + "RELEASE_LANG: " + "\t\t\t\t\t\t" + RELEASE_LANG + "\n"
+ + "LANG_SEL: " + "\t\t\t\t\t\t" + LANG_SEL + "\n"
+ "UI_PLATFORM: " + "\t\t\t\t\t\t" + UI_PLATFORM + "\n"
+ "UI_PLATFORM_NO_SUP: " + "\t\t\t\t" + UI_PLATFORM_NO_SUP + "\n"
+ "PLATFORM: " + "\t\t\t\t\t\t" + PLATFORM + "\n"
- + "OLD_PLATFORM: " + "\t\t\t\t\t" + OLD_PLATFORM + "\n"
- + "LANG_SEL: " + "\t\t\t\t\t\t" + LANG_SEL + "\n"
+ + "PLATFORM_FULL: " + "\t\t\t\t\t" + PLATFORM_FULL + "\n"
+ + "PLATFORM_LP: " + "\t\t\t\t\t\t" + PLATFORM_LP + "\n"
+ "PLATFORM_SEL: " + "\t\t\t\t\t\t" + PLATFORM_SEL + "\n"
+ + "OLD_PLATFORM: " + "\t\t\t\t\t" + OLD_PLATFORM + "\n"
+ + "RELEASE_PLATFORM_POS_FULL: " + "\t\t\t" + RELEASE_PLATFORM_POS_FULL + "\n"
+ + "RELEASE_PLATFORM_POS_LP: " + "\t\t\t" + RELEASE_PLATFORM_POS_LP + "\n"
+ + "RELEASE_PLATFORM: " + "\t\t\t\t\t" + RELEASE_PLATFORM + "\n"
+ + "RELEASE_LANG: " + "\t\t\t\t\t\t" + RELEASE_LANG + "\n"
+ + "REL_TEXT: " + "\t\t\t\t\t\t\t" + REL_TEXT + "\n"
+ "VERSION_SEL: " + "\t\t\t\t\t\t" + VERSION_SEL + "\n"
+ "FILENAME_FULL: " + "\t\t\t\t\t" + FILENAME_FULL + "\n"
+ "FILENAME_LP: " + "\t\t\t\t\t\t" + FILENAME_LP + "\n"
@@ -1890,6 +1935,7 @@ function alertDbg( location ) {
+ "EXTENSION: " + "\t\t\t\t\t\t" + EXTENSION + "\n"
// + "TYPE: " + "\t\t\t\t\t\t" + TYPE + "\n"
+ "SOURCEFORGE_BASE_URL: " + "\t\t\t" + SOURCEFORGE_BASE_URL + "\n"
+ + "ASF_BASE_URL: " + "\t\t\t\t\t" + ASF_BASE_URL + "\n"
// + "ASF_DIST_BASE_URL: " + "\t\t\t\t" + ASF_DIST_BASE_URL + "\n"
+ "ASF_ARC_BASE_URL: " + "\t\t\t\t\t" + ASF_ARC_BASE_URL + "\n"
// + "LINK: " + "\t\t\t\t\t\t" + LINK + "\n"