You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ma...@apache.org on 2014/07/05 18:16:14 UTC
svn commit: r1608046 -
/openoffice/ooo-site/trunk/content/download/analyze.html
Author: marcus
Date: Sat Jul 5 16:16:14 2014
New Revision: 1608046
URL: http://svn.apache.org/r1608046
Log:
Created green download box via JS function, several other updates
Modified:
openoffice/ooo-site/trunk/content/download/analyze.html
Modified: openoffice/ooo-site/trunk/content/download/analyze.html
URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/analyze.html?rev=1608046&r1=1608045&r2=1608046&view=diff
==============================================================================
--- openoffice/ooo-site/trunk/content/download/analyze.html (original)
+++ openoffice/ooo-site/trunk/content/download/analyze.html Sat Jul 5 16:16:14 2014
@@ -7,6 +7,7 @@
<script type="text/javascript" src="msg_prop_l10n_en.js"></script>
<script type="text/javascript" src="languages.js"></script>
<script type="text/javascript" src="release_matrix.js"></script>
+ <script type="text/javascript" src="boxed_download.js"></script>
<script type="text/javascript" src="download.js"></script>
<style type="text/css">
/* <![CDATA[ */
@@ -23,10 +24,8 @@
<noscript>
<h1>Apache OpenOffice Downloads - Analyze errors</h1>
<br />
-
<div class="notice">
<h2>JavaScript not enabled?</h2>
-
<p>JavaScript needs to be enabled to show the analysis data on this webpage.</p>
</div>
</noscript>
@@ -41,40 +40,42 @@
+ "<p>"
+ "<ol style='padding: 0px 0px 0px 15px; list-style: disc outside none;'>"
- + "<li>" + l10n_analyze_instruction_select_text + "</li>"
- + "<li>" + l10n_analyze_instruction_verify_text + "</li>"
- + "<li>" + l10n_analyze_instruction_click_text + "<b>[ " + l10n_analyze_update_button_text + " ]</b></li>"
- + "<li>" + l10n_analyze_instruction_click_text + "<b>[ " + l10n_analyze_select_button_text + " ]</b></li>"
- + "<li>" + l10n_analyze_instruction_copy_text + "<b>[ " + l10n_analyze_copy_button_text + " ]</b></li>"
+ + "<li>" + l10n_analyze_instruction_select_text + "</li>"
+ + "<li>" + l10n_analyze_instruction_verify_text + "</li>"
+ + "<li>" + l10n_analyze_instruction_click_text + "<b>[ " + l10n_analyze_update_button_text + " ]</b></li>"
+ + "<li>" + l10n_analyze_instruction_click_text + "<b>[ " + l10n_analyze_select_button_text + " ]</b></li>"
+ + "<li>" + l10n_analyze_instruction_copy_text + "<b>[ " + l10n_analyze_copy_button_text + " ]</b></li>"
+ "<br />"
- + "<li><b>" + l10n_analyze_instruction_new_mail_text + "</b></li>"
- + "<li>" + l10n_analyze_instruction_problem_text + "</li>"
- + "<li>" + l10n_analyze_instruction_details_text + "</li>"
- + "<li><b>" + l10n_analyze_instruction_paste_text + "</b></li>"
- + "<li>" + l10n_analyze_instruction_only_download_text + "</li>"
- + "<li><b>" + l10n_analyze_instruction_no_install_text + "</b></li>"
- + "<li>" + l10n_analyze_instruction_send_mail_text
+
+ + "<li><b>" + l10n_analyze_instruction_new_mail_text + "</b></li>"
+ + "<li>" + l10n_analyze_instruction_problem_text + "</li>"
+ + "<li>" + l10n_analyze_instruction_details_text + "</li>"
+ + "<li><b>" + l10n_analyze_instruction_paste_text + "</b></li>"
+ + "<li>" + l10n_analyze_instruction_only_download_text + "</li>"
+ + "<li><b>" + l10n_analyze_instruction_no_install_text + "</b></li>"
+ + "<li>" + l10n_analyze_instruction_send_mail_text
+ "<a href='mailto:dev@openoffice.apache.org?subject=Reporting%20broken%20download%20link'"
+ "title='" + l10n_analyze_instruction_mailing_list_title + "'>"
- + "<b>" + l10n_analyze_instruction_mailing_list_text + "</b>"
+ + "<b>" + l10n_analyze_instruction_mailing_list_text + "</b>"
+ "</a>. *)"
+ "</li>"
+ "</ol>"
+ "<br />"
+ "*) "
- + "<a href='http://openoffice.apache.org/mailing-lists.html'"
- + "title='" + l10n_analyze_instruction_learn_more_title + "'"
- + "target='_blank'><b>" + l10n_analyze_instruction_learn_more_text + "</b>"
+ + "<a href='http://openoffice.apache.org/mailing-lists.html' target='_blank'"
+ + "title='" + l10n_analyze_instruction_learn_more_title + "'>"
+ + "<b>" + l10n_analyze_instruction_learn_more_text + "</b>"
+ "</a>."
- + "<h3>" + l10n_analyze_instruction_answer_text
- + "<br />" + l10n_analyze_instruction_thanks_text + "</h3>"
+ + "<h3>" + l10n_analyze_instruction_answer_text
+ + "<br />" + l10n_analyze_instruction_thanks_text + "</h3>"
+ "<p> </p>"
+ "</p>" );
//-->
</script>
+
</div> <!-- introduction text -->
<div class="optionset" style="float: left;">
@@ -96,112 +97,19 @@
// Set a specific language ISO code to force to assemble a certain localized build as download link.
// Changed: The variable can now be found in the "msg_prop_l10n_<ISO_code>.js".
- // Green colored box.
- // Show select boxes and both download text buttons.
- document.write( "<div class='first button green-sel' id='optionitem2'>"
- // Headline.
- + "<h2>"
- + "<a title='" + l10n_download_green_box_headline_title + "'>" + l10n_download_green_box_headline_text + "</a>"
- + "</h2>"
-
- // Select text.
- + "<p style='padding-bottom: 0px;'>"
- + "<a title='" + l10n_download_green_box_subtext1_title + "'>(" + l10n_download_green_box_subtext1_text + ")</a>"
- + "<a title='" + l10n_download_green_box_subtext2_title + "'><b>" + l10n_download_green_box_subtext2_text + ":</b></a>"
- + "</p>"
-
- // Select boxes.
- + "<form name='download'>"
- + "<select class='sel-os' id='os' name='os' ' onchange='getLinkSel()'"
- + "title='" + l10n_download_green_box_selectbox_os_title + "'>"
- + "</select>"
- + "<select class='sel-lang' id='lang' name='lang' onchange='getLinkSel()'"
- + "title='" + l10n_download_green_box_selectbox_lang_title + "' >"
- + "</select>"
- + "<select class='sel-ver' id='ver' name='ver' onchange='getLinkSel()'"
- + "title='" + l10n_download_green_box_selectbox_ver_title + "'>"
- + "</select>"
- + "</form>"
-
- // Both download text buttons: First for "full install", then for "langpack".
- + "<a style='padding: 0px 0px 0px 3%; cursor: default;'></a>"
-
- + "<div class='btn_dl' style='display: inline-block;'>"
- + "<h3>"
- + "<a id='dl_f_link' href='' title='' target='_blank'></a>"
- + "</h3>"
- + "</div>"
-
- + "<a style='padding: 0px 0px 0px 3%; cursor: default;'></a>"
-
- + "<div class='btn_dl' style='display: inline-block;'>"
- + "<h3>"
- + "<a id='dl_lp_link' href='' title='' target='_blank'></a>"
- + "</h3>"
- + "</div>"
- + "<br /><br />"
-
- + "</div>" );
-
- // Sub-green colored box.
- // Show release info, filesizes, checksum links and help links.
- document.write( "<div id='sub_green_box' class='sub-green-sel'>"
- + "<p>"
- // Error text with hint.
- + "<img id='dl_err_img' style='margin: 5px 5px 15px 0px;' src='' title='' height='16' width='16' alt='' />"
- + "<a id='dl_err' style='text-decoration: none;' title=''></a>"
-
- // Release info and notes.
- + "<a id='dl_rel_info' style='text-decoration: none;'></a>"
- + "<a id='dl_rel_notes' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<br />"
-
- // Full installation: Filesize and checksums.
- + "<a id='dl_f_info' style='text-decoration: none;'></a>"
- + "<a id='dl_f_chk_keys' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space1' style='text-decoration: none;'></a>"
- + "<a id='dl_f_chk_asc' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space2' style='text-decoration: none;'></a>"
- + "<a id='dl_f_chk_md5' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space3' style='text-decoration: none;'></a>"
- + "<a id='dl_f_chk_sha256' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<br />"
-
- // Langpack: Filesize and checksums.
- + "<a id='dl_lp_info' style='text-decoration: none;'></a>"
- + "<a id='dl_lp_chk_keys' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space4' style='text-decoration: none;'></a>"
- + "<a id='dl_lp_chk_asc' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space5' style='text-decoration: none;'></a>"
- + "<a id='dl_lp_chk_md5' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<a id='space6' style='text-decoration: none;'></a>"
- + "<a id='dl_lp_chk_sha256' style='text-decoration: underline;' href='' title='' target='_blank'></a>"
- + "<br />"
-
- // Help: What is a language pack?
- + "<img id='dl_hlp_img' style='padding: 5px 5px 0px 0px;' src='' title='' height='16' width='16' alt='' />"
- + "<a id='dl_hlp' href='' title='' target='_blank' onclick='showWindow( this.href ); return false;'></a>"
- + "<a style='padding: 0px 0px 0px 30px;'></a>"
-
- // Help: How to verify the download?
- + "<img id='dl_chk_img' style='padding: 5px 5px 0px 0px;' src='' title='' height='16' width='16' alt='' />"
- + "<a id='dl_chk' href='' title='' target='_blank'></a>"
- + "<a style='padding: 0px 0px 0px 30px;'></a>"
-
- // Help: Report broken link.
- + "<img id='dl_rpt_img' style='padding: 5px 5px 0px 0px;' src='' title='' height='16' width='16' alt='' />"
- + "<a id='dl_rpt' href='' title='' target='_blank'></a>"
- + "</p>" );
- document.write( "</div>" );
+ // Get the download box from a separate file.
+ createDownloadBox();
// Fill the select boxes and wait for the user's choice.
init( 1 );
entourage.initialize();
+
//-->
</script>
<p> </p>
+
</div> <!-- class "optionset" -->
<!-- Grey: Buttons -->
@@ -211,35 +119,31 @@
document.write( "<div style='clear: both; float: left;'>"
+ "<div>"
- + "<form name='update_and_copy'>"
- + "<input class='btn_analyze' type='button' name='update' href='javascript:void( 0 )'"
- + "title='" + l10n_analyze_update_button_title + "' onclick='updateTable(); return false;'"
- + "value='" + l10n_analyze_update_button_text + "' />"
- + "</input>"
-
- + "<a style='padding: 0px 0px 0px 30px;'></a>"
-
- + "<input class='btn_analyze' type='button' name='select' href='javascript:void( 0 )'"
- + "title='" + l10n_analyze_select_button_title + "' onclick='selectTable( \"table_data\" ); return false;'"
- + "value='" + l10n_analyze_select_button_text + "' />"
- + "</input>"
-
- + "<a style='padding: 0px 0px 0px 30px;'></a>"
-
- + "<p class='btn_analyze' style='padding: 0px 15px 0px 15px; display: inline; cursor: default'"
- + "title='" + l10n_analyze_copy_button_title + "'>"
- + l10n_analyze_copy_button_text
- + "</p>"
- + "</form>"
+ + "<form name='update_and_copy'>"
+ + "<input class='btn_analyze' type='button' name='update' href='javascript:void( 0 )'"
+ + "title='" + l10n_analyze_update_button_title + "' onclick='updateTable(); return false;'"
+ + "value='" + l10n_analyze_update_button_text + "' />"
+ + "</input>"
+
+ + "<input class='btn_analyze' type='button' name='select' href='javascript:void( 0 )'"
+ + "title='" + l10n_analyze_select_button_title + "' onclick='selectTable(); return false;'"
+ + "value='" + l10n_analyze_select_button_text + "' />"
+ + "</input>"
+
+ + "<input class='btn_analyze' type='button' name='copy' href='javascript:void( 0 )'"
+ + "title='" + l10n_analyze_copy_button_title + "'"
+ + "value='" + l10n_analyze_copy_button_text + "' disabled style='color: #000000; cursor: default;' />"
+ + "</form>"
+
+ + "<p> </p>"
- + "<p> </p>"
+ "</div>"
-+ "</div>" // update and copy
++ "</div>" // Update and select buttons
+ "<div style='clear: both; float: left;'>"
// List some variables from browser's Document Object Model (DOM).
- + "<div style='float: left;'>"
- + "<table class='tbl_analyze' id='table_data' style='border-collapse: collapse; border-spacing: 2px; width: 100%;'>"
+
+ + "<table class='tbl_analyze' id='table_data'>"
+ "<tbody>"
+ "<th style='width: 25%;'><b>" + l10n_analyze_table_browser_text + "</b></th>"
+ "<th style='width: 75%;'><b>" + l10n_analyze_table_values_text + "</b></th>"
@@ -261,21 +165,21 @@ document.write( "<div style='clear: both
if ( navigator.userAgent.toLowerCase().indexOf( "debian" ) != -1 )
document.write( "<tr><td>Debian / Ubuntu / IceWeasel ?</td><td>" + l10n_analyze_table_yes_text + " / "
- + l10n_analyze_table_no_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
+ + l10n_analyze_table_no_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
else if ( navigator.userAgent.toLowerCase().indexOf( "ubuntu" ) != -1 )
document.write( "<tr><td>Debian / Ubuntu / IceWeasel ?</td><td>" + l10n_analyze_table_no_text + " / "
- + l10n_analyze_table_yes_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
+ + l10n_analyze_table_yes_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
else if ( navigator.userAgent.toLowerCase().indexOf( "iceWeasel" ) != -1 )
document.write( "<tr><td>Debian / Ubuntu / IceWeasel ?</td><td>" + l10n_analyze_table_no_text + " / "
- + l10n_analyze_table_no_text + " / " + l10n_analyze_table_yes_text + "</td></tr>" );
+ + l10n_analyze_table_no_text + " / " + l10n_analyze_table_yes_text + "</td></tr>" );
else
document.write( "<tr><td>Debian / Ubuntu / IceWeasel ?</td><td>" + l10n_analyze_table_no_text + " / "
- + l10n_analyze_table_no_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
+ + l10n_analyze_table_no_text + " / " + l10n_analyze_table_no_text + "</td></tr>" );
// List all variables and function's return values from scripting.
- document.write( "<tr><th><b>" + l10n_analyze_table_stable_release_text + "</b></th><th> </th></tr>"
- + "<th><b>" + l10n_analyze_table_javascript_text + "</b></th>"
- + "<th><b>" + l10n_analyze_table_values_text + "</b></th>"
+ document.write( "<tr><th><b>" + l10n_analyze_table_stable_release_text + "</b></th><th> </th></tr>"
+ + "<th><b>" + l10n_analyze_table_javascript_text + "</b></th>"
+ + "<th><b>" + l10n_analyze_table_values_text + "</b></th>"
+ "<tr><td>Language ISO code </td><td></td></tr>" /* LANG_ISO */
+ "<tr><td>Language ISO code (from select box) </td><td></td></tr>" /* LANG_SEL */
+ "<tr><td>Release matrix platform position (full) </td><td></td></tr>" /* RELEASE_PLATFORM_POS_FULL */
@@ -301,38 +205,38 @@ document.write( "<div style='clear: both
+ "<tr><td>Checksum file link (lp) (here for MD5) </td><td></td></tr>" /* LINK_CHK_MD5_LP */
+ "<tr><td>Base URL to Sourceforge.net </td><td></td></tr>" /* SOURCEFORGE_BASE_URL */
+ "<tr><td>Base URL to Apache Archive </td><td></td></tr>" /* ASF_ARC_BASE_URL */
- + "<tr><td>getLinkSel() </td><td></td></tr>" /* getLinkSel() */
- + "<tr><td>isLangSupported() ? </td><td></td></tr>" /* isLangSupported() */
- + "<tr><td>Download link is supported and OK ? </td><td></td></tr>" /* SUPPORTED */
- + "<tr><td>General error ? </td><td></td></tr>" /* ERROR */
+ + "<tr><td>getLinkSelection() (download URL) </td><td></td></tr>" /* getLinkSelection() */
+ + "<tr><td>isLanguageSupported() (true/false) ? </td><td></td></tr>" /* isLanguageSupported() */
+ + "<tr><td>Show the sub-box (true/false) ? </td><td></td></tr>" /* SHOW_SUB_BOX */
+ + "<tr><td>General error (true/false) ? </td><td></td></tr>" /* ERROR */
+ "</tbody>"
+ "</table>"
- + "</div>"
-+ "</div>" ); // table
+
++ "</div>" ); // Table
function updateTable() {
- // All variables and functions that should be shown in the table.
+ // Show all variables and functions in the table that are defined in the following array.
- var vars = [ LANG_ISO, LANG_SEL, RELEASE_PLATFORM_POS_FULL, RELEASE_PLATFORM_POS_LP, RELEASE_PLATFORM, RELEASE_LANG,
- UI_PLATFORM, UI_PLATFORM_NO_SUP, PLATFORM, PLATFORM_FULL, PLATFORM_LP, PLATFORM_SEL, VERSION_SEL,
- FILENAME_FULL, FILENAME_LP, EXTENSION, FILESIZE_FULL, FILESIZE_LP, REL_TEXT, LINK_FULL, LINK_LP,
- LINK_CHK_MD5_FULL, LINK_CHK_MD5_LP, SOURCEFORGE_BASE_URL, ASF_ARC_BASE_URL, getLinkSel(), isLangSupported(),
- SUPPORTED, ERROR ];
-
- // Assign the respective table cell with the variable or function.
- // Start with the 20th row (i = 19) in the 2nd cell (1), count through the elements array (j):
- for( var i = 19, j = 0, k = vars.length; j < k; i++, j++ ) {
- document.getElementById( "table_data" ).rows[ i ].cells[ 1 ].innerHTML = vars[ j ];
+ var variables = [ LANG_ISO, LANG_SEL, RELEASE_PLATFORM_POS_FULL, RELEASE_PLATFORM_POS_LP, RELEASE_PLATFORM, RELEASE_LANG,
+ UI_PLATFORM, UI_PLATFORM_NO_SUP, PLATFORM, PLATFORM_FULL, PLATFORM_LP, PLATFORM_SEL, VERSION_SEL,
+ FILENAME_FULL, FILENAME_LP, EXTENSION, FILESIZE_FULL, FILESIZE_LP, REL_TEXT, LINK_FULL, LINK_LP,
+ LINK_CHK_MD5_FULL, LINK_CHK_MD5_LP, SOURCEFORGE_BASE_URL, ASF_ARC_BASE_URL, getLinkSelection(),
+ isLanguageSupported(), SHOW_SUB_BOX, ERROR ];
+
+ // Start with the 20th row (i = 19) in the 2nd cell (1), count through the elements array (j)
+ // and assign the found values as innerHMTL to the table cells.
+ for( var i = 19, j = 0, k = variables.length; j < k; i++, j++ ) {
+ document.getElementById( "table_data" ).rows[ i ].cells[ 1 ].innerHTML = variables[ j ];
}
return;
}
-function selectTable( table ) {
+function selectTable() {
// Select all table data, so that the user can copy it manually into the clipboard.
- var data = document.getElementById( table );
- var selection = window.getSelection();
+ var data = document.getElementById( "table_data" );
+ var selection = window.getSelection();
var selected_range = document.createRange();
// All browsers but not MSIE < version 9.
@@ -343,13 +247,13 @@ function selectTable( table ) {
} else if( document.body.createTextRange ) {
// Only MSIE < version 9.
- selected_range = document.body.createTextRange ();
+ selected_range = document.body.createTextRange();
selected_range.moveToElementText( data );
selected_range.select();
} else if( document.createRange && window.getSelection ) {
// All other browsers.
- selected_range.selectNodeContents( table );
+ selected_range.selectNodeContents( "table_data" );
selection.removeAllRanges();
selection.addRange( selected_range );
}