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/05/31 12:21:45 UTC
svn commit: r910673 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/
content/download/test/download_droplist.js
Author: buildbot
Date: Sat May 31 10:21:45 2014
New Revision: 910673
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 Sat May 31 10:21:45 2014
@@ -1 +1 @@
-1598789
+1598848
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat May 31 10:21:45 2014
@@ -1 +1 @@
-1598789
+1598848
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 Sat May 31 10:21:45 2014
@@ -76,43 +76,43 @@ function initVars() {
"dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", "dl_lp_chk_sha256", "dl_hlp", "dl_chk", "dl_rpt" ];
// The following are used in "download.js". and "index.html".
- LANG_ISO = ""; // The language as ISO code
- LANG_ARRAY = ""; // This array contains all language specific data
- UI_PLATFORM = ""; // The platform as readable string
- UI_PLATFORM_NO_SUP = ""; // The platform as readable string, if not supported
- URL_PLATFORM = ""; // The platform as part of the download URL
+ LANG_ISO = ""; // The language as ISO code.
+ LANG_ARRAY = ""; // This array contains all language specific data.
+ UI_PLATFORM = ""; // The platform as readable string.
+ UI_PLATFORM_NO_SUP = ""; // The platform as readable string, if not supported.
+ URL_PLATFORM = ""; // The platform as part of the download URL.
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
- RELEASE_PLATFORM_POS_LP = 0; // The position of the platform in the release matrix array
- 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
- VERSION_SEL = ""; // The selected version from select 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)
- FILESIZE_LP = 0; // The filesize of the download file (for language pack)
- EXTENSION = ""; // The file extension of the download URL
- REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date)
-// TYPE = ""; // The installation type
-// LINK = ""; // The complete download URL
- LINK_FULL = ""; // The complete download URL (for full installation)
- LINK_LP = ""; // The complete download URL (for language pack)
- LINK_CHK_KEYS = ""; // The KEYS file as download URL
- LINK_CHK_ASC_FULL = ""; // The ASC file as download URL (for full installation)
- LINK_CHK_MD5_FULL = ""; // The MD5 file as download URL (for full installation)
- LINK_CHK_SHA256_FULL = ""; // The SHA256 file as download URL (for full installation)
- LINK_CHK_ASC_LP = ""; // The ASC file as download URL (for language pack)
- LINK_CHK_MD5_LP = ""; // The MD5 file as download URL (for language pack)
- LINK_CHK_SHA256_LP = ""; // The SHA256 file as download URL (for language pack)
- 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
+ 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 = ""; // 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.
+ 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).
+ EXTENSION = ""; // The file extension of the download URL.
+ REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date).
+// TYPE = ""; // The installation type.
+// LINK = ""; // The complete download URL.
+ LINK_FULL = ""; // The complete download URL (full install).
+ LINK_LP = ""; // The complete download URL (langpack).
+ LINK_CHK_KEYS = ""; // The KEYS file as download URL.
+ LINK_CHK_ASC_FULL = ""; // The ASC file as download URL (full install).
+ LINK_CHK_MD5_FULL = ""; // The MD5 file as download URL (full install).
+ LINK_CHK_SHA256_FULL = ""; // The SHA256 file as download URL (full install).
+ 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?
@@ -135,11 +135,11 @@ function getLanguage() {
+ "" );
*/
// If available, use the manual set ISO code (see "index.html") that overrides $LANG_ISO.
- if( NL_LANG != "" )
+ if( NL_LANG !== "" )
language = NL_LANG;
// Else if available, use the selected language from select box.
- else if( LANG_SEL != "" )
+ else if( LANG_SEL !== "" )
language = LANG_SEL;
// Else try to recognize the language from browser data.
@@ -152,23 +152,25 @@ function getLanguage() {
else if( navigator.systemLanguage )
language = navigator.systemLanguage;
- // Convert "en" to "en-US" as well as setting it as fall-back language
- if( !language || language == "" || language == "null" || language == "en" )
+ // Assign "en-US" as fall-back language if only "en" is set or nothing at all.
+ if( !language || language === "" || language == null || language === "en" )
language = "en-US";
- if( language == "pt" )
+ // Assign "pt-PT" if only "pt" is set.
+ if( language === "pt" )
language = "pt-PT";
- // Konqueror uses '_' where other browsers use '-'
- if( language.indexOf( "_" ) != -1 )
+ // Konqueror uses '_' where other browsers use '-'.
+ if( language.indexOf( "_" ) !== -1 )
+ // Change a contained '_' into a '-'.
language = language.split( "_" ).join( "-" );
- language = language.toLowerCase();
- var languageCode = language.split( "-" )[ 0 ];
- var regionCode = language.split( "-" )[ 1 ];
- var thisLanguageSet = languages[ languageCode ];
+ language = language.toLowerCase(); // Change the language into lower case.
+ var languageCode = language.split( "-" )[ 0 ]; // Part before "-" is the language code.
+ var regionCode = language.split( "-" )[ 1 ]; // Part behind "-" is the region code.
+ var thisLanguageSet = languages[ languageCode ]; // Assign the complete language data of the language code.
if( thisLanguageSet == null ) {
- // Language code not found inside array
+ // Assign "en-US" when the language code was not found inside array.
language = "en-US";
languageCode = "en";
regionCode = "us";
@@ -176,38 +178,40 @@ function getLanguage() {
}
if( regionCode != null ) {
- // Fix for Portuguese pt-PT downloads named only pt without region code!
- if( regionCode == "pt" && languageCode == "pt" )
+ // Fix for Portuguese (European) downloads as they are named only "pt" without region code!
+ if( languageCode === "pt" && regionCode === "pt" )
language = languageCode;
- // If an additional region code was found
+ // If an additional region code was found.
if( thisLanguageSet[ regionCode ] != null ) {
- // Choose langCode-regionCode
+ // Assign langCode-regionCode.
language = languageCode + "-" + regionCode.toUpperCase();
thisLanguage = thisLanguageSet[ regionCode ];
} else {
- // Choose the default langCode
+ // Choose the default languageCode.
var thisLanguage = thisLanguageSet[ "-" ];
- if( languageCode == "en" ) {
- // Special case, default is en-US for en-XX
+ if( languageCode === "en" ) {
+ // Special case: If language code is "en" then assign "en-US" for all "en-XX" cases.
language = "en-US";
regionCode = "us";
thisLanguageSet = languages[ languageCode ];
thisLanguage = thisLanguageSet[ regionCode ];
} else {
+ // Else assign the language code as language.
language = languageCode;
}
}
} else {
- // Choose the default for none given region code
+ // Choose the default for none given region code.
thisLanguage = thisLanguageSet[ "-" ];
}
LANG_ISO = language;
LANG_ARRAY = thisLanguage;
- var thisReleaseMatrixSet = release_410[ LANG_ISO ];
- RELEASE_LANG = thisReleaseMatrixSet[ 0 ];
+// var thisReleaseMatrixSet = release_410[ LANG_ISO ];
+// RELEASE_LANG = thisReleaseMatrixSet[ 0 ];
+// RELEASE_LANG = release_410[ LANG_ISO ][ 0 ];
/*
alert( ""
+ "getLanguage() : End" + "\n\n"
@@ -340,7 +344,7 @@ function setOSSel() {
for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
// If the platform was found, assign the found index to the select box.
// alert( "i: " + i / 2 + "\n" + "SEL_OS[ i ]: " + SEL_OS[ i ] );
- if( SEL_OS[ i ] == URL_PLATFORM ) {
+ if( SEL_OS[ i ] === URL_PLATFORM ) {
sel_os.selectedIndex = i / 3;
// alert( "Assigned: " + i / 3 );
break;
@@ -350,14 +354,14 @@ function setOSSel() {
// If no selected platform for was set in the select box because it was not recognized from browser data,
// assign "Windows" as default.
// alert( "sel_os.selectedIndex: " + sel_os.selectedIndex );
- if( sel_os.selectedIndex == 0 ) {
+ if( sel_os.selectedIndex === 0 ) {
// Default: Assign "Windows".
// alert( "SEL_OS.length: " + SEL_OS.length / 3 );
// for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
// If the platform was found, assign the found index to the select box.
// alert( "i: " + i / 2 + "\n" + "SEL_OS[ i ]: " + SEL_OS[ i ] );
- if( SEL_OS[ i ] == "Win_x86_install" ) {
+ if( SEL_OS[ i ] === "Win_x86_install" ) {
sel_os.selectedIndex = i / 3;
// alert( "Assigned: " + i / 3 );
break;
@@ -447,7 +451,7 @@ function setLangSel() {
for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
// If the language was found, assign the found index to the select box.
// alert( "i: " + i / 2 + "\n" + "SEL_LANG[ i ]: " + SEL_LANG[ i ] );
- if( SEL_LANG[ i ] == LANG_ISO ) {
+ if( SEL_LANG[ i ] === LANG_ISO ) {
sel_lang.selectedIndex = i / 2;
// alert( "Assigned: " + i / 2 );
break;
@@ -457,14 +461,14 @@ function setLangSel() {
// If no selected language was set in the select box because it was not recognized from browser data,
// assign "en-US" as default.
// alert( "sel_lang.selectedIndex: " + sel_lang.selectedIndex );
- if( sel_lang.selectedIndex == 0 ) {
+ if( sel_lang.selectedIndex === 0 ) {
// Default: Assign "en-US".
// alert( "SEL_LANG.length: " + SEL_LANG.length / 2 );
// for( var i = 0; i < SEL_LANG.length; i = i + 2 ) {
for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
// If the language was found, assign the found index to the select box.
// alert( "i: " + i / 2 + "\n" + "SEL_LANG[ i ]: " + SEL_LANG[ i ] );
- if( SEL_LANG[ i ] == "en-US" ) {
+ if( SEL_LANG[ i ] === "en-US" ) {
sel_lang.selectedIndex = i / 2;
// alert( "Assigned: " + i / 2 );
break;
@@ -528,7 +532,7 @@ function setVerSel() {
for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
// If the version was found, assign the found index to the select box.
// alert( "i: " + i / 2 );
- if( SEL_VER[ i ] == VERSION ) {
+ if( SEL_VER[ i ] === VERSION ) {
sel_ver.selectedIndex = i/2;
// alert( "Assigned: " + i / 2 );
break;
@@ -538,13 +542,13 @@ function setVerSel() {
// If no version was set as global variable,
// assign the most recent version as default.
// alert( "sel_lang.selectedIndex: " + sel_lang.selectedIndex );
- if( sel_ver.selectedIndex == 0 ) {
+ if( sel_ver.selectedIndex === 0 ) {
// Default: Assign "4.1.0".
// alert( "SEL_VER.length: " + SEL_VER.length / 2 );
for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
// If the version was found, assign the found index to the select box.
// alert( "i: " + i / 2 + "\n" + "SEL_VER[ i ]: " + SEL_VER[ i ] );
- if( SEL_VER[ i ] == "4.1.0" ) {
+ if( SEL_VER[ i ] === "4.1.0" ) {
sel_ver.selectedIndex = i / 2;
// alert( "Assigned: " + i / 2 );
break;
@@ -615,7 +619,7 @@ function getOSSel() {
// Search through the <select> element until the chosen OS is found.
// for( var i = 0; i < SEL_OS.length; i = i + 3 ) {
for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
- if( SEL_OS[ i ] == os_value ) {
+ if( SEL_OS[ i ] === os_value ) {
PLATFORM_SEL = SEL_OS[ i ];
UI_PLATFORM = SEL_OS[ i + 1 ];
EXTENSION = SEL_OS[ i + 2 ];
@@ -680,7 +684,7 @@ function getLangSel() {
// Search through the <select> element until the chosen language is found.
// for( var i = 0; i < SEL_LANG.length; i = i + 2 ) {
for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
- if( SEL_LANG[ i ] == lang_value ) {
+ if( SEL_LANG[ i ] === lang_value ) {
LANG_SEL = lang_value;
/*
alert( ""
@@ -731,7 +735,7 @@ function getVerSel() {
// Search through the <select> element until the chosen version is found.
// for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
- if( SEL_VER[ i ] == ver_value ) {
+ if( SEL_VER[ i ] === ver_value ) {
VERSION_SEL = ver_value;
break;
}
@@ -937,14 +941,15 @@ function showErrorMessage( error_text )
document.getElementById( "dl_lp_link" ).innerHTML = "No language pack available";
document.getElementById( "dl_lp_link" ).title = "Please select another language, platform or version.";
- document.getElementById( "sub_green_box" ).style.background = "#FECBCB"; // LightRed
- document.getElementById( "sub_green_box" ).style.borderTop = "1px solid #C00000"; // Darker red
- document.getElementById( "sub_green_box" ).style.borderBottom = "1px solid #C00000"; // Darker red
+ document.getElementById( "sub_green_box" ).style.background = "#FECBCB"; // LightRed
+ document.getElementById( "sub_green_box" ).style.borderTop = "1px solid #C00000"; // Darker red
+ document.getElementById( "sub_green_box" ).style.borderBottom = "1px solid #C00000"; // Darker red
document.getElementById( "dl_err" ).innerHTML = "<br />" + error_text;
+ document.getElementById( "dl_err" ).title = "The selected download file is not available";
document.getElementById( "dl_err" ).style.fontSize = "1.2em";
document.getElementById( "dl_err" ).style.cursor = "default";
- document.getElementById( "dl_err" ).style.display = "inline";
+ document.getElementById( "dl_err" ).style.display = "inline-block";
SF = false;
OTHER = false;
@@ -963,7 +968,7 @@ function isLangSupported() {
// Check the flag in "languages.js", 'y' -> provide download link, 'n' -> redirect to alternative webpage.
// Check the flag in "release_matrix.js", 'y' -> provide download link, 'n' -> redirect to alternative webpage.
- if( VERSION_SEL == undefined || VERSION_SEL == "" )
+ if( VERSION_SEL === undefined || VERSION_SEL === "" )
VERSION_SEL = VERSION;
switch( VERSION_SEL ) {
@@ -983,8 +988,8 @@ function isLangSupported() {
ERROR = true;
}
-// if( LANG_ARRAY[ 3 ] == 'y' ) {
- if( RELEASE_LANG[ 3 ] == 'y' ) {
+// if( LANG_ARRAY[ 3 ] === 'y' ) {
+ if( RELEASE_LANG[ 3 ] === 'y' ) {
return true;
} else {
NOT_AVAILABLE = RELEASE_LANG[ 1 ] + " is not available";
@@ -1002,7 +1007,7 @@ function getLink( rel_mode ) {
initVars();
// If no release mode was given, assume it is about the stable release.
- if( rel_mode == undefined || rel_mode == "" )
+ if( rel_mode === undefined || rel_mode === "" )
rel_mode = 1;
getLanguage();
@@ -1017,7 +1022,7 @@ function getLink( rel_mode ) {
// If platform is too old, provide a general download link to the archive.
if( OLD_PLATFORM ) {
// If platform is 'Mac OS X <= 10.6', provide a download link with previous AOO version.
- if( UI_PLATFORM == "Mac OS X (<= 10.6)" ) {
+ if( UI_PLATFORM === "Mac OS X (<= 10.6)" ) {
getReleaseMatrixPos()
// getFilesize( PREV_VERSION );
// getFilename( PREV_VERSION );
@@ -1052,8 +1057,8 @@ function getLink( rel_mode ) {
return LINK_FULL;
// If platform is Solaris, FreeBSD or OS/2, provide a download link to the porting webpage.
- } else if( UI_PLATFORM == "Solaris x86 (PKG)" || UI_PLATFORM == "Solaris SPARC (PKG)" ||
- UI_PLATFORM == "FreeBSD (PKG)" || UI_PLATFORM == "OS/2" ) {
+ } else if( UI_PLATFORM === "Solaris x86 (PKG)" || UI_PLATFORM === "Solaris SPARC (PKG)" ||
+ UI_PLATFORM === "FreeBSD (PKG)" || UI_PLATFORM === "OS/2" ) {
LINK_FULL = "http://www.openoffice.org/porting/index.html";
@@ -1080,11 +1085,10 @@ function getLink( rel_mode ) {
return LINK_FULL;
}
- // If language is supported but no platform was recognized, provide a general download link
- // to the "other.html" webpage.
- } else if( URL_PLATFORM == "" ) {
+ // If language is supported but no platform was recognized, provide a general download link to "other.html".
+ } else if( URL_PLATFORM === "" ) {
// If no UI string was set, show it to the user.
- if( UI_PLATFORM == "" ) {
+ if( UI_PLATFORM === "" ) {
UI_PLATFORM = "an unknown operating system / platform";
// UI_PLATFORM = l10n_download_unknown_platform;
}
@@ -1128,13 +1132,13 @@ function getLink( rel_mode ) {
return LINK_FULL;
} else {
// If language is not supported, provide an alternative download link.
- if( rel_mode == 1 ) {
- // Release mode
- // Provide the link from the Native Language (NL) group.
+ if( rel_mode === 1 ) {
+ // Release mode.
+ // Provide the link to the localized website.
// LINK_FULL = LANG_ARRAY[ 4 ];
LINK_FULL = "http://www.openoffice.org/" + RELEASE_LANG[ 3 ];
} else {
- // Beta release mode
+ // Beta release mode.
// Provide the "all_beta.html" as download link.
LINK_FULL = "http://www.openoffice.org/download/all_beta.html";
}
@@ -1161,10 +1165,10 @@ function getLinkSel( rel_mode ) {
ERROR = false;
// If no release mode was given, assume it is about the stable release.
- if( rel_mode == undefined )
+ if( rel_mode === undefined )
rel_mode = 1;
- // Get the selected data from the select boxex.
+ // Get the selected data from the select boxes.
getOSSel();
getLangSel();
getVerSel();
@@ -1188,7 +1192,7 @@ function getLinkSel( rel_mode ) {
}
*/
// If recognized platform is not Windows, Linux or Mac, show the none-availability to the user.
- if( UI_PLATFORM_NO_SUP != "false" ) {
+ if( UI_PLATFORM_NO_SUP !== "false" ) {
// Show an error message that the chosen items do not lead to a download.
error_text = "<b>Problem:</b> Apache OpenOffice " + VERSION_SEL + " is not available for <b>"
+ UI_PLATFORM_NO_SUP + "</b>."
@@ -1200,7 +1204,7 @@ function getLinkSel( rel_mode ) {
}
// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
- if( VERSION_SEL == "4.1.0" && URL_PLATFORM == "MacOS_x86_install" ) {
+ if( VERSION_SEL === "4.1.0" && URL_PLATFORM === "MacOS_x86_install" ) {
// Show an error message that the chosen items do not lead to a download.
error_text = "<b>Problem:</b> Apache OpenOffice " + VERSION_SEL + " is not available for <b>"
+ UI_PLATFORM + "</b>."
@@ -1212,7 +1216,7 @@ function getLinkSel( rel_mode ) {
}
// If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7', show the none-availability to the user.
- if( ( VERSION_SEL == "4.0.1" || VERSION_SEL == "4.0.0" ) && URL_PLATFORM == "MacOS_x86-64_install" ) {
+ if( ( VERSION_SEL === "4.0.1" || VERSION_SEL === "4.0.0" ) && URL_PLATFORM === "MacOS_x86-64_install" ) {
// Set the values for all elements that should not be empty.
error_text = "<b>Problem:</b> Apache OpenOffice " + VERSION_SEL + " is not available for <b>"
+ UI_PLATFORM + "</b>."
@@ -1225,8 +1229,8 @@ function getLinkSel( rel_mode ) {
// If language is not supported, show the none-availability to the user.
if( ! isLangSupported() ) {
- if( rel_mode == 1 ) {
- // Release mode
+ if( rel_mode === 1 ) {
+ // Release mode.
// Provide the link from the Native Language (NL) group.
// LINK_FULL = LANG_ARRAY[ 4 ];
LINK_FULL = "http://www.openoffice.org/" + RELEASE_LANG[ 3 ];
@@ -1234,7 +1238,7 @@ function getLinkSel( rel_mode ) {
FILESIZE_FULL = 0;
FILESIZE_LP = 0;
} else {
- // Beta release mode
+ // 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;
@@ -1350,9 +1354,9 @@ function getLinkSel( rel_mode ) {
document.getElementById( "dl_rpt" ).title = "Broken download link? Click here to report.";
// Reset the CSS styles for the elements in the sub-green colored boxes.
- document.getElementById( "sub_green_box" ).style.background = "#E9FEBE"; // LightGreen
- document.getElementById( "sub_green_box" ).style.borderTop = "1px solid #C3E480"; // Darker green
- document.getElementById( "sub_green_box" ).style.borderBottom = "1px solid #C3E480"; // Darker green
+ document.getElementById( "sub_green_box" ).style.background = "#E9FEBE"; // LightGreen
+ document.getElementById( "sub_green_box" ).style.borderTop = "1px solid #C3E480"; // Darker green
+ document.getElementById( "sub_green_box" ).style.borderBottom = "1px solid #C3E480"; // Darker green
document.getElementById( "sub_green_box" ).style.fontSize = "0.8em";
document.getElementById( "dl_err" ).style.display = "none";
@@ -1390,18 +1394,18 @@ function getLinkSel( rel_mode ) {
function getPlatform() {
// For more help or data see: "http://www.useragentstring.com".
- var os = navigator.platform.toLowerCase(); // Get the platform string in lower cases.
- var ua = navigator.userAgent.toLowerCase(); // Get the User Agent string in lower cases.
- var av = navigator.appVersion.toLowerCase(); // Get the application version in lower cases.
- UI_PLATFORM = ""; // Delete previously set string.
- UI_PLATFORM_NO_SUP = "false"; // Delete previously set string.
- URL_PLATFORM = ""; // Delete previously set string.
- EXTENSION = ""; // Delete previously set string.
+ var os = navigator.platform.toLowerCase(); // Get the platform string in lower cases.
+ var ua = navigator.userAgent.toLowerCase(); // Get the User Agent string in lower cases.
+ var av = navigator.appVersion.toLowerCase(); // Get the application version in lower cases.
+ UI_PLATFORM = ""; // Delete previously set string.
+ UI_PLATFORM_NO_SUP = "false"; // Delete previously set string.
+ URL_PLATFORM = ""; // Delete previously set string.
+ EXTENSION = ""; // Delete previously set string.
// Add ECMA262-5 Array methods if not supported natively.
// To workaround that MSIE 8 and older do not support this function.
if( !( 'indexOf' in Array.prototype ) ) {
- Array.prototype.indexOf= function( find, i ) { // 'i' is an optional parameter.
+ Array.prototype.indexOf= function( find, i ) { // 'i' is an optional parameter.
if( i === undefined )
i = 0;
if( i < 0 )
@@ -1418,106 +1422,106 @@ function getPlatform() {
if( os ) {
// Recognized but not supported platforms/OS, set $UI_PLATFORM_NO_SUP to show it to the user.
- if( os.indexOf( "aix" ) != -1 ) UI_PLATFORM_NO_SUP = "IBM AIX";
- if( os.indexOf( "alphaserver" ) != -1 ) UI_PLATFORM_NO_SUP = "AlphaServer";
- if( os.indexOf( "amiga" ) != -1 ) UI_PLATFORM_NO_SUP = "AmigaOS";
- if( ua.indexOf( "android" ) != -1 ||
- av.indexOf( "android" ) != -1 ) UI_PLATFORM_NO_SUP = "Android mobile devices";
- if( os.indexOf( "arm" ) != -1 ) UI_PLATFORM_NO_SUP = "ARM mobile devices";
- if( ua.indexOf( "blackberry" ) != -1 ) UI_PLATFORM_NO_SUP = "Blackberry smartphones";
- if( ua.indexOf( "brew" ) != -1 ) UI_PLATFORM_NO_SUP = "smartphones (BREW)";
- if( os.indexOf( "win" ) != -1 ||
- os.indexOf( "windows" ) != -1 )
- if( ua.indexOf( "mobile" ) != -1 ||
- ua.indexOf( "phone" ) != -1 ) UI_PLATFORM_NO_SUP = "smartphones (Windows Phone)";
- if( ua.indexOf( "ce.net" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Windows CE)";
- if( os.indexOf( "darwin" ) != -1 ) UI_PLATFORM_NO_SUP = "Darwin";
- if( os.indexOf( "dragonfly" ) != -1 ) UI_PLATFORM_NO_SUP = "DragonFly BSD";
- if( os.indexOf( "freebsd" ) != -1 ) UI_PLATFORM_NO_SUP = "FreeBSD (PKG)";
- if( ua.indexOf( "hiptop" ) != -1 ) UI_PLATFORM_NO_SUP = "smartphones (Hiptop)";
- if( ua.indexOf( "ipad" ) != -1 ||
- ua.indexOf( "iphone" ) != -1 ||
- ua.indexOf( "ipod" ) != -1 ) UI_PLATFORM_NO_SUP = "Apple iPhone/iPad/iPod";
- if( os.indexOf( "irix" ) != -1 ) UI_PLATFORM_NO_SUP = "IRIX";
- if( ua.indexOf( "kindle" ) != -1 ) UI_PLATFORM_NO_SUP = "Amazon Kindle";
- if( os.indexOf( "netbsd" ) != -1 ) UI_PLATFORM_NO_SUP = "NetBSD";
- if( ua.indexOf( "nintendo" ) != -1 ) UI_PLATFORM_NO_SUP = "Nintendo game console";
- if( ua.indexOf( "nokia" ) != -1 ) UI_PLATFORM_NO_SUP = "Nokia mobile devices";
- if( os.indexOf( "openbsd" ) != -1 ) UI_PLATFORM_NO_SUP = "OpenBSD";
- if( os.indexOf( "os/2" ) != -1 ) UI_PLATFORM_NO_SUP = "OS/2";
- if( ua.indexOf( "palm" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Palm OS)";
- if( os.indexOf( "pcbsd" ) != -1 ) UI_PLATFORM_NO_SUP = "PC-BSD";
- if( ua.indexOf( "pike" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Pike)";
- if( ua.indexOf( "playstation" ) != -1 ) UI_PLATFORM_NO_SUP = "Sony Playstation";
- if( ua.indexOf( "power_pc" ) != -1 ||
- ua.indexOf( "ppc" ) != -1 ) { UI_PLATFORM_NO_SUP = "Mac OS PPC (DMG)";
+ if( os.indexOf( "aix" ) !== -1 ) UI_PLATFORM_NO_SUP = "IBM AIX";
+ if( os.indexOf( "alphaserver" ) !== -1 ) UI_PLATFORM_NO_SUP = "AlphaServer";
+ if( os.indexOf( "amiga" ) !== -1 ) UI_PLATFORM_NO_SUP = "AmigaOS";
+ if( ua.indexOf( "android" ) !== -1 ||
+ av.indexOf( "android" ) !== -1 ) UI_PLATFORM_NO_SUP = "Android mobile devices";
+ if( os.indexOf( "arm" ) !== -1 ) UI_PLATFORM_NO_SUP = "ARM mobile devices";
+ if( ua.indexOf( "blackberry" ) !== -1 ) UI_PLATFORM_NO_SUP = "Blackberry smartphones";
+ if( ua.indexOf( "brew" ) !== -1 ) UI_PLATFORM_NO_SUP = "smartphones (BREW)";
+ if( os.indexOf( "win" ) !== -1 ||
+ os.indexOf( "windows" ) !== -1 )
+ if( ua.indexOf( "mobile" ) !== -1 ||
+ ua.indexOf( "phone" ) !== -1 ) UI_PLATFORM_NO_SUP = "smartphones (Windows Phone)";
+ if( ua.indexOf( "ce.net" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Windows CE)";
+ if( os.indexOf( "darwin" ) !== -1 ) UI_PLATFORM_NO_SUP = "Darwin";
+ if( os.indexOf( "dragonfly" ) !== -1 ) UI_PLATFORM_NO_SUP = "DragonFly BSD";
+ if( os.indexOf( "freebsd" ) !== -1 ) UI_PLATFORM_NO_SUP = "FreeBSD (PKG)";
+ if( ua.indexOf( "hiptop" ) !== -1 ) UI_PLATFORM_NO_SUP = "smartphones (Hiptop)";
+ if( ua.indexOf( "ipad" ) !== -1 ||
+ ua.indexOf( "iphone" ) !== -1 ||
+ ua.indexOf( "ipod" ) !== -1 ) UI_PLATFORM_NO_SUP = "Apple iPhone/iPad/iPod";
+ if( os.indexOf( "irix" ) !== -1 ) UI_PLATFORM_NO_SUP = "IRIX";
+ if( ua.indexOf( "kindle" ) !== -1 ) UI_PLATFORM_NO_SUP = "Amazon Kindle";
+ if( os.indexOf( "netbsd" ) !== -1 ) UI_PLATFORM_NO_SUP = "NetBSD";
+ if( ua.indexOf( "nintendo" ) !== -1 ) UI_PLATFORM_NO_SUP = "Nintendo game console";
+ if( ua.indexOf( "nokia" ) !== -1 ) UI_PLATFORM_NO_SUP = "Nokia mobile devices";
+ if( os.indexOf( "openbsd" ) !== -1 ) UI_PLATFORM_NO_SUP = "OpenBSD";
+ if( os.indexOf( "os/2" ) !== -1 ) UI_PLATFORM_NO_SUP = "OS/2";
+ if( ua.indexOf( "palm" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Palm OS)";
+ if( os.indexOf( "pcbsd" ) !== -1 ) UI_PLATFORM_NO_SUP = "PC-BSD";
+ if( ua.indexOf( "pike" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Pike)";
+ if( ua.indexOf( "playstation" ) !== -1 ) UI_PLATFORM_NO_SUP = "Sony Playstation";
+ if( ua.indexOf( "power_pc" ) !== -1 ||
+ ua.indexOf( "ppc" ) !== -1 ) { UI_PLATFORM_NO_SUP = "Mac OS PPC (DMG)";
OLD_PLATFORM = true;
}
- if( ua.indexOf( "psp" ) != -1 ) UI_PLATFORM_NO_SUP = "Sony Playstation Portable";
- if( os.indexOf( "qnx" ) != -1 ) UI_PLATFORM_NO_SUP = "QNX";
- if( ua.indexOf( "s60" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (S60)";
- if( ua.indexOf( "sun4u" ) != -1 ) { UI_PLATFORM_NO_SUP = "Solaris SPARC (PKG)";
+ if( ua.indexOf( "psp" ) !== -1 ) UI_PLATFORM_NO_SUP = "Sony Playstation Portable";
+ if( os.indexOf( "qnx" ) !== -1 ) UI_PLATFORM_NO_SUP = "QNX";
+ if( ua.indexOf( "s60" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (S60)";
+ if( ua.indexOf( "sun4u" ) !== -1 ) { UI_PLATFORM_NO_SUP = "Solaris SPARC (PKG)";
OLD_PLATFORM = true;
}
- if( os.indexOf( "sunos" ) != -1 ) { UI_PLATFORM_NO_SUP = "Solaris x86 (PKG)";
+ if( os.indexOf( "sunos" ) !== -1 ) { UI_PLATFORM_NO_SUP = "Solaris x86 (PKG)";
OLD_PLATFORM = true;
}
- if( ua.indexOf( "symbian" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Symbian OS)";
- if( ua.indexOf( "symbos" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Symbian OS)";
- if( os.indexOf( "vms" ) != -1 ) UI_PLATFORM_NO_SUP = "OpenVMS";
- if( ua.indexOf( "webos" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Palm webOS)";
- if( ua.indexOf( "widerweb" ) != -1 ) UI_PLATFORM_NO_SUP = "mobile phones (WiderWeb)";
- if( ua.indexOf( "wii" ) != -1 ) UI_PLATFORM_NO_SUP = "Nintendo Wii game console";
- if( os.indexOf( "x11" ) != -1 ) UI_PLATFORM_NO_SUP = "unknown OS (X11 support)";
+ if( ua.indexOf( "symbian" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Symbian OS)";
+ if( ua.indexOf( "symbos" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Symbian OS)";
+ if( os.indexOf( "vms" ) !== -1 ) UI_PLATFORM_NO_SUP = "OpenVMS";
+ if( ua.indexOf( "webos" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (Palm webOS)";
+ if( ua.indexOf( "widerweb" ) !== -1 ) UI_PLATFORM_NO_SUP = "mobile phones (WiderWeb)";
+ if( ua.indexOf( "wii" ) !== -1 ) UI_PLATFORM_NO_SUP = "Nintendo Wii game console";
+ if( os.indexOf( "x11" ) !== -1 ) UI_PLATFORM_NO_SUP = "unknown OS (X11 support)";
// If $UI_PLATFORM_NO_SUP is already filled, something was recognized and no more work is needed.
- if( UI_PLATFORM_NO_SUP != "false" )
+ if( UI_PLATFORM_NO_SUP !== "false" )
return URL_PLATFORM;
// Windows?
- if( os.indexOf( "win" ) != -1 ||
- os.indexOf( "windows" ) != -1 ) { UI_PLATFORM = "Windows (EXE)";
+ if( os.indexOf( "win" ) !== -1 ||
+ os.indexOf( "windows" ) !== -1 ) { UI_PLATFORM = "Windows (EXE)";
URL_PLATFORM = "Win_x86_install";
EXTENSION = ".exe";
}
// Linux, x86 or x86-64, DEB or RPM?
- if( os.indexOf( "linux" ) != -1 ) {
+ if( os.indexOf( "linux" ) !== -1 ) {
// 32-bit, DEB or RPM?
- if( os.indexOf( "x86" ) != -1 ||
- os.indexOf( "i686" ) != -1 ||
- os.indexOf( "i586" ) != -1 ||
- os.indexOf( "i486" ) != -1 ||
- os.indexOf( "i386" ) != -1 ||
- av.indexOf( "x86" ) != -1 ||
- av.indexOf( "i686" ) != -1 ||
- av.indexOf( "i586" ) != -1 ||
- av.indexOf( "i486" ) != -1 ||
- av.indexOf( "i386" ) != -1 ) { UI_PLATFORM = "Linux 32-bit (x86) (RPM)";
+ if( os.indexOf( "x86" ) !== -1 ||
+ os.indexOf( "i686" ) !== -1 ||
+ os.indexOf( "i586" ) !== -1 ||
+ os.indexOf( "i486" ) !== -1 ||
+ os.indexOf( "i386" ) !== -1 ||
+ av.indexOf( "x86" ) !== -1 ||
+ av.indexOf( "i686" ) !== -1 ||
+ av.indexOf( "i586" ) !== -1 ||
+ av.indexOf( "i486" ) !== -1 ||
+ av.indexOf( "i386" ) !== -1 ) { UI_PLATFORM = "Linux 32-bit (x86) (RPM)";
URL_PLATFORM = "Linux_x86_install-rpm";
EXTENSION = ".tar.gz";
- if( ua.indexOf( "debian" ) != -1 ||
- ua.indexOf( "iceweasel" ) != -1 ||
- ua.indexOf( "ubuntu" ) != -1 ) { UI_PLATFORM = "Linux Debian 32-bit (x86) (DEB)";
+ if( ua.indexOf( "debian" ) !== -1 ||
+ ua.indexOf( "iceweasel" ) !== -1 ||
+ ua.indexOf( "ubuntu" ) !== -1 ) { UI_PLATFORM = "Linux Debian 32-bit (x86) (DEB)";
URL_PLATFORM = "Linux_x86_install-deb";
EXTENSION = ".tar.gz";
}
}
// 64-bit, DEB or RPM?
- if( os.indexOf( "_64" ) != -1 ||
- os.indexOf( "-64" ) != -1 ||
- os.indexOf( "x64" ) != -1 ||
- os.indexOf( "amd64" ) != -1 ||
- av.indexOf( "_64" ) != -1 ||
- av.indexOf( "-64" ) != -1 ||
- av.indexOf( "x64" ) != -1 ||
- av.indexOf( "amd64" ) != -1 ) { UI_PLATFORM = "Linux 64-bit (x86-64) (RPM)";
+ if( os.indexOf( "_64" ) !== -1 ||
+ os.indexOf( "-64" ) !== -1 ||
+ os.indexOf( "x64" ) !== -1 ||
+ os.indexOf( "amd64" ) !== -1 ||
+ av.indexOf( "_64" ) !== -1 ||
+ av.indexOf( "-64" ) !== -1 ||
+ av.indexOf( "x64" ) !== -1 ||
+ av.indexOf( "amd64" ) !== -1 ) { UI_PLATFORM = "Linux 64-bit (x86-64) (RPM)";
URL_PLATFORM = "Linux_x86-64_install-rpm";
EXTENSION = ".tar.gz";
- if( ua.indexOf( "debian" ) != -1 ||
- ua.indexOf( "iceweasel" ) != -1 ||
- ua.indexOf( "ubuntu" ) != -1 ) { UI_PLATFORM = "Linux Debian 64-bit (x86-64) (DEB)";
+ if( ua.indexOf( "debian" ) !== -1 ||
+ ua.indexOf( "iceweasel" ) !== -1 ||
+ ua.indexOf( "ubuntu" ) !== -1 ) { UI_PLATFORM = "Linux Debian 64-bit (x86-64) (DEB)";
URL_PLATFORM = "Linux_x86-64_install-deb";
EXTENSION = ".tar.gz";
}
@@ -1525,18 +1529,18 @@ function getPlatform() {
}
// Mac OS X?
- if( os.indexOf( "mac" ) != -1 ) { UI_PLATFORM = "OS X 64-bit (x86-64) (DMG)";
+ if( os.indexOf( "mac" ) !== -1 ) { UI_PLATFORM = "OS X 64-bit (x86-64) (DMG)";
URL_PLATFORM = "MacOS_x86-64_install";
EXTENSION = ".dmg";
// OS X is 10.6 or older?
- if( ua.indexOf( "10.6" ) != -1 ||
- ua.indexOf( "10_6" ) != -1 ||
- ua.indexOf( "10.5" ) != -1 ||
- ua.indexOf( "10_5" ) != -1 ||
- ua.indexOf( "10.4" ) != -1 ||
- ua.indexOf( "10_4" ) != -1 ||
- ua.indexOf( "10.3" ) != -1 ||
- ua.indexOf( "10_3" ) != -1 ) { UI_PLATFORM = "Mac OS X (<= 10.6)";
+ if( ua.indexOf( "10.6" ) !== -1 ||
+ ua.indexOf( "10_6" ) !== -1 ||
+ ua.indexOf( "10.5" ) !== -1 ||
+ ua.indexOf( "10_5" ) !== -1 ||
+ ua.indexOf( "10.4" ) !== -1 ||
+ ua.indexOf( "10_4" ) !== -1 ||
+ ua.indexOf( "10.3" ) !== -1 ||
+ ua.indexOf( "10_3" ) !== -1 ) { UI_PLATFORM = "Mac OS X (<= 10.6)";
URL_PLATFORM = "MacOS_x86_install";
OLD_PLATFORM = true;
}
@@ -1544,7 +1548,7 @@ function getPlatform() {
}
// If nothing was recognized until now, set $UI_PLATFORM to show it to the user.
- if( UI_PLATFORM == "" ) {
+ if( UI_PLATFORM === "" ) {
UI_PLATFORM = "unknown platform/OS";
ERROR = true;
}
@@ -1609,6 +1613,8 @@ function getReleaseMatrixPos() {
*/
// function getFilename( ver ) {
function getFileData( ver ) {
+ var thisReleaseMatrixSet = "";
+
// Depending on $ver, a different release matrix has to be used to assemble the download filenames.
switch( ver ) {
case "4.1.0":
@@ -1755,7 +1761,7 @@ function getFilesize( ver ) {
}
*/
// If a platform was found and no error occurred, assign the array data and filesize from the release matrix.
- if( RELEASE_PLATFORM_POS_FULL > -1 && !ERROR ) {
+ if( RELEASE_PLATFORM_POS_FULL !== -1 && !ERROR ) {
// Depending on $ver, a different release matrix has to be used to get the filesizes.
switch( ver ) {
case "4.1.0":
@@ -1810,7 +1816,7 @@ function openItem( itemid, uri ) {
* Output values of variables for debugging
*/
function alertDbg( location ) {
- if( location == "" )
+ if( location === "" )
location = "No location named!";
alert( ""