Author: buildbot
Date: Fri Jun 20 22:02:35 2014
New Revision: 913116

Log:
Staging update by buildbot for ooo-site

Modified:
    websites/staging/ooo-site/trunk/cgi-bin/   (props changed)
    websites/staging/ooo-site/trunk/content/   (props changed)
    websites/staging/ooo-site/trunk/content/download/test/download.js

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jun 20 22:02:35 2014
@@ -1 +1 @@
-1603293
+1604285

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jun 20 22:02:35 2014
@@ -1 +1 @@
-1603293
+1604285

Modified: websites/staging/ooo-site/trunk/content/download/test/download.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/test/download.js (original)
+++ websites/staging/ooo-site/trunk/content/download/test/download.js Fri Jun 
20 22:02:35 2014
@@ -14,7 +14,7 @@
  * function setLangSel         ()
  * function setVerSel          ()
  * function resetElements      ()
- * function showWindow         ( target_url )
+ * function showWindow         ( target_link )
  * function showErrorMessage   ( error_text )
  * function isLangSupported    ()
  * function checkLinkExceptions ()
@@ -65,13 +65,13 @@ function initVars( init_all ) {
 
        // The following are used in "download.js". and "index.html".
 
-       // All elements with ID in the sub-green box.
-       element_ids_sub_green = [ "dl_rel_info", "dl_rel_notes", "dl_f_info", 
"dl_f_chk_keys", "space1", "dl_f_chk_asc",
+       // All elements with ID in the sub-box.
+       element_ids_sub_box = [ "dl_rel_info", "dl_rel_notes", "dl_f_info", 
"dl_f_chk_keys", "space1", "dl_f_chk_asc",
        "space2", "dl_f_chk_md5", "space3", "dl_f_chk_sha256", "dl_lp_info", 
"dl_lp_chk_keys", "space4", "dl_lp_chk_asc",
        "space5", "dl_lp_chk_md5", "space6", "dl_lp_chk_sha256", "dl_hlp_img", 
"dl_hlp", "dl_chk_img", "dl_chk",
        "dl_rpt_img", "dl_rpt" ];
 
-       // All elements with ID in the green and sub-green box that have a link.
+       // All elements with ID in the green and sub-box that have a link.
        element_ids_links = [ "dl_f_link", "dl_lp_link", "dl_f_chk_keys", 
"dl_f_chk_asc", "dl_f_chk_md5", "dl_f_chk_sha256",
        "dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", "dl_lp_chk_sha256", 
"dl_hlp", "dl_chk", "dl_rpt" ];
 
@@ -116,8 +116,8 @@ function initVars( init_all ) {
        LINK_CHK_ASC_LP                         = "";    // The ASC file as 
download URL (langpack).
        LINK_CHK_MD5_LP                         = "";    // The MD5 file as 
download URL (langpack).
        LINK_CHK_SHA256_LP                      = "";    // The SHA256 file as 
download URL (langpack).
-       SUPPORTED                               = false; // Are the selected 
options supported in general (true) or not (false)?
-       ERROR                                   = false; // Is the download URL 
in general correct (true) or not (false)?
+       SUB_BOX                                 = true; // Is the download URL 
OK to show the sub-box (true) or not (false)?
+       ERROR                                   = false; // Is the download URL 
in general OK (false) or not (true)?
 
        return;
 }
@@ -436,8 +436,8 @@ function getVerSel() {
 function resetElements() {
        // Change CSS styles for all elements with ID in the green and 
sub-green colored boxes.
        // Emtpy the values for all elements, make them invisible.
-       for( var i = 0, j = element_ids_sub_green.length; i < j; i++ ) {
-               document.getElementById( element_ids_sub_green[ i ] 
).style.display = "none";
+       for( var i = 0, j = element_ids_sub_box.length; i < j; i++ ) {
+               document.getElementById( element_ids_sub_box[ i ] 
).style.display = "none";
        }
 
        for( var i = 0, j = element_ids_links.length; i < j; i++ ) {
@@ -470,35 +470,33 @@ function showErrorMessage( error_text ) 
        resetElements();
 
        // Now set again the values for all elements that should be shown with 
changed data.
-       document.getElementById( "dl_f_link"     ).style.display        = 
"inline";
-       document.getElementById( "dl_f_link"     ).style.cursor         = 
"not-allowed";
-       document.getElementById( "dl_f_link"     ).href                 = 
"javascript:void( 0 )";
-       document.getElementById( "dl_f_link"     ).target               = "";
-       document.getElementById( "dl_f_link"     ).innerHTML            = 
l10n_download_full_link_error_text;
-       document.getElementById( "dl_f_link"     ).title                = 
l10n_download_full_link_error_title;
-       document.getElementById( "dl_lp_link"    ).style.display        = 
"inline";
-       document.getElementById( "dl_lp_link"    ).style.cursor         = 
"not-allowed";
-       document.getElementById( "dl_lp_link"    ).href                 = 
"javascript:void( 0 )";
-       document.getElementById( "dl_lp_link"    ).target               = "";
-       document.getElementById( "dl_lp_link"    ).innerHTML            = 
l10n_download_langpack_link_error_text;
-       document.getElementById( "dl_lp_link"    ).title                = 
l10n_download_langpack_link_error_title;
-
-       document.getElementById( "dl_err_img"    ).src                  = 
FILE_ERROR_IMG;
-       document.getElementById( "dl_err_img"    ).title                = 
l10n_download_error_problem_img_title;
-       document.getElementById( "dl_err_img"    ).alt                  = 
l10n_download_error_problem_img_alt;
-       document.getElementById( "dl_err_img"    ).style.display        = 
"inline-block";
-       document.getElementById( "dl_err"        ).innerHTML            = "<br 
/>" + error_text;
-       document.getElementById( "dl_err"        ).style.fontSize       = 
"1.2em";
-       document.getElementById( "dl_err"        ).style.cursor         = 
"default";
-       document.getElementById( "dl_err"        ).style.display        = 
"inline-block";
+       document.getElementById( "dl_f_link"    ).style.display  = "inline";
+       document.getElementById( "dl_f_link"    ).style.cursor   = 
"not-allowed";
+       document.getElementById( "dl_f_link"    ).href           = 
"javascript:void( 0 )";
+       document.getElementById( "dl_f_link"    ).innerHTML      = 
l10n_download_full_link_error_text;
+       document.getElementById( "dl_f_link"    ).title          = 
l10n_download_full_link_error_title;
+       document.getElementById( "dl_lp_link"   ).style.display  = "inline";
+       document.getElementById( "dl_lp_link"   ).style.cursor   = 
"not-allowed";
+       document.getElementById( "dl_lp_link"   ).href           = 
"javascript:void( 0 )";
+       document.getElementById( "dl_lp_link"   ).innerHTML      = 
l10n_download_langpack_link_error_text;
+       document.getElementById( "dl_lp_link"   ).title          = 
l10n_download_langpack_link_error_title;
+
+       document.getElementById( "dl_err_img"   ).src            = 
FILE_ERROR_IMG;
+       document.getElementById( "dl_err_img"   ).title          = 
l10n_download_error_problem_img_title;
+       document.getElementById( "dl_err_img"   ).alt            = 
l10n_download_error_problem_img_alt;
+       document.getElementById( "dl_err_img"   ).style.display  = 
"inline-block";
+       document.getElementById( "dl_err"       ).innerHTML      = "<br />" + 
error_text;
+       document.getElementById( "dl_err"       ).style.fontSize = "1.2em";
+       document.getElementById( "dl_err"       ).style.cursor   = "default";
+       document.getElementById( "dl_err"       ).style.display  = 
"inline-block";
 
-       document.getElementById( "sub_green_box" ).className            = 
"sub-green-sel_error";
-       document.getElementById( "sub_green_box" ).style.display        = 
"block";
+       document.getElementById( "sub_box"      ).className      = 
"sub-green-sel_error";
+       document.getElementById( "sub_box"      ).style.display  = "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 = "";
-       SUPPORTED          = false;
+       SUB_BOX            = true;
        ERROR              = true;
        return ERROR;
 }
@@ -546,6 +544,8 @@ function checkLinkExceptions() {
        // If recognized platform is not Windows, Linux or Mac, show the 
none-availability to the user.
 
        var error_text = "";
+       SUB_BOX        = true;
+       ERROR          = false;
 
        // If language is not supported, show the none-availability to the user.
        if( ! isLangSupported() ) {
@@ -594,23 +594,37 @@ function checkLinkExceptions() {
                showErrorMessage( error_text );
        }
 
+       // If version is '3.4.1', create a download link that leads to the 
"other-3.4.1.html" webpage.
+       if( VERSION_SEL === "3.4.1" ) {
+               // In general, reset the data for link, text and title of all 
elements.
+               resetElements();
+
+               // Set the values for the single download text button.
+               document.getElementById( "dl_f_link"    ).href          = 
l10n_download_aoo341_link;
+               document.getElementById( "dl_f_link"    ).innerHTML     = 
l10n_download_full_link_archive_text;
+               document.getElementById( "dl_f_link"    ).title         = 
l10n_download_full_link_archive_title;
+               document.getElementById( "dl_f_link"    ).style.cursor  = 
"pointer";
+               document.getElementById( "dl_f_link"    ).style.display = 
"inline";
+               document.getElementById( "dl_lp_link"   ).style.display = 
"none";
+               document.getElementById( "sub_box"      ).style.display = 
"none";
+
+               SUB_BOX = false;
+       }
        // If platform is 'other', create a download link that leads to the 
Porting webpage.
        if( PLATFORM_SEL === "other" ) {
                // In general, reset the data for link, text and title of all 
elements.
                resetElements();
 
                // Set the values for the single download text button.
-               document.getElementById( "dl_f_link"     ).href          = 
l10n_download_porting_link;
-               document.getElementById( "dl_f_link"     ).target        = 
"_blank";
-               document.getElementById( "dl_f_link"     ).innerHTML     = 
l10n_download_full_link_porting_text;
-               document.getElementById( "dl_f_link"     ).title         = 
l10n_download_full_link_porting_title;
-               document.getElementById( "dl_f_link"     ).style.cursor  = 
"pointer";
-               document.getElementById( "dl_f_link"     ).style.display = 
"inline";
-               document.getElementById( "dl_lp_link"    ).style.display = 
"none";
-               document.getElementById( "sub_green_box" ).style.display = 
"none";
+               document.getElementById( "dl_f_link"    ).href          = 
l10n_download_porting_link;
+               document.getElementById( "dl_f_link"    ).innerHTML     = 
l10n_download_full_link_porting_text;
+               document.getElementById( "dl_f_link"    ).title         = 
l10n_download_full_link_porting_title;
+               document.getElementById( "dl_f_link"    ).style.cursor  = 
"pointer";
+               document.getElementById( "dl_f_link"    ).style.display = 
"inline";
+               document.getElementById( "dl_lp_link"   ).style.display = 
"none";
+               document.getElementById( "sub_box"      ).style.display = 
"none";
 
-               SUPPORTED = true;
-               ERROR     = false;
+               SUB_BOX = false;
        }
 
        // If version is 'older', create a download link that leads to the 
archive webpage.
@@ -619,24 +633,16 @@ function checkLinkExceptions() {
                resetElements();
 
                // Set the values for the single download text button.
-               document.getElementById( "dl_f_link"     ).href          = 
l10n_download_archive_link;
-               document.getElementById( "dl_f_link"     ).target        = 
"_blank";
-               document.getElementById( "dl_f_link"     ).innerHTML     = 
l10n_download_full_link_archive_text;
-               document.getElementById( "dl_f_link"     ).title         = 
l10n_download_full_link_archive_title;
-               document.getElementById( "dl_f_link"     ).style.cursor  = 
"pointer";
-               document.getElementById( "dl_f_link"     ).style.display = 
"inline";
-               document.getElementById( "dl_lp_link"    ).style.display = 
"none";
-               document.getElementById( "sub_green_box" ).style.display = 
"none";
-
-               SUPPORTED = true;
-               ERROR     = false;
-       }
-
-       // If until now an error occurred then assume that the selected options 
are not supported.
-       if( ERROR )
-               SUPPORTED = false;
-       else
-               SUPPORTED = true;
+               document.getElementById( "dl_f_link"    ).href          = 
l10n_download_archive_link;
+               document.getElementById( "dl_f_link"    ).innerHTML     = 
l10n_download_full_link_archive_text;
+               document.getElementById( "dl_f_link"    ).title         = 
l10n_download_full_link_archive_title;
+               document.getElementById( "dl_f_link"    ).style.cursor  = 
"pointer";
+               document.getElementById( "dl_f_link"    ).style.display = 
"inline";
+               document.getElementById( "dl_lp_link"   ).style.display = 
"none";
+               document.getElementById( "sub_box"      ).style.display = 
"none";
+
+               SUB_BOX = false;
+       }
 
        return ERROR;
 }
@@ -657,9 +663,9 @@ function getLinkSel() {
        // First check for expections that do not lead to real download links.
        checkLinkExceptions();
 
-       // If selected options lead to an exception (VERSION_SEL = "older" OR 
SUPPORTED = FALSE)
-       // then do not overwrite current download links.
-       if( VERSION_SEL !== "older" && SUPPORTED && ! ERROR ) {
+       // If the selected options lead to no download URL, should the sub-box 
shown anyway?
+       // Yes when SUB_BOX = "true" and ERROR = "false".
+       if( SUB_BOX && ! ERROR ) {
                // Assemble the filenames and text for download and checksums.
                getReleaseMatrixPos();
                getFileData( VERSION_SEL );
@@ -680,7 +686,7 @@ function getLinkSel() {
                LINK_CHK_MD5_LP      = ASF_ARC_BASE_URL  + "/binaries/"   + 
LANG_SEL + "/" + FILENAME_LP   + ".md5";
                LINK_CHK_SHA256_LP   = ASF_ARC_BASE_URL  + "/binaries/"   + 
LANG_SEL + "/" + FILENAME_LP   + ".sha256";
 
-               SUPPORTED            = true;
+               SUB_BOX              = true;
                ERROR                = false;
 
                // Set the values for both download text buttons and set the 
focus to the "full install".
@@ -692,7 +698,7 @@ function getLinkSel() {
                document.getElementById( "dl_lp_link"       ).innerHTML = 
l10n_download_langpack_link_text;
                document.getElementById( "dl_lp_link"       ).title     = 
l10n_download_langpack_link_title + FILENAME_LP;
 
-               // Set the values in the sub-green box for the 3 text lines.
+               // Set the values in the sub-box for the 3 text lines.
                document.getElementById( "dl_rel_info"      ).innerHTML = "<b>" 
+ l10n_download_rel_info_headline_text + "</b> " + REL_TEXT + " | ";
                document.getElementById( "dl_rel_notes"     ).href      = 
REL_NOTES;
                document.getElementById( "dl_rel_notes"     ).innerHTML = 
l10n_download_rel_notes_text;
@@ -730,7 +736,7 @@ function getLinkSel() {
                document.getElementById( "dl_lp_chk_sha256" ).innerHTML = 
l10n_download_checksum_sha256_text;
                document.getElementById( "dl_lp_chk_sha256" ).title     = 
l10n_download_checksum_sha256_title + FILENAME_LP;
 
-               // Set the values in the sub-green box below the 3 text lines.
+               // Set the values in the sub-box below the 3 text lines.
                document.getElementById( "dl_hlp_img"       ).src       = 
FILE_FULL_LP_IMG;
                document.getElementById( "dl_hlp_img"       ).title     = 
l10n_download_help_img_title;
                document.getElementById( "dl_hlp_img"       ).alt       = 
l10n_download_help_img_alt;
@@ -751,15 +757,15 @@ function getLinkSel() {
                document.getElementById( "dl_rpt"           ).title     = 
l10n_download_report_title;
 
                // Reset the CSS styles for the elements in the sub-green 
colored boxes.
-               document.getElementById( "sub_green_box"    ).className        
= "sub-green-sel";
+               document.getElementById( "sub_box"    ).className              
= "sub-green-sel";
                document.getElementById( "dl_err_img"       ).style.display    
= "none";
                document.getElementById( "dl_err"           ).style.display    
= "none";
 
                // Change CSS styles for all elements with ID in the green and 
sub-green colored boxes.
                // Set the cursor style for elements to default and make the 
elements visible.
-               for( var i = 0, j = element_ids_sub_green.length; i < j; i++ ) {
-                       document.getElementById( element_ids_sub_green[ i ] 
).style.display = "inline";
-                       document.getElementById( element_ids_sub_green[ i ] 
).style.cursor  = "default";
+               for( var i = 0, j = element_ids_sub_box.length; i < j; i++ ) {
+                       document.getElementById( element_ids_sub_box[ i ] 
).style.display = "inline";
+                       document.getElementById( element_ids_sub_box[ i ] 
).style.cursor  = "default";
                }
 
                // Set the cursor style for elements with links to pointer and 
make the elements visible.
@@ -776,8 +782,8 @@ function getLinkSel() {
                document.getElementById( "dl_rpt_img"       ).style.cursor     
= "help";
                document.getElementById( "dl_rpt"           ).style.cursor     
= "help";
 
-               // Make the sub-green box and therefore all elements visible.
-               document.getElementById( "sub_green_box"    ).style.display    
= "block";
+               // Make the sub-box and therefore all elements visible.
+               document.getElementById( "sub_box"          ).style.display    
= "block";
        }
 
        return LINK_FULL;
@@ -1163,7 +1169,7 @@ function alertDbg( location ) {
        + "LINK_CHK_ASC_LP: "                   + "\t\t\t\t\t"          + 
LINK_CHK_ASC_LP                       + "\n"
        + "LINK_CHK_MD5_LP: "                   + "\t\t\t\t\t"          + 
LINK_CHK_MD5_LP                       + "\n"
        + "LINK_CHK_SHA256_LP: "                + "\t\t\t\t"            + 
LINK_CHK_SHA256_LP                    + "\n"
-       + "SUPPORTED: "                         + "\t\t\t\t\t\t"        + 
SUPPORTED                             + "\n"
+       + "SUB_BOX: "                           + "\t\t\t\t\t\t"        + 
SUB_BOX                               + "\n"
        + "ERROR: "                             + "\t\t\t\t\t\t\t"      + ERROR 
                                + "\n"
        + "" );
 


Reply via email to