Author: marcus
Date: Tue Jun 3 18:56:02 2014
New Revision: 1599756
URL: http://svn.apache.org/r1599756
Log:
Inverted error flag, assume an error by default until the assembled download
link is valid
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=1599756&r1=1599755&r2=1599756&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download_droplist.js
(original)
+++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Tue
Jun 3 18:56:02 2014
@@ -121,7 +121,7 @@ function initVars() {
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?
- ERROR = false; // Is the download URL
in general correct (false) or not (true)?
+ ERROR = true; // Is the download URL
in general correct (false) or not (true)?
}
/*
@@ -967,9 +967,6 @@ function showErrorMessage( error_text )
UI_PLATFORM_NO_SUP = "";
// Set some error flags.
- SF = false;
- OTHER = false;
- ARCHIVE = false;
ERROR = true;
return ERROR;
@@ -1066,8 +1063,6 @@ function getLink( rel_mode ) {
LINK_CHK_MD5_FULL =
ASF_ARC_PREV_URL+"/binaries/"+LANG_ISO+"/"+FILENAME_FULL+".md5";
LINK_CHK_SHA256_FULL =
ASF_ARC_PREV_URL+"/binaries/"+LANG_ISO+"/"+FILENAME_FULL+".sha256";
- SF = false;
- OTHER = false;
ARCHIVE = true;
ERROR = true;
return LINK_FULL;
@@ -1078,9 +1073,7 @@ function getLink( rel_mode ) {
LINK_FULL =
"http://www.openoffice.org/porting/index.html";
- SF = false;
OTHER = true;
- ARCHIVE = false;
ERROR = true;
return LINK_FULL;
@@ -1094,9 +1087,7 @@ function getLink( rel_mode ) {
LINK_CHECKSUM_MD5_FULL =
"http://archive.apache.org/dist/openoffice/";
LINK_CHECKSUM_SHA256_FULL =
"http://archive.apache.org/dist/openoffice/";
- SF = false;
OTHER = true;
- ARCHIVE = false;
ERROR = true;
return LINK_FULL;
}
@@ -1110,9 +1101,7 @@ function getLink( rel_mode ) {
}
LINK_FULL =
"http://www.openoffice.org/download/other.html";
- SF = false;
OTHER = true;
- ARCHIVE = false;
ERROR = true;
return LINK_FULL;
@@ -1141,8 +1130,6 @@ function getLink( rel_mode ) {
LINK_CHECKSUM_SHA256_FULL = ASF_ARC_BASE_URL + "/binaries/" +
LANG_ISO + "/" + FILENAME_FULL + ".sha256";
SF = true;
- OTHER = false;
- ARCHIVE = false;
ERROR = false;
return LINK_FULL;
@@ -1158,9 +1145,7 @@ function getLink( rel_mode ) {
// Provide the "all_beta.html" as download link.
LINK_FULL =
"http://www.openoffice.org/download/all_beta.html";
}
- SF = false;
OTHER = true;
- ARCHIVE = false;
ERROR = true;
}
@@ -1178,7 +1163,7 @@ function getLinkSel() {
SF = false;
OTHER = false;
ARCHIVE = false;
- ERROR = false;
+ ERROR = true;
// If no mode was given, assume it is the release mode (stable release).
if( R_MODE === undefined )
@@ -1215,6 +1200,7 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select a download
for Windows, Linux or OS X.";
showErrorMessage( error_text );
+ ERROR = true;
return ERROR;
}
@@ -1227,6 +1213,7 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select version
4.0.1.";
showErrorMessage( error_text );
+ ERROR = true;
return ERROR;
}
@@ -1239,6 +1226,7 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select version
4.1.0 or newer.";
showErrorMessage( error_text );
+ ERROR = true;
return ERROR;
}
@@ -1259,6 +1247,9 @@ function getLinkSel() {
document.getElementById( "dl_lp_link" ).style.display =
"none";
document.getElementById( "sub_green_box" ).style.display =
"none";
+ OTHER = true;
+ ERROR = false;
+
return LINK_FULL;
}
@@ -1278,6 +1269,9 @@ function getLinkSel() {
document.getElementById( "dl_lp_link" ).style.display =
"none";
document.getElementById( "sub_green_box" ).style.display =
"none";
+ ARCHIVE = true;
+ ERROR = false;
+
return LINK_FULL;
}
@@ -1303,8 +1297,9 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select another
language or version.";
showErrorMessage( error_text );
+ ERROR = true;
- return ERROR;
+ return LINK_FULL;
} else {
// If language is supported, assemble the filenames and text
for download and checksums.
@@ -1340,8 +1335,6 @@ function getLinkSel() {
LINK_CHK_SHA256_LP = ASF_ARC_BASE_URL + "/binaries/" +
LANG_SEL + "/" + FILENAME_LP + ".sha256";
SF = true;
- OTHER = false;
- ARCHIVE = false;
ERROR = false;
// Set the values for both download text buttons.