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/07/04 21:05:50 UTC
svn commit: r915021 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/
content/download/test/download.js
Author: buildbot
Date: Fri Jul 4 19:05:50 2014
New Revision: 915021
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 Fri Jul 4 19:05:50 2014
@@ -1 +1 @@
-1607911
+1607912
Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jul 4 19:05:50 2014
@@ -1 +1 @@
-1607911
+1607912
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 Fri Jul 4 19:05:50 2014
@@ -1,6 +1,6 @@
/*
* Overview of all functions defined below
- * ------------------------------------------
+ * ----------------------------------------------------
* function init ()
* function initVariables ()
* function getLanguage ()
@@ -28,6 +28,8 @@
/*
* Init function
+ * @param: release_mode - The release mode (stable, beta, etc.) that the scriping should work with
+ * @return: None
*/
function init( release_mode ) {
// Set global variables.
@@ -60,6 +62,8 @@ function init( release_mode ) {
/*
* Define all global variables with default values
+ * @param: init_all - Should all variables initialized or just a part?
+ * @return: None
*/
function initVariables( init_all ) {
// Define variables without "var" to make them globally available.
@@ -80,52 +84,53 @@ function initVariables( init_all ) {
// All global variables.
if( init_all === 1 ) {
- RELEASE_MODE = 1; // The release mode (1 = stable release (default), 2 = beta release, etc.).
- LANG_ISO = ""; // The language as ISO code.
- LANG_SEL = ""; // The selected language as ISO code from select box.
- UI_PLATFORM_NO_SUP = ""; // The platform as readable string, if not supported.
- PLATFORM_SEL = ""; // The selected platform from select box.
- VERSION_SEL = ""; // The selected version from select box.
- }
-
- UI_PLATFORM = ""; // The platform as readable string.
- 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).
- 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.
- REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date).
- REL_NOTES = ""; // The complete URL for the release notes (depends on version).
- 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.
- 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_ARC_BASE_URL = ""; // The base URL for all checksum files on Apache Archive server.
- ASF_ARC_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache Archive server.
- ASF_WIKI_URL = ""; // The base URL for all release notes on Apache Wiki.
- 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).
- SHOW_SUB_BOX = true; // Is the download URL OK to show the sub-box (true) or not (false)?
- ERROR = false; // Is the download URL in general OK (false) or not (true)?
+ RELEASE_MODE = 1; // The release mode (1 = stable release (default), 2 = beta release, etc.).
+ LANG_ISO = ""; // The language as ISO code.
+ LANG_SEL = ""; // The selected language as ISO code from select box.
+ UI_PLATFORM_NO_SUP = ""; // The platform as readable string, if not supported.
+ PLATFORM_SEL = ""; // The selected platform from select box.
+ VERSION_SEL = ""; // The selected version from select box.
+ }
+
+ UI_PLATFORM = ""; // The platform as readable string.
+ 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).
+ 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.
+ REL_TEXT = ""; // The release data (milestone, build ID, svn rev, release date).
+ REL_NOTES = ""; // The complete URL for the release notes (depends on version).
+ 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.
+ 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_ARC_BASE_URL = ""; // The base URL for all checksum files on Apache Archive server.
+ ASF_ARC_PREV_URL = ""; // The base URL for all checksum files (prev. version) on Apache Archive server.
+ ASF_WIKI_URL = ""; // The base URL for all release notes on Apache Wiki.
+ 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).
+ SHOW_SUB_BOX = true; // Is the download URL OK to show the sub-box (true) or not (false)?
+ ERROR = false; // Is the download URL in general OK (false) or not (true)?
return;
}
/*
* Get array and ISO code for language
- * Depends on $NL_LANG and array-list
+ * @param: None
+ * @return: LANG_ISO - The language as ISO code
*/
function getLanguage() {
var language = "";
@@ -213,7 +218,8 @@ function getLanguage() {
/*
* Set values into the <select> element for OS (select box)
- * Depends on array-list
+ * @param: None
+ * @return: None
*/
function fillOSSelection() {
var selection_os = document.getElementById( "os" );
@@ -234,11 +240,12 @@ function fillOSSelection() {
/*
* Set values into the <select> element for language (select box)
- * Depends on array-list
+ * @param: None
+ * @return: None
*/
function fillLanguageSelection() {
var selection_language = document.getElementById( "language" );
- var option = "";
+ var option = "";
// Fill the <select> element until all languages are used.
for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
@@ -255,11 +262,12 @@ function fillLanguageSelection() {
/*
* Set values into the <select> element for version (select box)
- * Depends on array-list
+ * @param: None
+ * @return: None
*/
function fillVersionSelection() {
var selection_version = document.getElementById( "version" );
- var option = "";
+ var option = "";
// Fill the <select> element until all versions are used.
for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
@@ -276,7 +284,8 @@ function fillVersionSelection() {
/*
* Set value in the <select> element for OS (select box)
- * Depends on OS data from browser
+ * @param: None
+ * @return: PLATFORM_SEL - The platform as short code that was set as selected in the drop-down box
*/
function setOSSelection() {
// Depending on $PLATFORM assign the platform string of the release matrix.
@@ -310,7 +319,8 @@ function setOSSelection() {
/*
* Set value in the <select> element for language (select box)
- * Depends on language data from browser
+ * @param: None
+ * @return: LANG_SEL - The language as ISO code that was set as selected in the drop-down box
*/
function setLanguageSelection() {
// Depending on $LANG_ISO assign the language position of the release matrix.
@@ -346,7 +356,8 @@ function setLanguageSelection() {
/*
* Set value in the <select> element for version (select box)
- * Depends on nothing
+ * @param: None
+ * @return: VERSION_SEL - The version that was set as selected in the drop-down box
*/
function setVersionSelection() {
// Depending on $VERSION assign the version.
@@ -380,7 +391,8 @@ function setVersionSelection() {
/*
* Get values from the <select> element for OS (select box)
- * Depends on chosen OS
+ * @param: None
+ * @return: PLATFORM_SEL - The platform as short code that was selected from the drop-down box
*/
function getOSSelection() {
var os_value = document.download.os.options[document.download.os.selectedIndex].value;
@@ -401,7 +413,8 @@ function getOSSelection() {
/*
* Get values from the <select> element for language (select box)
- * Depends on chosen language
+ * @param: None
+ * @return: LANG_SEL - The language as ISO code that was selected from the drop-down box
*/
function getLanguageSelection() {
var language_value = document.download.language.options[document.download.language.selectedIndex].value;
@@ -420,7 +433,8 @@ function getLanguageSelection() {
/*
* Get values from the <select> element for version (select box)
- * Depends on chosen version
+ * @param: None
+ * @return: VERSION_SEL - The version that was selected from the drop-down box
*/
function getVersionSelection() {
var version_value = document.download.version.options[document.download.version.selectedIndex].value;
@@ -438,6 +452,8 @@ function getVersionSelection() {
/*
* Hide CSS style for all elements with ID to make them invisible
+ * @param: None
+ * @return: None
*/
function hideElements() {
// Change CSS styles for all elements with ID in the green and sub-green colored boxes.
@@ -455,7 +471,8 @@ function hideElements() {
/*
* Show a popup window
- * Depends on received target link
+ * @param: target_link - The URL that should be opened as popup window
+ * @return: None
*/
function showWindow( target_link ) {
// Open a popup window with specific parameters to show the file from "target_link".
@@ -469,7 +486,8 @@ function showWindow( target_link ) {
/*
* Show error message
- * Depends on set text data
+ * @param: error_text - The text should should be shown as error message
+ * @return: ERROR - Set the general error flag to "true"
*/
function showErrorMessage( error_text ) {
// The chosen items from select boxes lead to no download link, show an error message about reason and alternative.
@@ -511,8 +529,8 @@ function showErrorMessage( error_text )
/*
* Is flag set for chosen language (y/n)?
- * Depends on array-list of "languages.js"
- * Depends on language and array-list of "release_matrix.js"
+ * @param: None
+ * @return: ERROR - Depending on if the language is supported set the general error flag to "true" or "false"
*/
function isLanguageSupported() {
// Check the flag in "release_matrix.js", 'y' -> provide download link, 'n' -> redirect to alternative webpage.
@@ -547,7 +565,8 @@ function isLanguageSupported() {
/*
* Check links that should be assembled in getLinkSelection() for expections that do not lead to real download links
- * Depends on chosen OS, language and version
+ * @param: None
+ * @return: None
*/
function checkForLinkExceptions() {
// If recognized resp. selected platform, language or version does not lead to a normal download link,
@@ -695,12 +714,13 @@ function checkForLinkExceptions() {
SHOW_SUB_BOX = false;
}
- return ERROR;
+ return;
}
/*
* Get link to mirror system for download file and checksum file
- * Depends on chosen OS, language and version
+ * @param: None
+ * @return: None
*/
function getLinkSelection() {
// Reset all variables that could have been set until now.
@@ -844,12 +864,13 @@ function getLinkSelection() {
document.getElementById( "sub_box" ).style.display = "block";
}
- return LINK_FULL;
+ return;
}
/*
* Get platform of browser
- * Depends on internal browser data
+ * @param: None
+ * @return: None
*/
function getPlatform() {
// For more help or data see: "http://www.useragentstring.com".
@@ -1044,12 +1065,13 @@ function getPlatform() {
ERROR = true;
}
- return PLATFORM;
+ return;
}
/*
* Get positions of platform in release matrix
- * Depends on platform and array-list of "release_matrix.js"
+ * @param: None
+ * @return: None
*/
function getReleaseMatrixPosition() {
// Depending on $PLATFORM, assign the platform position from the release matrix.
@@ -1102,12 +1124,13 @@ function getReleaseMatrixPosition() {
ERROR = true;
}
- return RELEASE_PLATFORM_POS_FULL;
+ return;
}
/*
* Get file name for download file
- * Depends on version and array-list of "release_matrix.js"
+ * @param: version - The version to use to get the file data
+ * @return: None
*/
function getFileData( version ) {
// Depending on $ver, a different release matrix has to be used to assemble the download filenames.
@@ -1188,11 +1211,13 @@ function getFileData( version ) {
ERROR = true;
}
- return FILENAME_FULL;
+ return;
}
/*
* Set document.location to start the download
+ * @param: itemid, uri - The ID of the colored box and the URI that should be opened
+ * @return: None
*/
function openItem( itemid, uri ) {
// var thisDocument = document.getElementById( "downloadextendedtext" );
@@ -1202,6 +1227,8 @@ function openItem( itemid, uri ) {
/*
* Output values of variables for debugging
+ * @param: location - The location where the debug utput should take place
+ * @return: None
*/
function debug( location ) {
if( location === "" ) {