in assets/download/download_url.js [890:1042]
DL.getLinkSelection = function() {
// Reset all variables that could have been set until now.
DL.initVariables( 0 );
// Get the selected data from the select boxes.
DL.getOSSelection();
DL.getLanguageSelection();
DL.getVersionSelection();
// First check for expections that do not lead to real download links.
DL.checkForLinkExceptions();
// If the selected options lead to no download URL, should the sub-box shown anyway?
// Yes when SHOW_SUB_BOX = "true" and ERROR = "false".
if( DL.SHOW_SUB_BOX && ! DL.ERROR ) {
// Assemble the filenames and text for download and checksums.
DL.getReleaseMatrixPosition();
DL.getFileData();
DL.SF_BASE_URL = DL.SF + DL.VERSION_SEL + "/binaries/";
DL.ASF_ARC_BASE_URL = DL.ASF_ARC + DL.VERSION_SEL;
// Assign the download links: Base link + language + file name.
DL.LINK_FULL = DL.SF_BASE_URL + DL.LANG_SEL + "/" + DL.FILENAME_FULL + "/download";
DL.LINK_LP = DL.SF_BASE_URL + DL.LANG_SEL + "/" + DL.FILENAME_LP + "/download";
// Assign the checksum links: Base link + language + file name.
DL.LINK_CHK_KEYS = "people.apache.org/keys/group/openoffice.asc";
DL.LINK_CHK_ASC_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".asc";
DL.LINK_CHK_MD5_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".md5";
DL.LINK_CHK_SHA256_FULL = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_FULL + ".sha256";
DL.LINK_CHK_ASC_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".asc";
DL.LINK_CHK_MD5_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".md5";
DL.LINK_CHK_SHA256_LP = DL.ASF_ARC_BASE_URL + "/binaries/" + DL.LANG_SEL + "/" + DL.FILENAME_LP + ".sha256";
// Indicate that a download will successfull.
DL.SHOW_SUB_BOX = true;
DL.ERROR = false;
// Set the values for both download text buttons and set the focus to the "full install".
document.getElementById( "dl_f_link" ).href = DL.LINK_FULL;
document.getElementById( "dl_f_link" ).innerHTML = l10n.dl_full_link_text;
document.getElementById( "dl_f_link" ).title = l10n.dl_full_link_title + DL.FILENAME_FULL;
document.getElementById( "dl_f_link" ).focus()
document.getElementById( "dl_lp_link" ).href = DL.LINK_LP;
document.getElementById( "dl_lp_link" ).innerHTML = l10n.dl_langpack_link_text;
document.getElementById( "dl_lp_link" ).title = l10n.dl_langpack_link_title + DL.FILENAME_LP;
// Set the values in the sub-box for the 4 text lines.
// #1 Release data and link to release notes.
document.getElementById( "dl_rel_info" ).innerHTML = "<b>" + l10n.dl_rel_info_headline_text
+ "</b> " + DL.REL_TEXT + " | ";
document.getElementById( "dl_rel_notes" ).href = DL.REL_NOTES;
document.getElementById( "dl_rel_notes" ).innerHTML = l10n.dl_rel_notes_text;
document.getElementById( "dl_rel_notes" ).title = l10n.dl_rel_notes_title + DL.VERSION_SEL;
// #2 Full install: Data and links
document.getElementById( "dl_f_info" ).innerHTML = "<b>" + l10n.dl_headline_full_text + "</b>"
+ l10n.dl_filesize_text + DL.FILESIZE_FULL
+ l10n.dl_megabyte_text + " | "
+ l10n.dl_checksum_headline_text;
document.getElementById( "dl_f_chk_keys" ).href = DL.LINK_CHK_KEYS;
document.getElementById( "dl_f_chk_keys" ).innerHTML = l10n.dl_checksum_keys_text;
document.getElementById( "dl_f_chk_keys" ).title = l10n.dl_checksum_keys_title;
document.getElementById( "space1" ).innerHTML = " , ";
document.getElementById( "dl_f_chk_asc" ).href = DL.LINK_CHK_ASC_FULL;
document.getElementById( "dl_f_chk_asc" ).innerHTML = l10n.dl_checksum_asc_text;
document.getElementById( "dl_f_chk_asc" ).title = l10n.dl_checksum_asc_title + DL.FILENAME_FULL;
document.getElementById( "space2" ).innerHTML = " , ";
document.getElementById( "dl_f_chk_md5" ).href = DL.LINK_CHK_MD5_FULL;
document.getElementById( "dl_f_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
document.getElementById( "dl_f_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_FULL;
document.getElementById( "space3" ).innerHTML = " , ";
document.getElementById( "dl_f_chk_sha256" ).href = DL.LINK_CHK_SHA256_FULL;
document.getElementById( "dl_f_chk_sha256" ).innerHTML = l10n.dl_checksum_sha256_text;
document.getElementById( "dl_f_chk_sha256" ).title = l10n.dl_checksum_sha256_title + DL.FILENAME_FULL;
// #3 Langpack: Data and links
document.getElementById( "dl_lp_info" ).innerHTML = "<b>" + l10n.dl_headline_langpack_text
+ "</b>" + l10n.dl_filesize_text
+ DL.FILESIZE_LP + l10n.dl_megabyte_text
+ " | " + l10n.dl_checksum_headline_text;
document.getElementById( "dl_lp_chk_keys" ).href = DL.LINK_CHK_KEYS;
document.getElementById( "dl_lp_chk_keys" ).innerHTML = l10n.dl_checksum_keys_text;
document.getElementById( "dl_lp_chk_keys" ).title = l10n.dl_checksum_keys_title;
document.getElementById( "space4" ).innerHTML = " , ";
document.getElementById( "dl_lp_chk_asc" ).href = DL.LINK_CHK_ASC_LP;
document.getElementById( "dl_lp_chk_asc" ).innerHTML = l10n.dl_checksum_asc_text;
document.getElementById( "dl_lp_chk_asc" ).title = l10n.dl_checksum_asc_title + DL.FILENAME_LP;
document.getElementById( "space5" ).innerHTML = " , ";
document.getElementById( "dl_lp_chk_md5" ).href = DL.LINK_CHK_MD5_LP;
document.getElementById( "dl_lp_chk_md5" ).innerHTML = l10n.dl_checksum_md5_text;
document.getElementById( "dl_lp_chk_md5" ).title = l10n.dl_checksum_md5_title + DL.FILENAME_LP;
document.getElementById( "space6" ).innerHTML = " , ";
document.getElementById( "dl_lp_chk_sha256" ).href = DL.LINK_CHK_SHA256_LP;
document.getElementById( "dl_lp_chk_sha256" ).innerHTML = l10n.dl_checksum_sha256_text;
document.getElementById( "dl_lp_chk_sha256" ).title = l10n.dl_checksum_sha256_title + DL.FILENAME_LP;
// #4 Links: Full vs. lp + verify checksums + report broken link.
document.getElementById( "dl_hlp_img" ).src = l10n.dl_help_img_src;
document.getElementById( "dl_hlp_img" ).title = l10n.dl_help_img_title;
document.getElementById( "dl_hlp_img" ).alt = l10n.dl_help_img_alt;
document.getElementById( "dl_hlp" ).href = l10n.dl_help_link;
document.getElementById( "dl_hlp" ).innerHTML = l10n.dl_help_text;
document.getElementById( "dl_hlp" ).title = l10n.dl_help_title;
document.getElementById( "dl_chk_img" ).src = l10n.dl_checksum_img_src;
document.getElementById( "dl_chk_img" ).title = l10n.dl_checksum_img_title;
document.getElementById( "dl_chk_img" ).alt = l10n.dl_checksum_img_alt;
document.getElementById( "dl_chk" ).href = l10n.dl_checksum_link;
document.getElementById( "dl_chk" ).innerHTML = l10n.dl_checksum_text;
document.getElementById( "dl_chk" ).title = l10n.dl_checksum_title;
document.getElementById( "dl_rpt_img" ).src = l10n.dl_report_img_src;
document.getElementById( "dl_rpt_img" ).title = l10n.dl_report_img_title;
document.getElementById( "dl_rpt_img" ).alt = l10n.dl_report_img_alt;
document.getElementById( "dl_rpt" ).href = l10n.dl_report_link;
document.getElementById( "dl_rpt" ).innerHTML = l10n.dl_report_text;
document.getElementById( "dl_rpt" ).title = l10n.dl_report_title;
// Show the CSS style for the normal sub-box and hide all elements for error text.
document.getElementById( "sub_box" ).className = "sub-green-sel";
document.getElementById( "dl_err_img" ).style.display = "none";
document.getElementById( "dl_err" ).style.display = "none";
// Show all elements with ID in the box and sub-box.
// Set the cursor style for elements to default and make the elements visible.
for( var i = 0, j = DL.ID_SUB_BOX.length; i < j; i++ ) {
document.getElementById( DL.ID_SUB_BOX[ i ] ).style.display = "inline";
document.getElementById( DL.ID_SUB_BOX[ i ] ).style.cursor = "default";
}
// Show all elements with link in the box and sub-box.
// Set the cursor style for elements with links to pointer and make the elements visible.
for( var i = 0, j = DL.ID_LINKS.length; i < j; i++ ) {
document.getElementById( DL.ID_LINKS[ i ] ).style.display = "inline";
document.getElementById( DL.ID_LINKS[ i ] ).style.cursor = "pointer";
}
// Set the cursor style for the 3 links with icon to a help sign.
document.getElementById( "dl_hlp_img" ).style.cursor = "help";
document.getElementById( "dl_hlp" ).style.cursor = "help";
document.getElementById( "dl_chk_img" ).style.cursor = "help";
document.getElementById( "dl_chk" ).style.cursor = "help";
document.getElementById( "dl_rpt_img" ).style.cursor = "help";
document.getElementById( "dl_rpt" ).style.cursor = "help";
// Make the sub-box and therefore all elements visible.
document.getElementById( "sub_box" ).style.display = "block";
}
return;
}