openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1601079 - /openoffice/ooo-site/trunk/content/download/test/download.js
Date Sat, 07 Jun 2014 09:02:09 GMT
Author: marcus
Date: Sat Jun  7 09:02:09 2014
New Revision: 1601079

URL: http://svn.apache.org/r1601079
Log:
Fixed possible error with line break in 'showWindow()' function, added JS logic to assemble
the link to the release notes depending on the version

Modified:
    openoffice/ooo-site/trunk/content/download/test/download.js

Modified: openoffice/ooo-site/trunk/content/download/test/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download.js?rev=1601079&r1=1601078&r2=1601079&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/download.js Sat Jun  7 09:02:09 2014
@@ -62,10 +62,10 @@ function initVars( init_all ) {
 	// Define variables without "var" to make them globally available.
 
 	// The following are used in "download.js" only.
-	element_ids_sub_green = [ "dl_rel_info", "dl_f_info", "dl_f_chk_keys", "space1", "dl_f_chk_asc",
"space2",
-	"dl_f_chk_md5", "space3", "dl_f_chk_sha256", "dl_lp_info", "dl_lp_chk_keys", "space4", "dl_lp_chk_asc",
"space5",
-	"dl_lp_chk_md5", "space6", "dl_lp_chk_sha256", "dl_hlp_img", "dl_hlp", "dl_chk_img", "dl_chk",
"dl_rpt_img",
-	"dl_rpt" ];
+	element_ids_sub_green = [ "dl_rel_info", "dl_rel_notes", "dl_f_info", "dl_f_chk_keys", "space1",
"dl_f_chk_asc",
+	"space2", "dl_f_chk_md5", "space3", "dl_f_chk_sha256", "dl_lp_info", "dl_lp_chk_keys", "space4",
"dl_lp_chk_asc",
+	"space5", "dl_lp_chk_md5", "space6", "dl_lp_chk_sha256", "dl_hlp_img", "dl_hlp", "dl_chk_img",
"dl_chk",
+	"dl_rpt_img", "dl_rpt" ];
 
 	element_ids_links = [ "dl_f_link", "dl_lp_link", "dl_f_chk_keys", "dl_f_chk_asc", "dl_f_chk_md5",
"dl_f_chk_sha256",
 	"dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", "dl_lp_chk_sha256", "dl_hlp", "dl_chk",
"dl_rpt" ];
@@ -90,6 +90,7 @@ function initVars( init_all ) {
 	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.
 	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).
@@ -97,9 +98,9 @@ function initVars( init_all ) {
 	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_BASE_URL				= "";	 // The base URL for all binary files 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.
+	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.
@@ -448,9 +449,7 @@ function resetElements() {
  */
 function showWindow( target_link ) {
 	// Open a popup window with specific parameters to show the file from "target_link".
-	window = window.open( target_link, "_blank",
-	"location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, titlebar=no, toolbar=no,
\
-	left=100, top=250, width=800, height=550");
+	window = window.open( target_link, "_blank", "location=no, menubar=no, resizable=yes, scrollbars=yes,
status=no, titlebar=no, toolbar=no, left=100, top=250, width=800, height=550");
 	window.focus();
 
 	return;
@@ -675,6 +674,12 @@ function getLinkSel() {
 		LINK_CHK_MD5_LP	     = ASF_ARC_BASE_URL  + "/binaries/"   + LANG_SEL + "/" + FILENAME_LP
  + ".md5";
 		LINK_CHK_SHA256_LP   = ASF_ARC_BASE_URL  + "/binaries/"   + LANG_SEL + "/" + FILENAME_LP
  + ".sha256";
 
+		// Assign the link for release notes, depending on the version.
+		if ( VERSION.slice( 4, 5 ) === "0" )
+			REL_NOTES    = ASF_WIKI + "AOO+" + VERSION_SHORT + "+Release+Notes";
+		else
+			REL_NOTES    = ASF_WIKI + "AOO+" + VERSION	 + "+Release+Notes";
+
 		SF		     = true;
 		ERROR		     = false;
 
@@ -688,7 +693,10 @@ function getLinkSel() {
 		document.getElementById( "dl_lp_link"	    ).title	= "Click to download: " + FILENAME_LP;
 
 		// Set the values in the sub-green box for the 3 text lines.
-		document.getElementById( "dl_rel_info"      ).innerHTML	= "<b>Release info:</b>
" + REL_TEXT;
+		document.getElementById( "dl_rel_info"	    ).innerHTML	= "<b>Release info:</b>
" + REL_TEXT + " | ";
+		document.getElementById( "dl_rel_notes"	    ).href	= REL_NOTES;
+		document.getElementById( "dl_rel_notes"	    ).innerHTML	= "Release notes";
+		document.getElementById( "dl_rel_notes"	    ).title	= "Release notes for Apache OpenOffice
" + VERSION_SEL;
 		document.getElementById( "dl_f_info"	    ).innerHTML = "<b>Full installation:</b>
File size ~ " + FILESIZE_FULL + " MByte | Signatures and hashes: ";
 		document.getElementById( "dl_f_chk_keys"    ).href	= LINK_CHK_KEYS;
 		document.getElementById( "dl_f_chk_keys"    ).innerHTML	= "KEYS";
@@ -1126,15 +1134,13 @@ function alertDbg( location ) {
 	+ "RELEASE_PLATFORM: "			+ "\t\t\t\t\t"		+ RELEASE_PLATFORM			+ "\n"
 	+ "RELEASE_LANG: "			+ "\t\t\t\t\t\t"	+ RELEASE_LANG				+ "\n"
 	+ "REL_TEXT: "				+ "\t\t\t\t\t\t\t"	+ REL_TEXT				+ "\n"
+	+ "REL_NOTES: "				+ "\t\t\t\t\t\t\t"	+ REL_NOTES				+ "\n"
 	+ "VERSION_SEL: "			+ "\t\t\t\t\t\t"	+ VERSION_SEL				+ "\n"
 	+ "FILENAME_FULL: "			+ "\t\t\t\t\t"		+ FILENAME_FULL				+ "\n"
 	+ "FILENAME_LP: "			+ "\t\t\t\t\t\t"	+ FILENAME_LP				+ "\n"
 	+ "FILESIZE_FULL: "			+ "\t\t\t\t\t\t"	+ FILESIZE_FULL				+ "\n"
 	+ "FILESIZE_LP: "			+ "\t\t\t\t\t\t"	+ FILESIZE_LP				+ "\n"
 	+ "EXTENSION: "				+ "\t\t\t\t\t\t"	+ EXTENSION				+ "\n"
-	+ "SOURCEFORGE_BASE_URL: "		+ "\t\t\t"		+ SOURCEFORGE_BASE_URL			+ "\n"
-	+ "ASF_BASE_URL: "			+ "\t\t\t\t\t"		+ ASF_BASE_URL				+ "\n"
-	+ "ASF_ARC_BASE_URL: "			+ "\t\t\t\t\t"		+ ASF_ARC_BASE_URL			+ "\n"
 	+ "LINK_FULL: "				+ "\t\t\t\t\t\t"	+ LINK_FULL				+ "\n"
 	+ "LINK_LP: "				+ "\t\t\t\t\t\t\t"	+ LINK_LP				+ "\n"
 	+ "LINK_CHK_ASC_FULL: "			+ "\t\t\t\t\t"		+ LINK_CHK_ASC_FULL			+ "\n"



Mime
View raw message