You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ks...@apache.org on 2014/09/04 22:32:45 UTC

svn commit: r1622557 - in /openoffice/ooo-site/trunk/content/download-NEXT2: boxed_download.js boxed_download_r2.js download.js download_r2.js index.html

Author: kschenk
Date: Thu Sep  4 20:32:44 2014
New Revision: 1622557

URL: http://svn.apache.org/r1622557
Log:
Some cleanup -- remove duplicates and continue work.


Removed:
    openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download_r2.js
    openoffice/ooo-site/trunk/content/download-NEXT2/download_r2.js
Modified:
    openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download.js
    openoffice/ooo-site/trunk/content/download-NEXT2/download.js
    openoffice/ooo-site/trunk/content/download-NEXT2/index.html

Modified: openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download.js?rev=1622557&r1=1622556&r2=1622557&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download.js (original)
+++ openoffice/ooo-site/trunk/content/download-NEXT2/boxed_download.js Thu Sep  4 20:32:44 2014
@@ -27,13 +27,13 @@ DL.createDownloadBox = function() {
 
     // Select drop-down boxes.
     + "<form name='download'>"
-      + "<select class='sel-os' id='os' name='os' ' onchange='DL.getLinkSelection()'"
+      + "<select class='sel-os' id='os' name='os' ' onchange='getLinkSelection()'"
         + "title='" + l10n.dl_green_box_selectbox_os_title   + "'>"
       + "</select>"
-      + "<select class='sel-language' id='language' name='language' onchange='DL.getLinkSelection()'"
+      + "<select class='sel-language' id='language' name='language' onchange='getLinkSelection()'"
         + "title='" + l10n.dl_green_box_selectbox_lang_title + "'>"
       + "</select>"
-      + "<select class='sel-version' id='version' name='version' onchange='DL.getLinkSelection()'"
+      + "<select class='sel-version' id='version' name='version' onchange='getLinkSelection()'"
         + "title='" + l10n.dl_green_box_selectbox_ver_title  + "'>"
       + "</select>"
     + "</form>"

Modified: openoffice/ooo-site/trunk/content/download-NEXT2/download.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download-NEXT2/download.js?rev=1622557&r1=1622556&r2=1622557&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download-NEXT2/download.js (original)
+++ openoffice/ooo-site/trunk/content/download-NEXT2/download.js Thu Sep  4 20:32:44 2014
@@ -2,26 +2,26 @@
  * Overview of all methods (functions) defined below of the global object "DL"
  * ---------------------------------------------------------------------------
  * function DL.init			()
- * function DL.initVariables		()
- * function DL.getLanguage		()
- * function DL.fillOSSelection		()
- * function DL.fillLanguageSelection	()
- * function DL.fillVersionSelection	()
- * function DL.getOSSelection		()
- * function DL.getLanguageSelection	()
- * function DL.getVersionSelection	()
- * function DL.setOSSelection		()
- * function DL.setLanguageSelection	()
- * function DL.setVersionSelection	()
+ * function initVariables		()
+ * function getLanguage		()
+ * function fillOSSelection		()
+ * function fillLanguageSelection	()
+ * function fillVersionSelection	()
+ * function getOSSelection		()
+ * function getLanguageSelection	()
+ * function getVersionSelection	()
+ * function setOSSelection		()
+ * function setLanguageSelection	()
+ * function setVersionSelection	()
  * function DL.hideElements		()
  * function DL.showWindow		( target_link )
  * function DL.showErrorMessage		( error_text )
- * function DL.isLanguageSupported	()
- * function DL.checkForLinkExceptions	()
- * function DL.getLinkSelection		()
- * function DL.getPlatform		()
- * function DL.getReleaseMatrixPosition	()
- * function DL.getFileData		( version )
+ * function isLanguageSupported	()
+ * function checkForLinkExceptions	()
+ * function getLinkSelection		()
+ * function getPlatform		()
+ * function getReleaseMatrixPosition	()
+ * function getFileData		( version )
  * function DL.debug			( location )
  *
  * Overview of global functions defined below
@@ -36,21 +36,21 @@
  */
 DL.init = function( release_mode ) {
 	// Set global variables.
-	DL.initVariables( 1 );
+	initVariables( 1 );
 
 	// Fill the OS, language and version select boxes.
-	DL.fillOSSelection();
-	DL.fillLanguageSelection();
-	DL.fillVersionSelection();
+	fillOSSelection();
+	fillLanguageSelection();
+	fillVersionSelection();
 
 	// Get the language and platform from the browser data.
-	DL.getLanguage();
-	DL.getPlatform();
+	getLanguage();
+	getPlatform();
 
 	// Set the recognized platform and language as default.
-	DL.setOSSelection();
-	DL.setLanguageSelection();
-	DL.setVersionSelection();
+	setOSSelection();
+	setLanguageSelection();
+	setVersionSelection();
 
 	
 	// When release mode = 2, it is a beta release. Otherwise assume "stable release" as default.
@@ -58,7 +58,7 @@ DL.init = function( release_mode ) {
 		DL.RELEASE_MODE = mode;
 	}
 
-	DL.getLinkSelection();
+	getLinkSelection();
 
 	return;
 }
@@ -68,7 +68,7 @@ DL.init = function( release_mode ) {
  * @param:  init_all - Should all variables initialized or just a part?
  * @return: None
  */
-DL.initVariables = function( init_all ) {
+function initVariables ( init_all ) {
 	// Define variables without "var" to make them globally available.
 	// The following are used in "download.js". and "index.html".
 
@@ -90,6 +90,8 @@ DL.initVariables = function( init_all ) 
 		DL.RELEASE_MODE		= 1;	 // The release mode (1 = stable release (default), 2 = beta release, etc.).
 		DL.LANG_ISO		= "";	 // The language as ISO code.
 		DL.LANG_SEL		= "";	 // The selected language as ISO code from select box.
+		DL.LANGNAME_ENG = "";	//Lang name from languages in English
+		DL.LANGNAME_NL = "";	//Lang name from languages in NL
 		DL.UI_PLATFORM_NO_SUP	= "";	 // The platform as readable string, if not supported.
 		DL.PLATFORM_SEL		= "";	 // The selected platform from select box.
 		DL.VERSION_SEL		= "";	 // The selected version from select box.
@@ -135,7 +137,7 @@ DL.initVariables = function( init_all ) 
  * @param:  None
  * @return: DL.LANG_ISO - The language as ISO code
  */
-DL.getLanguage = function() {
+function getLanguage () {
 	var language = "";
 
 	// If available, use the manual set ISO code (see "index.html") that overrides $LANG_ISO.
@@ -177,16 +179,17 @@ DL.getLanguage = function() {
 	var languageCode	= language.split( "-" )[ 0 ];		// Part before "-" is the language code.
 	var regionCode		= language.split( "-" )[ 1 ];		// Part behind "-" is the region code.
 	var thisLanguageSet	= DL.language_matrix[ languageCode ];	// Assign complete lang data of the lang code.
+	
 
-	if( thisLanguageSet == null ) {
+	if( thisLanguageSet === null ) {
 		// Assign "en-US" when the language code was not found inside array.
 		language	= "en-US";
 		languageCode	= "en";
 		regionCode	= "us";
 		thisLanguageSet	= DL.language_matrix[ languageCode ];
-	}
+		}
 
-	if( regionCode != null ) {
+	if( regionCode !== null ) {
 /*
 		// Fix for Portuguese (European) downloads as they are named only "pt" without region code!
 		if( languageCode === "pt" && regionCode === "pt" ) {
@@ -194,7 +197,7 @@ DL.getLanguage = function() {
 		}
 */
 		// If an additional region code was found.
-		if( thisLanguageSet[ regionCode ] != null ) {
+		if( thisLanguageSet[ regionCode ] !== null ) {
 			// Assign langCode-regionCode.
 			language     = languageCode + "-" + regionCode.toUpperCase();
 			thisLanguage = thisLanguageSet[ regionCode ];
@@ -216,9 +219,8 @@ DL.getLanguage = function() {
 		// Choose the default for none given region code.
 		thisLanguage = thisLanguageSet[ "-" ];
 	}
-
 	DL.LANG_ISO = language;
-	return DL.LANG_ISO;
+	return ;
 }
 
 /*
@@ -226,7 +228,7 @@ DL.getLanguage = function() {
  * @param:  None
  * @return: None
  */
-DL.fillOSSelection = function() {
+function fillOSSelection() {
 	var selection = document.getElementById( "os" );
 	var option    = "";
 
@@ -259,7 +261,7 @@ DL.fillOSSelection = function() {
  * @param:  None
  * @return: None
  */
-DL.fillLanguageSelection = function() {
+function fillLanguageSelection () {
 	var selection = document.getElementById( "language" );
 	var option    = "";
 
@@ -306,7 +308,7 @@ DL.fillLanguageSelection = function() {
  * @param:  None
  * @return: None
  */
-DL.fillVersionSelection = function() {
+function fillVersionSelection() {
 	var selection = document.getElementById( "version" );
 	var option    = "";
 
@@ -339,7 +341,7 @@ DL.fillVersionSelection = function() {
  * @param:  None
  * @return: DL.PLATFORM_SEL - The platform as short code that was set as selected in the drop-down box
  */
-DL.setOSSelection = function() {
+function setOSSelection () {
 	// Depending on $DL.PLATFORM assign the platform string of the release matrix.
 
 	var selection = document.getElementById( "os" );
@@ -375,7 +377,7 @@ DL.setOSSelection = function() {
  * @param:  None
  * @return: DL.LANG_SEL - The language as ISO code that was set as selected in the drop-down box
  */
-DL.setLanguageSelection = function() {
+function setLanguageSelection () {
 	// Depending on $DL.LANG_ISO assign the language position of the release matrix.
 
 	var selection = document.getElementById( "language" );
@@ -413,7 +415,7 @@ DL.setLanguageSelection = function() {
  * @param:  None
  * @return: DL.VERSION_SEL - The version that was set as selected in the drop-down box
  */
-DL.setVersionSelection = function() {
+function setVersionSelection () {
 	// Depending on $DL.VERSION assign the version.
 
 	var selection = document.getElementById( "version" );
@@ -449,7 +451,7 @@ DL.setVersionSelection = function() {
  * @param:  None
  * @return: DL.PLATFORM_SEL - The platform as short code that was selected from the drop-down box
  */
-DL.getOSSelection = function() {
+function getOSSelection () {
 	var os_value = document[ "download" ]["os" ].options[ document[ "download" ][ "os" ].selectedIndex ].value;
 
 	// Search through the <select> element until the chosen OS is found.
@@ -471,7 +473,7 @@ DL.getOSSelection = function() {
  * @param:  None
  * @return: DL.LANG_SEL - The language as ISO code that was selected from the drop-down box
  */
-DL.getLanguageSelection = function() {
+function getLanguageSelection () {
 	var language_value = document[ "download" ][ "language" ].options[ document[ "download" ][ "language" ].selectedIndex ].value;
 
 	// Search through the <select> element until the chosen language is found.
@@ -491,7 +493,7 @@ DL.getLanguageSelection = function() {
  * @param:  None
  * @return: DL.VERSION_SEL - The version that was selected from the drop-down box
  */
-DL.getVersionSelection = function() {
+function getVersionSelection() {
 	var version_value = document[ "download" ][ "version" ].options[ document[ "download" ][ "version" ].selectedIndex ].value;
 
 	// Search through the <select> element until the chosen version is found.
@@ -590,7 +592,7 @@ DL.showErrorMessage = function( error_te
  * @return: DL.ERROR - Depending on if the language is supported set the general error flag to "true" or "false"
  */
 
-DL.isLanguageSupported = function() {
+function isLanguageSupported () {
 	// Check if the language in "release_matrix.js" is a release language depending on the version.
 	// uses DL.LANG_ISO 
 
@@ -607,8 +609,7 @@ DL.isLanguageSupported = function() {
 	var my_lang_release_matrix = "release_matrix_" + vs;
         //alert ("my_lang_release_matrix:" + my_lang_release_matrix);
         var my_lang = DL.LANG_ISO;
-        //alert ("my_lang :" + my_lang);
-       //alert ("DL.my_lang_release_matrix.my_lang [0] : "+ DL[my_lang_release_matrix][my_lang] [0]);
+		
        try {
            eval(DL[my_lang_release_matrix][my_lang] [0]);
            DL.RELEASE_LANG =  DL[my_lang_release_matrix][my_lang] [ 0 ];
@@ -616,12 +617,11 @@ DL.isLanguageSupported = function() {
             return true; 
        } catch  (ex) {
            alert(ex);
+           alert("LANG_ISO in isLanguageSupported: " + DL.LANG_ISO);
            DL.RELEASE_LANG	= "";
 		DL.ERROR	= true;
 		return false;
 	}
-       
-    
 /*	    
 
 	switch( DL.VERSION_SEL ) {
@@ -659,7 +659,7 @@ DL.isLanguageSupported = function() {
  * @param:  None
  * @return: None
  */
-DL.checkForLinkExceptions = function() {
+function checkForLinkExceptions () {
 	// If recognized resp. selected platform, language or version does not lead to a normal download link,
 	// show the none-availability to the user.
 
@@ -667,17 +667,21 @@ DL.checkForLinkExceptions = function() {
 	DL.ERROR	= false;
 
 	// If language is not supported, show the none-availability to the user.
-	if( ! DL.isLanguageSupported() ) {
+	if( ! isLanguageSupported() ) {
+            alert("LANG_ISO in checkForLinkExceptions: " + DL.LANG_ISO);
 		// Show an error message that the chosen items do not lead to a download.
 
 		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
 		if( l10n.dl_error_custom_4_text === "" ) {
 			// Show the default error text.
+			// get lang descriptions from DL_SEL_LANG			
+				
 			var error_text = "<b>" + l10n.dl_error_problem_text + "</b>"
 					+ l10n.dl_error_aoo_text + DL.VERSION_SEL
 					+ l10n.dl_error_not_available_for_text
-					+ "<b>" + DL.RELEASE_LANG[ 1 ]
-					+ " (" + DL.RELEASE_LANG[ 2 ] + ") (" + DL.LANG_SEL + ")</b>."
+				+ "<b>" + DL.RELEASE_LANG[ 1 ]
+					+ " (" + DL.RELEASE_LANG[ 2 ] + ") (" +
+					+ DL.LANG_ISO + ")</b>."
 					+ "<br />"
 					+ "<b>" + l10n.dl_error_solution_text + "</b>"
 					+ l10n.dl_error_please_select_4_text;
@@ -687,6 +691,7 @@ DL.checkForLinkExceptions = function() {
 		}
 
 		DL.showErrorMessage( error_text );
+		
 	}
 
 	// If the browser-guessed platform is not supported, show the none-availability to the user.
@@ -814,25 +819,27 @@ DL.checkForLinkExceptions = function() {
  * @param:  None
  * @return: None
  */
-DL.getLinkSelection = function() {
+function getLinkSelection () {
 	// Reset all variables that could have been set until now.
-	DL.initVariables( 0 );
+        //alert("in getLinkSelection");
+	initVariables( 0 );
 
 	// Get the selected data from the select boxes.
-	DL.getOSSelection();
-	DL.getLanguageSelection();
-	DL.getVersionSelection();
+	getOSSelection();
+	getLanguageSelection();
+	getVersionSelection();
+        //alert("done with OS, Language, Version selection");
 
 	// First check for expections that do not lead to real download links.
-	DL.checkForLinkExceptions();
+	checkForLinkExceptions();
 
 	// If the selected options lead to no download URL, should the sub-box shown anyway?
 	// Yes when SHOW_SUB_BOX = "true" and ERROR = "false".
 	if( DL.SHOW_SUB_BOX && ! DL.ERROR ) {
 		// Assemble the filenames and text for download and checksums.
 
-		DL.getReleaseMatrixPosition();
-		DL.getFileData( DL.VERSION_SEL );
+		getReleaseMatrixPosition();
+		getFileData( DL.VERSION_SEL );
 
 		DL.SF_BASE_URL		= DL.SF      + DL.VERSION_SEL + "/binaries/";
 		DL.ASF_ARC_BASE_URL     = DL.ASF_ARC + DL.VERSION_SEL;
@@ -973,7 +980,7 @@ DL.getLinkSelection = function() {
  * @param:  None
  * @return: None
  */
-DL.getPlatform = function() {
+function getPlatform () {
 	// For more help or data see: "http://www.useragentstring.com".
 
 	var av, os, ua, ve = "";
@@ -1176,7 +1183,7 @@ DL.getPlatform = function() {
  * @param:  None
  * @return: None
  */
-DL.getReleaseMatrixPosition = function() {
+function getReleaseMatrixPosition () {
 	// Depending on $PLATFORM, assign the platform position from the release matrix.
 
 	switch( DL.PLATFORM ) {
@@ -1236,7 +1243,7 @@ DL.getReleaseMatrixPosition = function()
  * @param:  version - The version to use to get the file data
  * @return: None
  */
-DL.getFileData = function( version ) {
+function getFileData ( version ) {
 	// Depending on $ver, a different release matrix has to be used to assemble the download filenames.
 
 	switch( version ) {

Modified: openoffice/ooo-site/trunk/content/download-NEXT2/index.html
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download-NEXT2/index.html?rev=1622557&r1=1622556&r2=1622557&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download-NEXT2/index.html (original)
+++ openoffice/ooo-site/trunk/content/download-NEXT2/index.html Thu Sep  4 20:32:44 2014
@@ -73,7 +73,7 @@
     // Fill the select boxes and wait for the user's choice.
     DL.init( 1 );
 
-    entourage.initialize();
+    //entourage.initialize();
 
     //-->
     </script>