Author: marcus Date: Mon Jun 2 19:33:33 2014 New Revision: 1599323 URL: http://svn.apache.org/r1599323 Log: Fixed error: Make a download possible when browsing from an unsupported platform but changing the platform manual via select box
Modified: openoffice/ooo-site/trunk/content/download/test/download_droplist.js Modified: openoffice/ooo-site/trunk/content/download/test/download_droplist.js URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/download_droplist.js?rev=1599323&r1=1599322&r2=1599323&view=diff ============================================================================== --- openoffice/ooo-site/trunk/content/download/test/download_droplist.js (original) +++ openoffice/ooo-site/trunk/content/download/test/download_droplist.js Mon Jun 2 19:33:33 2014 @@ -962,6 +962,11 @@ function showErrorMessage( error_text ) document.getElementById( "dl_err" ).style.cursor = "default"; document.getElementById( "dl_err" ).style.display = "inline-block"; + // Delete previously set string to get the possibility back to choose a different platform + // and then to assemble a new download link. + UI_PLATFORM_NO_SUP = ""; + + // Set some error flags. SF = false; OTHER = false; ARCHIVE = false; @@ -1203,7 +1208,7 @@ function getLinkSel() { } */ // If recognized platform is not Windows, Linux or Mac, show the none-availability to the user. - if( UI_PLATFORM_NO_SUP !== "false" ) { + if( UI_PLATFORM_NO_SUP !== "" ) { // Show an error message that the chosen items do not lead to a download. error_text = "<b>Problem:</b> Apache OpenOffice " + VERSION_SEL + " is not available for <b>" + UI_PLATFORM_NO_SUP + "</b>." @@ -1410,7 +1415,7 @@ function getPlatform() { var ua = navigator.userAgent.toLowerCase(); // Get the User Agent string in lower cases. var av = navigator.appVersion.toLowerCase(); // Get the application version in lower cases. UI_PLATFORM = ""; // Delete previously set string. - UI_PLATFORM_NO_SUP = "false"; // Delete previously set string. + UI_PLATFORM_NO_SUP = ""; // Delete previously set string. PLATFORM = ""; // Delete previously set string. EXTENSION = ""; // Delete previously set string. @@ -1487,7 +1492,8 @@ function getPlatform() { if( os.indexOf( "x11" ) !== -1 ) UI_PLATFORM_NO_SUP = "unknown OS (X11 support)"; // If $UI_PLATFORM_NO_SUP is already filled, something was recognized and no more work is needed. - if( UI_PLATFORM_NO_SUP !== "false" ) + + if( UI_PLATFORM_NO_SUP !== "" ) return PLATFORM; // Windows?