openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1608252 - /openoffice/ooo-site/trunk/content/download/test/globalvars.js
Date Sun, 06 Jul 2014 17:24:31 GMT
Author: marcus
Date: Sun Jul  6 17:24:31 2014
New Revision: 1608252

URL: http://svn.apache.org/r1608252
Log:
Moved all global variables into an object, with this the global scope is no longer flooded,
only the object is global and the variables are properties of it

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

Modified: openoffice/ooo-site/trunk/content/download/test/globalvars.js
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/globalvars.js?rev=1608252&r1=1608251&r2=1608252&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/globalvars.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/globalvars.js Sun Jul  6 17:24:31 2014
@@ -8,25 +8,28 @@
  * VERSION: Set the release version (e.g., "4.1.0") that is currently on the mirrors.
  */
 
+// Stable release: Object that contains all general variables.
+var DL = new Object();
+
 // Stable release: General variables.
-var VERSION			= "4.1.0";		// Release version in full format "x.y.z".
-var VERSION_SHORT		= VERSION;		// Release version in short format "x.y".
-var MILESTONE			= "AOO410m18";		// Milestone ID (from AOO build system).
-var BUILD			= "9764";		// Build ID (from AOO build system).
-var SVN_REV			= "r1589052";		// SVN revision.
-var REL_DATE			= "2014-Apr-29";	// Date of the public announced release.
-var PREV_VERSION		= "4.0.1";		// Release of the previous version.
-var OLDVERSION			= "3.4.1";		// Old version (last stable release of 3.x series).
-var LEGACYVERSION		= "3.3.0";		// Old legacy version (last stable none-Apache release).
+DL.VERSION			= "4.1.0";		// Release version in full format "x.y.z".
+DL.VERSION_SHORT		= DL.VERSION;		// Release version in short format "x.y".
+DL.MILESTONE			= "AOO410m18";		// Milestone ID (from AOO build system).
+DL.BUILD			= "9764";		// Build ID (from AOO build system).
+DL.SVN_REV			= "r1589052";		// SVN revision.
+DL.REL_DATE			= "2014-Apr-29";	// Date of the public announced release.
+DL.PREV_VERSION			= "4.0.1";		// Release of the previous version.
+DL.OLDVERSION			= "3.4.1";		// Old version (last stable release of 3.x series).
+DL.LEGACYVERSION		= "3.3.0";		// Old legacy version (last stable none-Apache release).
 
 // Version can be written as "x.y" instead of "x.y.z" if z is 0.
-// Example: If VERSION is "4.1.0", then VERSION_SHORT is "4.1".
-// If last char ( 4 to 5 ) of VERSION === 0 then assign only the first 3 chars ( 0 to 3 )
to VERSION_SHORT.
-if ( VERSION.slice( 4, 5 ) === "0" )
-	VERSION_SHORT = VERSION.substring( 0, 3 );
+// Example: If DL.VERSION is "4.1.0", then DL.VERSION_SHORT is "4.1".
+// If last char ( 4 to 5 ) of DL.VERSION === 0 then assign only the first 3 chars ( 0 to
3 ) to DL.VERSION_SHORT.
+if ( DL.VERSION.slice( 4, 5 ) === "0" )
+	DL.VERSION_SHORT = DL.VERSION.substring( 0, 3 );
 
 // Data for the <select> element "os".
