Author: buildbot
Date: Thu Jun 12 19:55:16 2014
New Revision: 912376
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.js
Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 12 19:55:16 2014
@@ -1 +1 @@
-1602038
+1602278
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 12 19:55:16 2014
@@ -1 +1 @@
-1602038
+1602278
Modified: websites/staging/ooo-site/trunk/content/download/test/download.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download.js (original)
+++ websites/staging/ooo-site/trunk/content/download/test/download.js Thu Jun
12 19:55:16 2014
@@ -17,7 +17,7 @@
* function showWindow ( target_url )
* function showErrorMessage ( error_text )
* function isLangSupported ()
- * function getLink ( rel_mode )
+ * function checkLinkExceptions ()
* function getLinkSel ()
* function getPlatform ()
* function getReleaseMatrixPos ()
@@ -527,28 +527,17 @@ function isLangSupported() {
ERROR = false;
return true;
} else {
- NOT_AVAILABLE = RELEASE_LANG[ 1 ] + " is not available";
+ NOT_AVAILABLE = RELEASE_LANG[ 1 ] + " (" + RELEASE_LANG[ 2 ] +
") (" + LANG_SEL + ") is not available";
ERROR = true;
return false;
}
}
/*
- * Get link to mirror system for download file and checksum file
- * Depends on chosen OS, language and type
+ * Check links that should be assembled in getLinkSel() for expections that do
not lead to real download links
+ * Depends on chosen OS, language and version
*/
-function getLinkSel() {
- // Reset all variables that could have been set until now.
- initVars( 0 );
-
- // If no mode was given, assume it is the release mode (stable release).
- if( R_MODE === undefined )
- R_MODE = 1;
-
- // Get the selected data from the select boxes.
- getOSSel();
- getLangSel();
- getVerSel();
+function checkLinkExceptions() {
// If recognized platform is not Windows, Linux or Mac, show the
none-availability to the user.
if( UI_PLATFORM_NO_SUP !== "" ) {
@@ -559,7 +548,7 @@ function getLinkSel() {
+ l10n_download_error_please_select_3_text;
showErrorMessage( error_text );
- return false;
+ ERROR = true;
}
// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6',
show the none-availability to the user.
@@ -571,7 +560,7 @@ function getLinkSel() {
+ l10n_download_error_please_select_1_text;
showErrorMessage( error_text );
- return false;
+ ERROR = true;
}
// If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7',
show the none-availability to the user.
@@ -583,7 +572,7 @@ function getLinkSel() {
+ l10n_download_error_please_select_2_text;
showErrorMessage( error_text );
- return false;
+ ERROR = true;
}
// If platform is 'other', create a download link that leads to the
Porting webpage.
@@ -603,7 +592,6 @@ function getLinkSel() {
OTHER = true;
ERROR = false;
- return LINK_FULL;
}
// If version is 'older', create a download link that leads to the
archive webpage.
@@ -623,24 +611,10 @@ function getLinkSel() {
ARCHIVE = true;
ERROR = false;
- return LINK_FULL;
}
// If language is not supported, show the none-availability to the user.
if( ! isLangSupported() ) {
- if( R_MODE === 1 ) {
- // Release mode.
- // Provide the link from the Native Language (NL) group.
- LINK_FULL = "http://www.openoffice.org/" +
RELEASE_LANG[ 4 ];
- LINK_LP = LINK_LP;
- FILESIZE_FULL = 0;
- FILESIZE_LP = 0;
- } else {
- // Beta release mode.
- // Provide the "all_beta.html" as download link.
- LINK_FULL =
"http://www.openoffice.org/download/all_beta.html";
- LINK_LP = LINK_LP;
- }
// Show an error message that the chosen items do not lead to a
download.
error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+ l10n_download_error_aoo_text + VERSION_SEL
+ l10n_download_error_not_available_for_text +
"<b>" + RELEASE_LANG[ 1 ] + " ("
@@ -649,10 +623,40 @@ function getLinkSel() {
+ l10n_download_error_please_select_4_text;
showErrorMessage( error_text );
- return false;
+ ERROR = true;
} else {
- // If language is supported, assemble the filenames and text
for download and checksums.
+ // If language is supported, assemble the filenames and text
for download and checksums.
+ // Go on in "getLinkSel().
+
+ ERROR = false;
+ }
+
+ return ERROR;
+}
+
+/*
+ * Get link to mirror system for download file and checksum file
+ * Depends on chosen OS, language and version
+ */
+function getLinkSel() {
+ // Reset all variables that could have been set until now.
+ initVars( 0 );
+
+ // If no mode was given, assume it is the release mode (stable release).
+ if( R_MODE === undefined )
+ R_MODE = 1;
+
+ // Get the selected data from the select boxes.
+ getOSSel();
+ getLangSel();
+ getVerSel();
+
+ // First check for expections that do not lead to real download links.
+ checkLinkExceptions();
+ // No exceptions so far when download link does not lead to SF and
OTHER and ARCHIVE.
+ if( ! SF && ! OTHER && ! ARCHIVE ) {
+ // Assemble the filenames and text for download and checksums.
getReleaseMatrixPos();
getFileData( VERSION_SEL );