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/04 23:59:27 UTC
svn commit: r1600519 -
/openoffice/ooo-site/trunk/content/download/test/download_droplist.js
Author: marcus
Date: Wed Jun 4 21:59:27 2014
New Revision: 1600519
URL: http://svn.apache.org/r1600519
Log:
Updated variables and return values
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=1600519&r1=1600518&r2=1600519&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 21:59:27 2014
@@ -87,8 +87,8 @@ function initVars() {
PLATFORM_FULL = ""; // The platform as part of the download URL (full install).
PLATFORM_LP = ""; // The platform as part of the download URL (langpack).
OLD_PLATFORM = false; // Is the browser platform old (true) or not (false)?
- RELEASE_PLATFORM_POS_FULL = 0; // The position of the platform in the release matrix array (full install).
- RELEASE_PLATFORM_POS_LP = 0; // The position of the platform in the release matrix array (langpack).
+ 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.
@@ -96,8 +96,8 @@ function initVars() {
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 = 0; // The filesize of the download file (full install).
- FILESIZE_LP = 0; // The filesize of the download file (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.
@@ -1162,6 +1162,8 @@ function getLinkSel() {
OTHER = false;
ARCHIVE = false;
ERROR = true;
+ // Reset all variables that could have been set util now.
+// emptyVars();
// If no mode was given, assume it is the release mode (stable release).
if( R_MODE === undefined )
@@ -1198,9 +1200,8 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select a download for Windows, Linux or OS X.";
showErrorMessage( error_text );
- ERROR = true;
- return ERROR;
+ return false;
}
// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
@@ -1211,9 +1212,8 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select version 4.0.1.";
showErrorMessage( error_text );
- ERROR = true;
- return ERROR;
+ return false;
}
// If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7', show the none-availability to the user.
@@ -1224,9 +1224,8 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select version 4.1.0 or newer.";
showErrorMessage( error_text );
- ERROR = true;
- return ERROR;
+ return false;
}
// If platform is 'other', create a download link that leads to the Porting webpage.
@@ -1295,9 +1294,8 @@ function getLinkSel() {
+ "<br /><b>Solution:</b> Please select another language or version.";
showErrorMessage( error_text );
- ERROR = true;
- return LINK_FULL;
+ return false;
} else {
// If language is supported, assemble the filenames and text for download and checksums.
@@ -1538,7 +1536,7 @@ function getPlatform() {
// If $UI_PLATFORM_NO_SUP is already filled, something was recognized and no more work is needed.
if( UI_PLATFORM_NO_SUP !== "" ) {
ERROR = true;
- return PLATFORM;
+ return UI_PLATFORM_NO_SUP;
}
// Recognized and *supported* platforms/OS, set $UI_PLATFORM to show it to the user.
@@ -1832,8 +1830,8 @@ function getFilesize( ver ) {
FILESIZE_LP = release_400[ LANG_ISO ][ RELEASE_PLATFORM_POS_LP ][ 2 ];
break;
default:
- FILESIZE_FULL = 0;
- FILESIZE_LP = 0;
+ FILESIZE_FULL = -1;
+ FILESIZE_LP = -1;
ERROR = true;
}
/*