-var SEL_OS			= [ "win32",  "Windows (EXE)",			    ".exe",
+DL.SEL_OS			= [ "win32",  "Windows (EXE)",			    ".exe",
 				    "lnx64d", "Linux 64-bit (x86-64) (DEB)",	    ".tar.gz",
 				    "lnx64r", "Linux 64-bit (x86-64) (RPM)",	    ".tar.gz",
 				    "lnx32d", "Linux 32-bit (x86) (DEB)",	    ".tar.gz",
@@ -36,7 +39,7 @@ var SEL_OS			= [ "win32",  "Windows (EXE
 				    "other",  "More platforms / operating systems", "" ];
 
 // Data for the <select> element "lang".
-var SEL_LANG			= [ "ast",   "Asturian (Asturianu) (ast)",
+DL.SEL_LANG			= [ "ast",   "Asturian (Asturianu) (ast)",
 				    "eu",    "Basque (Euskara) (eu)",
 				    "bg",    "Bulgarian (български език) (bg)",
 				    "zh-CN", "Chinese [simplified] (简体中文) (zh-CN)",
@@ -76,69 +79,79 @@ var SEL_LANG			= [ "ast",   "Asturian (A
 				    "vi",    "Vietnamese (Tiếng Việt) (vi)" ];
 
 // Data for the <select> element "ver".
-var SEL_VER			= [ "4.1.0", "4.1.0",
+DL.SEL_VER			= [ "4.1.0", "4.1.0",
 				    "4.0.1", "4.0.1",
 				    "4.0.0", "4.0.0",
 				    "3.4.1", "3.4.1",
 				    "older", "Older releases" ];
 
 // Base URLs to the Sourceforge and Apache mirror server.
-var SOURCEFORGE			= "http://sourceforge.net/projects/openofficeorg.mirror/files/";
-var ASF				= "http://www.apache.org/dyn/aoo-closer.cgi/openoffice/";
-var ASF_DIST			= "http://www.apache.org/dist/openoffice/";
-var ASF_ARC			= "http://archive.apache.org/dist/openoffice/";
+DL.SF				= "http://sourceforge.net/projects/openofficeorg.mirror/files/";
+DL.ASF				= "http://www.apache.org/dyn/aoo-closer.cgi/openoffice/";
+DL.ASF_DIST			= "http://www.apache.org/dist/openoffice/";
+DL.ASF_ARC			= "http://archive.apache.org/dist/openoffice/";
 
 // Only used in "download_other.js".
-var REL_PLATFORM		= [ "Win_x86", "Linux_x86_rpm", "Linux_x86_deb", "Linux_x86-64_rpm", "Linux_x86-64_deb",
+DL.REL_PLATFORM			= [ "Win_x86", "Linux_x86_rpm", "Linux_x86_deb", "Linux_x86-64_rpm", "Linux_x86-64_deb",
 				    "MacOS_x86-64" ];
-var REL_FULL_LANG		= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
+DL.REL_FULL_LANG		= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
 				    "gl", "he", "hi", "hu", "it", "ja", "km", "ko", "lt", "nb", "nl", "pl", "pt",
 				    "pt-BR", "ru", "sk", "sl", "sr", "sv", "ta", "th", "tr", "vi", "zh-CN", "zh-TW" ];
-var REL_LP_LANG			= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
+DL.REL_LP_LANG			= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu", "fi",
"fr", "gd",
 				    "gl", "he", "hi", "hu", "it", "ja", "km", "ko", "lt", "nb", "nl", "pl", "pt",
 				    "pt-BR", "ru", "sk", "sl", "sr", "sv", "ta", "th", "tr", "vi", "zh-CN", "zh-TW" ];
-var REL_SDK_LANG		= [ "en-US" ]
+DL.REL_SDK_LANG			= [ "en-US" ]
 
 // The maximal number of available languages in "download_other.js".
-var LANG_MAX			= 133;
+DL.LANG_MAX			= 133;
+
+// Stable release: Object that contains all general variables.
+var DL_BETA = new Object();
 
 // Beta Release: General variables.
-var BETA_VERSION		= "4.1.0-beta";
-var BETA_NAME			= "4.1.0 Beta";
-var BETA_MILESTONE		= "AOO410m14";
-var BETA_BUILD			= "9760";
-var BETA_SVN_REV		= "r1573601";
-var BETA_REL_DATE		= "2014-Mar-10";
-var BETA_ACTIVE			= -1;		// 1 = activate download, 0 = display "coming soon", -1 = display
nothing
+DL_BETA.VERSION			= "4.1.0-beta";
+DL_BETA.NAME			= "4.1.0 Beta";
+DL_BETA.MILESTONE		= "AOO410m14";
+DL_BETA.BUILD			= "9760";
+DL_BETA.SVN_REV			= "r1573601";
+DL_BETA.REL_DATE		= "2014-Mar-10";
+DL_BETA.ACTIVE			= -1;		// 1 = activate download, 0 = display "coming soon", -1 = display
nothing
 
 // Only used in "all_beta.html".
-var BETA_PLATFORM		= [ "Win_x86", "Linux_x86_rpm", "Linux_x86_deb", "Linux_x86-64_rpm", "Linux_x86-64_deb",
+DL_BETA.PLATFORM		= [ "Win_x86", "Linux_x86_rpm", "Linux_x86_deb", "Linux_x86-64_rpm", "Linux_x86-64_deb",
 				    "MacOS_x86-64" ];
-var BETA_FULL_LANG		= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
+DL_BETA.FULL_LANG		= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
 				    "gl", "hi", "hu", "it", "ja", "km", "ko", "lt", "nb", "nl", "pl", "pt", "pt-BR",
 				    "ru", "sk", "sl", "sr", "sv", "ta", "th", "tr", "vi", "zh-CN", "zh-TW" ];
-var BETA_LP_LANG		= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
+DL_BETA.LP_LANG			= [ "ast", "bg", "cs", "da", "de", "el", "en-GB", "en-US", "es", "eu",
"fi", "fr", "gd",
 				    "gl", "hi", "hu", "it", "ja", "km", "ko", "lt", "nb", "nl", "pl", "pt", "pt-BR",
 				    "ru", "sk", "sl", "sr", "sv", "ta", "th", "tr", "vi", "zh-CN", "zh-TW" ];
-var BETA_SDK_LANG		= [ "en-US" ];
+DL_BETA.SDK_LANG		= [ "en-US" ];
 
 // Base URLs to the Sourceforge and Apache mirror server.
-var BETA_SOURCEFORGE		= "http://sourceforge.net/projects/openofficeorg.mirror/files/milestones/"
+ BETA_VERSION;
-var BETA_SOURCEFORGE		= BETA_SOURCEFORGE + "/binaries/";
-var BETA_ASF			= "http://www.apache.org/dyn/aoo-closer.cgi/openoffice/"		   + BETA_VERSION;
-var BETA_ASF_DIST		= "http://www.apache.org/dist/openoffice/"				   + BETA_VERSION;
-var BETA_ASF_ARC		= "http://archive.apache.org/dist/openoffice/"				   + BETA_VERSION;
+DL_BETA.SOURCEFORGE		= "http://sourceforge.net/projects/openofficeorg.mirror/files/milestones/"
+ DL_BETA.VERSION;
+DL_BETA.SOURCEFORGE		= DL_BETA.SOURCEFORGE + "/binaries/";
+DL_BETA.ASF			= "http://www.apache.org/dyn/aoo-closer.cgi/openoffice/"		   + DL_BETA.VERSION;
+DL_BETA.ASF_DIST		= "http://www.apache.org/dist/openoffice/"				   + DL_BETA.VERSION;
+DL_BETA.ASF_ARC			= "http://archive.apache.org/dist/openoffice/"				   + DL_BETA.VERSION;
 
 // Debug: Uncomment to use different base URLs.
-// var PEOPLE_BASE_URL		= "http://people.apache.org/~marcus/aoo/"				   + VERSION;
+// var DL.PEOPLE_BASE_URL	= "http://people.apache.org/~marcus/aoo/"				   + DL.VERSION;
+
+DL.RELEASE_MODE			= 1;
 
-var RELEASE_MODE		= 1;
-var LANG_ISO, LANG_SEL, UI_PLATFORM_NO_SUP, PLATFORM_SEL, VERSION_SEL, UI_PLATFORM, PLATFORM,
PLATFORM_FULL, PLATFORM_LP,
-    RELEASE_PLATFORM, RELEASE_LANG, REL_TEXT, REL_NOTES, FILENAME_FULL, FILENAME_LP, EXTENSION,
SOURCEFORGE_BASE_URL,
-    SOURCEFORGE_PREV_URL, ASF_ARC_BASE_URL, ASF_ARC_PREV_URL, ASF_WIKI_URL, LINK_FULL, LINK_LP,
LINK_CHK_KEYS,
-    LINK_CHK_ASC_FULL, LINK_CHK_MD5_FULL, LINK_CHK_SHA256_FULL, LINK_CHK_ASC_LP, LINK_CHK_MD5_LP,
LINK_CHK_SHA256_LP = "";
-var RELEASE_PLATFORM_POS_FULL, RELEASE_PLATFORM_POS_LP, FILESIZE_FULL, FILESIZE_LP = -1;
-var SHOW_SUB_BOX		= true;
-var ERROR			= false;
-var element_ids_sub_box, element_ids_links = "";
+DL.LANG_ISO, DL.LANG_SEL, DL.UI_PLATFORM_NO_SUP, DL.PLATFORM_SEL, DL.VERSION_SEL, DL.UI_PLATFORM,
DL.PLATFORM,
+DL.PLATFORM_FULL, DL.PLATFORM_LP, DL.RELEASE_PLATFORM, DL.RELEASE_LANG, DL.REL_TEXT, DL.REL_NOTES,
DL.FILENAME_FULL,
+DL.FILENAME_LP, DL.EXTENSION, DL.SOURCEFORGE_BASE_URL, DL.SOURCEFORGE_PREV_URL, DL.ASF_ARC_BASE_URL,
DL.ASF_ARC_PREV_URL,
+DL.ASF_WIKI_URL, DL.LINK_FULL, DL.LINK_LP, DL.LINK_CHK_KEYS, DL.LINK_CHK_ASC_FULL, DL.LINK_CHK_MD5_FULL,
+DL.LINK_CHK_SHA256_FULL, DL.LINK_CHK_ASC_LP, DL.LINK_CHK_MD5_LP,
+DL.LINK_CHK_SHA256_LP		= "";
+
+DL.RELEASE_PLATFORM_POS_FULL, DL.RELEASE_PLATFORM_POS_LP, DL.FILESIZE_FULL,
+DL.FILESIZE_LP			= -1;
+
+DL.SHOW_SUB_BOX			= true;
+DL.ERROR			= false;
+DL.ID_SUB_BOX			= "";
+DL.ID_LINKS			= "";
 



Mime
View raw message