Author: marcus
Date: Mon Sep  2 11:10:52 2013
New Revision: 1519387

URL: http://svn.apache.org/r1519387
Log:
Updates

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

Modified: openoffice/ooo-site/trunk/content/download/test/l10n/download.js
URL: 
http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/l10n/download.js?rev=1519387&r1=1519386&r2=1519387&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/test/l10n/download.js (original)
+++ openoffice/ooo-site/trunk/content/download/test/l10n/download.js Mon Sep  2 
11:10:52 2013
@@ -29,16 +29,6 @@ var CHECKSUM_SHA256                  = "";
 var ERROR                              = false;
 
 /*
- * Initialize the download script and set all global variables with data
- */
-function initializeDL() {
-       getLanguage();
-       getPlatform();
-       getFilesize();
-       getLink();
-}
-
-/*
  * Get array and ISO code for language
  * Depends on $NL_LANGUAGE
  */
@@ -150,7 +140,7 @@ function getLink() {
                if ( URL_PLATFORM == "" ) {
                        // If no platform was recognized, set the "other.html" 
webpage as alternative download URL
                        if ( UI_PLATFORM == "" ) {
-                               UI_PLATFORM = "an unknown platform/OS";
+                               UI_PLATFORM = unknown_platform;
                        }
                        LINK  = "http://www.openoffice.org/download/other.html";;
                        ERROR = true;
@@ -310,7 +300,7 @@ function getPlatform() {
        // If nothing was recognized until now, set $UI_PLATFORM to show it to 
the user
        if ( ! UI_PLATFORM ) {
                ERROR = true;
-               UI_PLATFORM = "an unknown platform/OS";
+               UI_PLATFORM = unknown_platform;
        }
        return;
 }
@@ -368,3 +358,112 @@ function openItem( itemid, uri ) {
        document.location = uri;
 }
 
+/*
+ * Write the green box for the One-Click-Download
+ */
+
+function writeGreenBox() {
+       // Get the download URL
+       var LINK = getLink();
+
+       if ( hasMirrorLink() ) {
+               if ( LINK.toLowerCase().indexOf( "sourceforge" ) != -1 ) {
+                       // Download directly from a mirror with displayed 
platform and language.
+                       document.write( "<div class='first button green' 
id='optionitem1'"
+                       + "onclick='openItem('optionitem1','" + LINK + "');" + 
"return false;'>" );
+                       document.write( "<h2>"
+                       + "<a href='" + LINK
+                       + "' title='Version " + VERSION + " - Milestone " + 
MILESTONE + " - Build ID " + BUILD
+                       + " - SVN " + SVN_REV + "'>"
+                       + green_box_1_headline + " " + VERSION
+                       + "</a>"
+                       + "</h2>"
+                       + "<p>"
+                       + "<a href='" + LINK
+                       + "' title='Version " + VERSION + " - Milestone " + 
MILESTONE + " - Build ID " + BUILD
+                       + " - SVN " + SVN_REV + "'>"
+                       + green_box_1_click + "<br />"
+                       + "<b>" + UI_PLATFORM + "</b> " + green_box_1_and + " 
<b>" + LANG_ARRAY[ 2 ] + "</b> "
+                       + "(~" + FILESIZE + " " + green_box_1_megabyte + ")"
+                       + "</a>"
+                       + "</p>");
+               } else {
+                       // OS and/or package manager was not recognized, 
therefore use "other.html" as download link.
+                       document.write( "<div class='first button green' 
id='optionitem1'"
+                       + "onclick='openItem('optionitem1','" + LINK + "');" + 
"return false;'>" );
+                       document.write( "<h2>"
+                       + "<a href='" + LINK
+                       + "' title='" + LINK + "'>"
+                       + green_box_2_headline + " " + VERSION
+                       + "</a>"
+                       + "</h2>"
+                       + "<p>"
+                       + "<a href='" + LINK
+                       + "' title='" + LINK + "'>"
+                       + green_box_2_no_build1 + " "
+                       + "<b>" + UI_PLATFORM + "</b>. " + green_box_2_no_build2
+                       + "</a>"
+                       + "</p>" );
+               }
+       } else {
+               // Download from an alternative webpage if hasMirrorLink() == 
false.
+               document.write( "<div class='first button green' 
id='optionitem1'"
+               + "onclick='openItem('optionitem1','" + LANG_ARRAY[ 3 ] + "');" 
+ "return false;'>" );
+               document.write( "<h2>"
+               + "<a href='" + LANG_ARRAY[ 4 ]
+               + "' title='" + LANG_ARRAY[ 4 ] + "'>"
+               + green_box_3_headline + " " + VERSION
+               + "</a>"
+               + "</h2>"
+               + "<p>"
+               + "<a href='" + LANG_ARRAY[ 4 ]
+               + "' title='" + LANG_ARRAY[ 4 ] + "'>"
+               + green_box_3_no_build1 + " "
+               + "<b>" + LANG_ARRAY[ 2 ] + " (" + LANG_ARRAY[ 1 ] + ")</b>. "
+               + green_box_3_no_build2
+               + "</a>"
+               + "</p>" );
+       }
+       document.write( "</div>" );
+
+       // Show some helpful links for SDK, source, checksums, release notes, 
legacy version.
+       document.write( "<div class='sub-green'>" );
+       document.write( "<p>" );
+       if ( CHECKSUM_ASC ) {
+               document.write( sub_green_box_hash_text + " "
+               + "<a href='" + CHECKSUM_KEYS   + "' + title='KEYS "   + 
sub_green_box_signature_title + "'>KEYS</a> , "
+               + "<a href='" + CHECKSUM_ASC    + "' + title='ASC "    + 
sub_green_box_signature_title + "'>ASC</a> , "
+               + "<a href='" + CHECKSUM_MD5    + "' + title='MD5 "    + 
sub_green_box_hash_title + "'>MD5</a> , "
+               + "<a href='" + CHECKSUM_SHA256 + "' + title='SHA256 " + 
sub_green_box_hash_title + "'>SHA256</a> , "
+               + "<a href='../checksums.html' "
+               + "title='" + sub_green_box_verify_title + "'>"
+               + sub_green_box_verify_text + "</a> | ");
+       }
+       document.write( "<a href='" + sub_green_box_release_notes_link + "' "
+       + "title='" + sub_green_box_release_notes_title + " " + VERSION + "?'>"
+       + sub_green_box_release_notes_text
+       + "</a> | <br />"
+       + "<a href='other.html' "
+       + "title='" + sub_green_box_other_title + "'>"
+       + "<b>" + sub_green_box_other_text + "</b>"
+       + "</a> | "
+       + "<a href='other.html#source' "
+       + "title='" + sub_green_box_source_title + "'>"
+       + sub_green_box_source_text
+       + "</a> | <br />"
+       + "<a href='../../porting/index.html' "
+       + "title='" + sub_green_box_ports_title + "'>"
+       + sub_green_box_ports_text
+       + "</a> | "
+       + sub_green_box_old_legacy_text + " "
+       + "<a href='other-341.html' "
+       + "title='" + sub_green_box_old_title + " " + OLDVERSION + "'><b>" + 
OLDVERSION + "</b>"
+       + "</a> + "
+       + "<a href='../legacy/index.html' "
+       + "title='" + sub_green_box_legacy_title + " "
+       + LEGACYVERSION + "'><b>" + LEGACYVERSION + "</b>"
+       + "</a>"
+       + "</p>"
+       + "</div>" );
+}
+


Reply via email to