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 21:11:27 UTC

svn commit: r910706 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/test/download_droplist.js

Author: buildbot
Date: Sat May 31 19:11:26 2014
New Revision: 910706

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 19:11:26 2014
@@ -1 +1 @@
-1598866
+1598902

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat May 31 19:11:26 2014
@@ -1 +1 @@
-1598866
+1598902

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 19:11:26 2014
@@ -19,7 +19,7 @@
  * function showErrorMessage	( error_text )
  * function isLangSupported	()
  * function getLink		( rel_mode )
- * function getLinkSel		( rel_mode )
+ * function getLinkSel		()
  * function getPlatform		()
  * function getReleaseMatrixPos	()
  * function getFilename		( ver )
@@ -32,7 +32,7 @@
 /*
  * Init function
  */
-function init() {
+function init( a, b ) {
 	// Set global variables.
 	initVars();
 
@@ -50,8 +50,11 @@ function init() {
 	setLangSel();
 	setVerSel();
 
-	// Get the download link from the selected elements.
-	getLinkSel( 1 );
+	
+	// Get release mode and analyze mode from "index.html" respective "analyze.html".
+	R_MODE = a;
+	A_MODE = b;
+	getLinkSel();
 }
 
 /*
@@ -76,6 +79,8 @@ 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".
+	R_MODE					= "";	 // The release mode (1 = stable release (default), 2 = beta release, etc.).
+	A_MODE					= "";	 // The analyze mode (0 = no debug (default), 1 = debug mode).
 	LANG_ISO				= "";	 // The language as ISO code.
 	LANG_ARRAY				= "";	 // This array contains all language specific data.
 	UI_PLATFORM				= "";	 // The platform as readable string.
@@ -1163,16 +1168,19 @@ function getLink( rel_mode ) {
  * Get link to mirror system for download file and checksum file
  * Depends on chosen OS, language and type
  */
-function getLinkSel( rel_mode ) {
+function getLinkSel() {
 	// Reset all error flags.
 	SF	= false;
 	OTHER	= false;
 	ARCHIVE	= false;
 	ERROR	= false;
 
-	// If no release mode was given, assume it is about the stable release.
-	if( rel_mode === undefined )
-		rel_mode = 1;
+	// If no mode was given, assume it is the release mode (stable release).
+	if( R_MODE === undefined )
+		R_MODE = 1;
+	// If no mode was given, assume it is not the analyze mode (used for "analyze.html").
+	if( A_MODE === undefined )
+		A_MODE = false;
 
 	// Get the selected data from the select boxes.
 	getOSSel();
@@ -1235,7 +1243,7 @@ function getLinkSel( rel_mode ) {
 
 	// If language is not supported, show the none-availability to the user.
 	if( ! isLangSupported() ) {
-		if( rel_mode === 1 ) {
+		if( R_MODE === 1 ) {
 			// Release mode.
 			// Provide the link from the Native Language (NL) group.
 //			LINK_FULL     = LANG_ARRAY[ 4 ];
@@ -1355,9 +1363,6 @@ function getLinkSel( rel_mode ) {
 		document.getElementById( "dl_rpt_img"	    ).src	= "../cachedimages/help-report-broken-link-icon.png";
 		document.getElementById( "dl_rpt_img"	    ).title	= "Broken download link? Click here to report.";
 		document.getElementById( "dl_rpt_img"	    ).alt	= "Broken link";
-		document.getElementById( "dl_rpt"	    ).href	= "analyze_droplist.html";
-		document.getElementById( "dl_rpt"	    ).innerHTML	= "Report broken link";
-		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
@@ -1387,6 +1392,25 @@ function getLinkSel( rel_mode ) {
 		document.getElementById( "dl_chk"	    ).style.cursor = "help";
 		document.getElementById( "dl_rpt_img"	    ).style.cursor = "help";
 		document.getElementById( "dl_rpt"	    ).style.cursor = "help";
+
+		// Set different values depending if in analyze mode or not
+		if( A_MODE === false ) {
+			document.getElementById( "dl_rpt"   ).href	= "analyze_droplist.html";
+			document.getElementById( "dl_rpt"   ).innerHTML	= "Report broken link";
+			document.getElementById( "dl_rpt"   ).title	= "Broken download link? Click here to report.";
+		} else {
+
+			for( var i = 0, j = element_ids_sub_green.length; i < j; i++ ) {
+				document.getElementById( element_ids_sub_green[ i ] ).style.display = "none";
+			}
+
+			document.getElementById( "dl_rpt"     ).style.fontSize = "1.6em";
+			document.getElementById( "dl_rpt"     ).href	       = "javascript:void( 0 )";
+			document.getElementById( "dl_rpt"     ).innerHTML      = "<b>Select your favorite options and click to update the table below</b>";
+			document.getElementById( "dl_rpt"     ).title	       = "Update the values in the table below.";
+			document.getElementById( "dl_rpt_img" ).style.display  = "none";
+			document.getElementById( "dl_rpt"     ).style.display  = "inline-block";
+		}
 	}
 
 //	alertDbg( "getLinkSel(): End" );