incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus (OOo)" <marcus.m...@wtnet.de>
Subject Re: svn commit: r1351123 - in /incubator/ooo/ooo-site/trunk/content/download: download_improved.js download_mirrorbrain_improved.js index.html
Date Mon, 18 Jun 2012 20:09:03 GMT
Am 06/17/2012 07:24 PM, schrieb Marcus (OOo):
> It seems the staging builder is not working at the moment. After some
> commits no additional mail to ooo-commits@ about a staging build. And
> when brwosing to the respective staged webpage it's still the old one.
>
> However, when editing the respective file (via CMS or comamndline) I get
> the updated one.

Staging and building seems to work again.

Thanks whoever has done the fix.

Marcus



> Am 06/17/2012 06:32 PM, schrieb marcus@apache.org:
>> Author: marcus
>> Date: Sun Jun 17 16:32:47 2012
>> New Revision: 1351123
>>
>> URL: http://svn.apache.org/viewvc?rev=1351123&view=rev
>> Log:
>> Reduced the number of function calls, instead use more variables to
>> store the result after the function was called the first time
>>
>> Modified:
>> incubator/ooo/ooo-site/trunk/content/download/download_improved.js
>> incubator/ooo/ooo-site/trunk/content/download/download_mirrorbrain_improved.js
>>
>> incubator/ooo/ooo-site/trunk/content/download/index.html
>>
>> Modified:
>> incubator/ooo/ooo-site/trunk/content/download/download_improved.js
>> URL:
>> http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_improved.js?rev=1351123&r1=1351122&r2=1351123&view=diff
>>
>> ==============================================================================
>>
>> --- incubator/ooo/ooo-site/trunk/content/download/download_improved.js
>> (original)
>> +++ incubator/ooo/ooo-site/trunk/content/download/download_improved.js
>> Sun Jun 17 16:32:47 2012
>> @@ -342,22 +342,27 @@ function getArray( nl_language ) {
>> // choose default for none given region code
>> thisLanguage = thisLanguageSet[ "-" ];
>> };
>> + LANG_ARRAY = thisLanguage;
>> return thisLanguage;
>> }
>>
>> /*
>> * get the language name to show in the green box in en-US or in native
>> language
>> + *
>> + * old code, can be deleted when it's sure it's working without it
>> for a longer time
>> */
>> function getLanguage( nl_language ) {
>> - var a = getArray( nl_language );
>> + // var a = getArray( nl_language );
>> + var a = LANG_ARRAY;
>>
>> - if ( a[ 1 ].indexOf( "English" )> -1 ) {
>> + if ( LANG_ARRAY[ 1 ].indexOf( "English" )> -1 ) {
>> // Return language name in en-US
>> - return a[ 1 ];
>> + return LANG_ARRAY[ 1 ];
>> } else {
>> // Return the native language name
>> - return a[ 2 ];
>> + return LANG_ARRAY[ 2 ];
>> }
>> + alert ( LANG_ARRAY );
>> }
>>
>> /*
>> @@ -421,22 +426,18 @@ function getLanguageISO( nl_language ) {
>> * depends on array-list
>> */
>> function hasMirrorLink( nl_language ) {
>> - var a = getArray( nl_language );
>> - var platform = getPlatform( SCHEMA );
>> -
>> // alert ("schema: -" + schema +"-");
>> - if ( SCHEMA == "aoo" ) {
>> - platform = getPlatform( SCHEMA );
>> - }
>> -
>> + // if ( SCHEMA == "aoo" )
>> + // platform = getPlatform( SCHEMA );
>> +
>> // alert ("Platform: -" + platform +"-");
>> // first check for availability
>> - if ( platform == "none" ) {
>> + // if ( platform == "none" ) {
>> + if ( PLATFORM == "none" )
>> return false;
>> - }
>>
>> // Check the flag in "languages.js", 'y' -> provide download link, 'n'
>> -> redirect to alternative webpage
>> - if ( a[ 4 ] == 'y' ) {
>> + if ( LANG_ARRAY[ 4 ] == 'y' ) {
>> return true;
>> } else {
>> return false;
>> @@ -495,17 +496,17 @@ function apache_getLink( version, nl_lan
>> * depending on which install file was recognized and assembled
>> */
>> function apache_getChecksum( version, nl_language, schema, hash ) {
>> - var filename = mirrorbrain_getFileName( version, nl_language, schema
>> ) + "." + hash;
>> + var filename = mirrorbrain_getFilename( version, nl_language, schema
>> ) + "." + hash;
>>
>> if ( nl_language != "" )
>> - language = nl_language;
>> + LANG_ISO = nl_language;
>> else
>> - language = getLanguageISO( nl_language );
>> + LANG_ISO = getLanguageISO( nl_language );
>>
>> - if ( language == "en-US" )
>> + if ( LANG_ISO == "en-US" )
>> var link = MIRROR_APACHE_DIST_URL + APACHE_SUFFIX_STABLE + version + "/";
>> else
>> - var link = MIRROR_APACHE_DIST_URL + APACHE_SUFFIX_LOC + language +
>> "/" + version + "/";
>> + var link = MIRROR_APACHE_DIST_URL + APACHE_SUFFIX_LOC + LANG_ISO +
>> "/" + version + "/";
>>
>> return link + filename;
>> }
>> @@ -518,74 +519,76 @@ function getPlatform( schema ) {
>> if ( schema == "aoo" ) {
>> if ( navigator.platform != null&& String( navigator.platform ) != "" ) {
>> if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
>> - return "Windows (MSI)";
>> + PLATFORM = "Windows (MSI)";
>> } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
>> - return "Windows (MSI)";
>> + PLATFORM = "Windows (MSI)";
>> } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
>> - return "Windows (MSI)";
>> + PLATFORM = "Windows (MSI)";
>> } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
>> if ( navigator.platform.indexOf( "64" ) != -1 ) {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux Debian 64-bit (DEB)";
>> + PLATFORM = "Linux Debian 64-bit (DEB)";
>> } else {
>> - return "Linux 64-bit (RPM)";
>> + PLATFORM = "Linux 64-bit (RPM)";
>> }
>> } else {
>> - return "Linux 64-bit (RPM)";
>> + PLATFORM = "Linux 64-bit (RPM)";
>> }
>> } else {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux Debian 32-Bit (DEB)";
>> + PLATFORM = "Linux Debian 32-Bit (DEB)";
>> } else {
>> - return "Linux 32-Bit (RPM)";
>> + PLATFORM = "Linux 32-Bit (RPM)";
>> }
>> } else {
>> - return "Linux 32-Bit (RPM)";
>> + PLATFORM = "Linux 32-Bit (RPM)";
>> }
>> }
>> } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
>> - // return "Solaris x86 (PKG)";
>> - return "none";
>> + // PLATFORM = "Solaris x86 (PKG)";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
>> - // return "Solaris SPARC (PKG)";
>> - return "none";
>> + // PLATFORM = "Solaris SPARC (PKG)";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
>> - // return "Solaris SPARC (PKG)";
>> - return "none";
>> + // PLATFORM = "Solaris SPARC (PKG)";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "Intel" ) != -1 ) {
>> - return "Mac OS Intel (DMG)";
>> + PLATFORM = "Mac OS Intel (DMG)";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "PPC" ) != -1 ) {
>> - // return "Mac OS PPC (DMG)";
>> - return "none";
>> + // PLATFORM = "Mac OS PPC (DMG)";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
>> - return "Mac OS Intel (DMG)";
>> + PLATFORM = "Mac OS Intel (DMG)";
>>
>> // this code will redirect the iPad, iPhone and iPod entries
>> } else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
>> navigator.platform.indexOf( "iPhone" ) != -1 ||
>> navigator.platform.indexOf( "iPod" ) != -1 ) {
>> - return "none";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "Series60" ) != -1 ) {
>> - return "none";
>> + PLATFORM = "none";
>> } else if ( navigator.platform.indexOf( "null" ) != -1 ) {
>> - return "none";
>> + PLATFORM = "none";
>> } else {
>> // no platform was recognized
>> - return "none";
>> + PLATFORM = "none";
>> }
>> }
>> + } else {
>> + // if navigator.platform is null or empty
>> + // and if no schema is set, fall through if nothing else works
>> + PLATFORM = "none";
>> }
>> - // if navigator.platform is null or empty
>> - // and if no schema is set, fall through if nothing else works
>> - return "none";
>> + return PLATFORM;
>> }
>>
>> function continueToDownload( uri ) {
>> @@ -601,9 +604,7 @@ function openItem( itemid, uri ) {
>> itemid=="optionitem5" ||
>> itemid=="optionitem6" ||
>> itemid=="optionitem7" ||
>> - itemid=="optionitem8" )&&
>> -
>> - uri.indexOf( MIRROR_MIRRORBRAIN_URL )> -1 ) {
>> + itemid=="optionitem8" )&& uri.indexOf( MIRROR_MIRRORBRAIN_URL )> -1
) {
>>
>> uri = uri.replace( MIRROR_MIRRORBRAIN_URL, "");
>> uri =
>> "http://download.openoffice.org/contribute.html?download=mirrorbrain&"
>> + escape( uri );
>>
>> Modified:
>> incubator/ooo/ooo-site/trunk/content/download/download_mirrorbrain_improved.js
>>
>> URL:
>> http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/download_mirrorbrain_improved.js?rev=1351123&r1=1351122&r2=1351123&view=diff
>>
>> ==============================================================================
>>
>> ---
>> incubator/ooo/ooo-site/trunk/content/download/download_mirrorbrain_improved.js
>> (original)
>> +++
>> incubator/ooo/ooo-site/trunk/content/download/download_mirrorbrain_improved.js
>> Sun Jun 17 16:32:47 2012
>> @@ -2,7 +2,7 @@
>> * Overview of all functions defined below
>> * function mirrorbrain_getLink ( version, nl_language, schema )
>> * function mirrorbrain_getVersionForDownloadFolder ( version )
>> - * function mirrorbrain_getFileName ( version, nl_language, schema )
>> + * function mirrorbrain_getFilename ( version, nl_language, schema )
>> * function mirrorbrain_getPlatformForMirror ( nl_language, schema )
>> * function mirrorbrain_getExtension ( nl_language, schema )
>> */
>> @@ -12,16 +12,17 @@
>> * depends on array-list
>> */
>> function mirrorbrain_getLink( version, nl_language, schema ) {
>> - var a = getArray( nl_language );
>> - var platform = getPlatform( schema );
>> - var link = null;
>> - var language = nl_language;
>> + var LANG_ARRAY = getArray( nl_language );
>> + var LANG_ISO = getLanguageISO( nl_language );
>> + var link = "";
>> + var language = nl_language;
>>
>> if ( schema == "aoo" )
>> platform = getPlatform( schema );
>>
>> if ( language == "" )
>> - language = getLanguageISO( nl_language );
>> + // language = getLanguageISO( nl_language );
>> + language = LANG_ISO;
>>
>> // if we don't support platform, we should send them to other.html,
>> ok, taken care of in hasMirrorLink()
>> // not the right place really but ???
>> @@ -35,7 +36,7 @@ function mirrorbrain_getLink( version, n
>> } else {
>> link = link + "localized/" + language + "/" + version + "/";
>> }
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == OLD_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/";
>> if ( language == "en-US" ) {
>> @@ -43,22 +44,22 @@ function mirrorbrain_getLink( version, n
>> } else {
>> link = link + "localized/" + language + "/" + version + "/";
>> }
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == RC_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/extended/" +
>> mirrorbrain_getVersionForDownloadFolder( version ) + "/";
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == BETA_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/extended/" + version + "/";
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == DEV1_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version
>> + "/";
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == DEV2_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version
>> + "/";
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == DEVB_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/extended/developer/" + version
>> + "/";
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> } else if ( version == TEST_VERSION ) {
>> link = MIRROR_MIRRORBRAIN_URL + "files/";
>> if ( language == "en-US" ) {
>> @@ -66,137 +67,137 @@ function mirrorbrain_getLink( version, n
>> } else {
>> link = link + "localized/" + language + "/" + version + "/";
>> }
>> - return link + mirrorbrain_getFileName( version, language, schema );
>> + link = link + mirrorbrain_getFilename( version, language, schema );
>> }
>> - // error
>> - return "no_link";
>> } else {
>> // The following lines are no longer valid and commented out as the
>> porting is done
>> // and Mac an official build
>> // if ( platform.indexOf( "Mac" ) != -1 ) {
>> // send MAC requests to porting.o.o
>> - // return "http://porting.openoffice.org/mac/download/";
>> + // link = "http://porting.openoffice.org/mac/download/";
>> // } else {
>> // use direct link
>> - // return a[ 2 ];
>> + // link = LANG_ARRAY[ 2 ];
>> // }
>> - return a[ 3 ];
>> + link = LANG_ARRAY[ 3 ];
>> }
>> + return link;
>> }
>>
>> /*
>> * method trim timestamp from version, required for RC
>> */
>> function mirrorbrain_getVersionForDownloadFolder( version ) {
>> - var s = null;
>> - if ( version.indexOf( "_" )> -1 ) {
>> + var s = "";
>> + var ver = "";
>> + if ( version.indexOf( "_" )> -1 )
>> s = version.split( "_" )[0];
>> - } else {
>> + else
>> s = version;
>> - }
>>
>> - if ( version == VERSION ) {
>> - return version;
>> - } else if ( version == OLD_VERSION ) {
>> - return version;
>> - } else if ( version == RC_VERSION ) {
>> - return s;
>> - } else if ( version == BETA_VERSION ) {
>> - return version;
>> - } else if ( version == DEV1_VERSION ) {
>> - return version;
>> - } else if ( version == DEV2_VERSION ) {
>> - return version;
>> - } else if ( version == TEST_VERSION ) {
>> - return version;
>> - }
>> - // error
>> - return "no_version";
>> + if ( version == VERSION )
>> + ver = version;
>> + else if ( version == OLD_VERSION )
>> + ver = version;
>> + else if ( version == RC_VERSION )
>> + ver = s;
>> + else if ( version == BETA_VERSION )
>> + ver = version;
>> + else if ( version == DEV1_VERSION )
>> + ver = version;
>> + else if ( version == DEV2_VERSION )
>> + ver = version;
>> + else if ( version == TEST_VERSION )
>> + ver = version;
>> + else
>> + ver = "no_version";
>> +
>> + alert( version );
>> +
>> + return ver;
>> }
>>
>> -function mirrorbrain_getFileName( version, nl_language, schema ) {
>> - var a = getArray( nl_language );
>> - var platform = getPlatform( schema );
>> - var fileName = null;
>> +function mirrorbrain_getFilename( version, nl_language, schema ) {
>> + var filename = "";
>> var language = nl_language;
>>
>> if ( language == "" )
>> - language = getLanguageISO( nl_language );
>> + language = LANG_ISO;
>>
>> if ( hasMirrorLink() ) {
>> // use mirror link
>> if ( schema == "ooo" ) {
>> if ( version == VERSION ) {
>> - fileName = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == OLD_VERSION ) {
>> - fileName = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == RC_VERSION ) {
>> - fileName = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == BETA_VERSION ) {
>> - fileName = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == DEV1_VERSION ) {
>> - fileName = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == DEV2_VERSION ) {
>> - fileName = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == DEVB_VERSION ) {
>> - fileName = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo-Dev_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else if ( version == TEST_VERSION ) {
>> - fileName = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "OOo_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else {
>> - fileName = "no_ooo_filename";
>> + filename = "no_ooo_filename";
>> }
>> } else if (schema == "aoo") {
>> if ( version == VERSION ) {
>> - fileName = "Apache_OpenOffice_incubating_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> + filename = "Apache_OpenOffice_incubating_" + version + "_" +
>> mirrorbrain_getPlatformForMirror( language, schema ) + "_" + language
>> + mirrorbrain_getExtension( language, schema );
>> } else {
>> - fileName = "no_aoo_filename";
>> + filename = "no_aoo_filename";
>> }
>> } else {
>> - return "no_generic_filename";
>> + filename = "no_generic_filename";
>> }
>> - return fileName;
>> }
>> // error
>> - return "no_generic_filename";
>> + return filename;
>> }
>>
>> /*
>> * get platform for mirror-link
>> */
>> function mirrorbrain_getPlatformForMirror( nl_language, schema ) {
>> - var a = getArray( nl_language );
>> + var mirror_platform = "";
>> +
>> if ( navigator.platform != null&& String( navigator.platform ) != "" ) {
>> if ( schema == "ooo" ) {
>> if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
>> if ( navigator.platform.indexOf( "64" ) != -1 ) {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86-64_install-deb";
>> + mirror_platform = "Linux_x86-64_install-deb";
>> } else {
>> - return "Linux_x86-64_install-rpm";
>> + mirror_platform = "Linux_x86-64_install-rpm";
>> }
>> } else {
>> - return "Linux_x86-64_install-rpm";
>> + mirror_platform = "Linux_x86-64_install-rpm";
>> }
>> } else {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86_install-deb";
>> + mirror_platform = "Linux_x86_install-deb";
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> }
>>
>> @@ -204,66 +205,66 @@ function mirrorbrain_getPlatformForMirro
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86_install-deb";
>> + mirror_platform = "Linux_x86_install-deb";
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
>> - return "Solaris_x86_install";
>> + mirror_platform = "Solaris_x86_install";
>> } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
>> - return "Solaris_Sparc_install";
>> + mirror_platform = "Solaris_Sparc_install";
>> } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
>> - return "Solaris_Sparc_install";
>> + mirror_platform = "Solaris_Sparc_install";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "Intel" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "PPC" ) != -1 ) {
>> - return "MacOS_PPC_install";
>> + mirror_platform = "MacOS_PPC_install";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> // testing if this code will help to redirect the iPad, iPhone, iPod
>> entries
>> } else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
>> navigator.platform.indexOf( "iPhone" ) != -1 ||
>> navigator.platform.indexOf( "iPod" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> } else {
>> - return "no_ooo_platform";
>> + mirror_platform = "no_ooo_platform";
>> }
>> } else if (schema == "aoo") {
>> if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
>> - return "Win_x86_install";
>> + mirror_platform = "Win_x86_install";
>> } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
>> if ( navigator.platform.indexOf( "64" ) != -1 ) {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86-64_install-deb";
>> + mirror_platform = "Linux_x86-64_install-deb";
>> } else {
>> - return "Linux_x86-64_install-rpm";
>> + mirror_platform = "Linux_x86-64_install-rpm";
>> }
>> } else {
>> - return "Linux_x86-64_install-rpm";
>> + mirror_platform = "Linux_x86-64_install-rpm";
>> }
>> } else {
>> if ( navigator.userAgent != null ) {
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86_install-deb";
>> + mirror_platform = "Linux_x86_install-deb";
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> }
>>
>> @@ -271,79 +272,81 @@ function mirrorbrain_getPlatformForMirro
>> if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 ||
>> navigator.userAgent.toLowerCase().indexOf( "iceweasel" ) != -1 ) {
>> - return "Linux_x86_install-deb";
>> + mirror_platform = "Linux_x86_install-deb";
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> } else {
>> - return "Linux_x86_install-rpm";
>> + mirror_platform = "Linux_x86_install-rpm";
>> }
>> /*} else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
>> - return "Solaris_x86_install";
>> + mirror_platform = "Solaris_x86_install";
>> } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
>> - return "Solaris_Sparc_install";
>> + mirror_platform = "Solaris_Sparc_install";
>> } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
>> - return "Solaris_Sparc_install";*/
>> + mirror_platform = "Solaris_Sparc_install";*/
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "Intel" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> /*} else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "PPC" ) != -1 ) {
>> - return "MacOS_PPC_install";*/
>> + mirror_platform = "MacOS_PPC_install";*/
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> // testing if this code will help to redirect the iPad, iPhone, iPod
>> entries
>> } else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
>> navigator.platform.indexOf( "iPhone" ) != -1 ||
>> navigator.platform.indexOf( "iPod" ) != -1 ) {
>> - return "MacOS_x86_install";
>> + mirror_platform = "MacOS_x86_install";
>> } else {
>> - return "no_aoo_platform";
>> + mirror_platform = "no_aoo_platform";
>> }
>> }
>> } else {
>> // return a dummy value if navigator.platform is null or empty
>> regardless of schema
>> - return "no_generic_platform";
>> + mirror_platform = "no_generic_platform";
>> }
>> + return mirror_platform;
>> }
>>
>> /*
>> * get extension for mirror-link
>> */
>> function mirrorbrain_getExtension( nl_language, schema ) {
>> - var a = getArray( nl_language );
>> + mirror_ext = "";
>> +
>> if ( navigator.platform != null ) {
>> if ( navigator.platform.indexOf( "Win32" ) != -1 ) {
>> - return ".exe";
>> + mirror_ext = ".exe";
>> } else if ( navigator.platform.indexOf( "Win64" ) != -1 ) {
>> - return ".exe";
>> + mirror_ext = ".exe";
>> } else if ( navigator.platform.indexOf( "Win" ) != -1 ) {
>> - return ".exe";
>> + mirror_ext = ".exe";
>> } else if ( navigator.platform.indexOf( "Linux" ) != -1 ) {
>> - return ".tar.gz";
>> + mirror_ext = ".tar.gz";
>> } else if ( navigator.platform.indexOf( "SunOS i86pc" ) != -1 ) {
>> - return ".tar.gz";
>> + mirror_ext = ".tar.gz";
>> } else if ( navigator.platform.indexOf( "SunOS sun4u" ) != -1 ) {
>> - return ".tar.gz";
>> + mirror_ext = ".tar.gz";
>> } else if ( navigator.platform.indexOf( "SunOS" ) != -1 ) {
>> - return ".tar.gz";
>> + mirror_ext = ".tar.gz";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "Intel" ) != -1 ) {
>> - return ".dmg";
>> + mirror_ext = ".dmg";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1&&
>> navigator.platform.indexOf( "PPC" ) != -1 ) {
>> - return ".dmg";
>> + mirror_ext = ".dmg";
>> } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
>> - return ".dmg";
>> + mirror_ext = ".dmg";
>> // this code provides working entries for iPad, iPhone, iPod
>> } else if ( navigator.platform.indexOf( "iPad" ) != -1 ||
>> navigator.platform.indexOf( "iPhone" ) != -1 ||
>> navigator.platform.indexOf( "iPod" ) != -1 ) {
>> - return ".dmg";
>> + mirror_ext = ".dmg";
>> } else {
>> - return "no_extension";
>> + mirror_ext = "no_extension";
>> }
>> }
>> - return "no_extension";
>> + return mirror_ext;
>> }
>>
>>
>> Modified: incubator/ooo/ooo-site/trunk/content/download/index.html
>> URL:
>> http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/content/download/index.html?rev=1351123&r1=1351122&r2=1351123&view=diff
>>
>> ==============================================================================
>>
>> --- incubator/ooo/ooo-site/trunk/content/download/index.html (original)
>> +++ incubator/ooo/ooo-site/trunk/content/download/index.html Sun Jun
>> 17 16:32:47 2012
>> @@ -45,28 +45,30 @@
>> <!--
>> // Set a specific language ISO code to force to assemble a certain
>> localized build as download URL
>> var NL_LANGUAGE = "";
>> - // Get the download URL
>> - var LINK = getLink( VERSION, NL_LANGUAGE, MIRROR, SCHEMA );
>> + // Set some variables
>> + var LINK = getLink( VERSION, NL_LANGUAGE, MIRROR, SCHEMA );
>> + var LANG_ARRAY = getArray( NL_LANGUAGE );
>> + var LANG_ISO = getLanguageISO( NL_LANGUAGE );
>> + var PLATFORM = getPlatform( SCHEMA );
>> +
>> + // alert( LANG_ISO );
>>
>> if ( hasMirrorLink( NL_LANGUAGE ) ) {
>> document.write( "<div class=\"first button green\" id=\"optionitem1\"
>> onclick=\"openItem('optionitem1','"
>> + LINK + "');" + "return false;\">" );
>> document.write( "<h2><a href='" + LINK + "' title='" + LINK +
>> "'>Download Apache OpenOffice " + VERSION + "</a></h2>"
>> + "<p><a href='" + LINK + "' title='" + LINK + "'>Click to start
>> downloading the most recent version for "
>> - + getPlatform( SCHEMA ) + " and " + getLanguage( NL_LANGUAGE ) + "."
>> + + PLATFORM + " and " + LANG_ARRAY[ 2 ] + "."
>> + "<br/></p>" );
>> } else {
>> // dump SF download and redirect to NL webpage (see URLs in
>> "languages.js") if no mirror link (hasMirrorLink() == false)
>> // Get first the array data for NL_LANGUAGE and then the redirect link
>> from the array data
>> - var a = getArray( NL_LANGUAGE );
>> - var OLANG = a[ 2 ];
>> - var OLINK = a[ 3 ];
>> -
>> document.write( "<div class=\"first button green\" id=\"optionitem1\"
>> onclick=\"openItem('optionitem1','"
>> - + OLINK + "');" + "return false;\">" );
>> - document.write( "<h2><a href='" + OLINK + "' title='" + OLINK +
>> "'>Download Apache OpenOffice " + VERSION + "</a></h2>"
>> - + "<p><a href='" + OLINK + "' title='" + OLINK + "'>A release for "
>> + OLANG + " is not available. "
>> - + "Please choose from the alternative download webpage for another
>> language.</a></p>" );
>> + + LANG_ARRAY[ 3 ] + "');" + "return false;\">" );
>> + document.write( "<h2><a href='" + LANG_ARRAY[ 3 ] + "' title='" +
>> LANG_ARRAY[ 3 ] + "'>Download Apache OpenOffice "
>> + + VERSION + "</a></h2>"
>> + + "<p><a href='" + LANG_ARRAY[ 3 ] + "' title='" + LANG_ARRAY[ 3 ] +
>> "'>A release for " + LANG_ARRAY[ 2 ]
>> + + " is not available. Please choose from the alternative download
>> webpage for another language.</a></p>" );
>> }
>>
>> document.write( "</div>" );
>> @@ -151,7 +153,8 @@
>>
>> <!-- Red: Developer Snapshots: No JavaScript enabled -->
>> <noscript>
>> -<div class="button orange" id="optionitem5"
>> onclick="openItem('optionitem5','https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+3.4+Unofficial+Developer+Snapshots');
>> return false;">
>> +<div class="button orange" id="optionitem5"
>> onclick="openItem('optionitem5',
>> +
>> 'https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+3.4+Unofficial+Developer+Snapshots');
>> return false;">
>> <h2><a
>> href="https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+3.4+Unofficial+Developer+Snapshots"
>>
>> title="Select from the most recent Apache OpenOffice Developer
>> Snapshots">
>> Get Apache OpenOffice Developer Snapshots</a></h2>

Mime
View raw message