Author: marcus Date: Wed Jun 4 21:13:11 2014 New Revision: 1600500 URL: http://svn.apache.org/r1600500 Log: Updated text, added function to select the table data
Modified: openoffice/ooo-site/trunk/content/download/test/analyze_droplist.html Modified: openoffice/ooo-site/trunk/content/download/test/analyze_droplist.html URL: http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/download/test/analyze_droplist.html?rev=1600500&r1=1600499&r2=1600500&view=diff ============================================================================== --- openoffice/ooo-site/trunk/content/download/test/analyze_droplist.html (original) +++ openoffice/ooo-site/trunk/content/download/test/analyze_droplist.html Wed Jun 4 21:13:11 2014 @@ -29,22 +29,34 @@ + "<p>" + "<ol style='padding: 0px 0px 0px 15px; list-style: disc outside none;'>" - + "<li>Select your favorite operating system, language and version in the green below.</li>" + + "<li><b>Select your favorites</b>: Operating system, language and version in the green below.</li>" + "<li>Verify that these options <b>still do not</b> lead to valid download links.</li>" - + "<li>Click on the link \"Update the table\" below the green box.</li>" - + "<li>Copy the complete table (really, from top to bottom).</li>" + + "<li>Click on the button <b>[Update the table]</b> below the green box.</li>" + + "<li>Click on the button <b>[Select the table]</b> below the green box.</li>" + + "<li><b>Copy via [Ctrl] + [C]</b> the selected table data into the clipboard.</li>" + "<br />" - + "<li>Then create a new mail.</li>" - + "<li>Write a problem description (what does not work and what do you expect).</li>" - + "<li>Also add details about your operating system.</li>" - + "<li>Paste the copied data at the end.</li>" - + "<li>Finally, send the mail to: " - + "<a href='mailto:<mail address needs to be agreed>?subject=Reporting%20broken%20download%20link'" - + "title='Mail address to send the broken link report to'><b>Mail Address needs tbd</b></a></li>" + + "<li><b>Create a new mail</b>.</li>" + + "<li><b>Write a problem description</b> (what does not work and what do you expect).</li>" + + "<li>Also add <b>details about the operating system</b> you are using.</li>" + + "<li><b>Paste the copied data</b> at the end.</li>" + + "<li>Finally, <b>send the mail</b> to the: " + + "<a href='mailto:d...@openoffice.apache.org?subject=Reporting%20broken%20download%20link'" + + "title='Send the broken link report to the Apache OpenOffice developers mailing list'>" + + "<b>Apache OpenOffice Development Mailing List</b>" + + "</a>. *)" + + "</li>" + "</ol>" + + "<br />" + + + "*) " + + "<a href='http://openoffice.apache.org/mailing-lists.html' title='Learn more about what a mailing list is'" + + "target='_blank'><b>Click here to learn more about what a mailing list is</b>" + + "</a>." + "<h3>We will try to respond as soon as we get the mail and the problem analyzed." + "<br />Thank you for your report.</h3>" + + + "<p> </p>" + "</p>" ); //--> </script> @@ -163,23 +175,24 @@ <div style="clear: both; float: left;"> <form name="update_and_copy"> -<!-- - <input style="padding: 0px 15px 0px 15px; font-size: 1.2em; cursor: pointer;" type="button" name="update" ---> - <input class="btn_analyze" type="button" name="update" - href="javascript:void( 0 )" title="Put the selected options as values into the table below" - onclick="updateTable(); return false;" value="Update the table" /> + <input class="btn_analyze" type="button" name="update" href="javascript:void( 0 )" + title="Put the selected options as values into the table below" onclick="updateTable(); return false;" + value="Click to update the table" /> </input> <a style="padding: 0px 0px 0px 30px;"></a> -<!-- - <input class="btn_analyze" type="button" name="copy" - href="javascript:void( 0 )" title="Copy the table data into the clipboard" onclick="copyTable( document.getElementById('copy_dummy').value ); return false;" - value="Copy the table to clipboard" /> + + <input class="btn_analyze" type="button" name="select" href="javascript:void( 0 )" + title="Select all data in the table below" onclick="selectTable( 'table_data' ); return false;" + value="Click to select the table" /> </input> - <textarea id="copy_dummy" style="width: 0px; height: 0px; padding: 0px;"></textarea> ---> + <a style="padding: 0px 0px 0px 30px;"></a> + + <p class="btn_analyze" style="padding: 0px 5px 0px 5px; display: inline; cursor: default" + title="Copy the selected table data via [Ctrl] + [C] into the clipboard"> + Copy with [Ctrl] + [C] + </p> </form> <p> </p> @@ -191,7 +204,7 @@ document.write( "<div style='float: left;'>" // List some variables from browser's Document Object Model (DOM). - + "<table id='js_dl_values' style='border-collapse: collapse; border-spacing: 2px; width: 100%;'>" + + "<table id='table_data' style='border-collapse: collapse; border-spacing: 2px; width: 100%;'>" + "<tbody>" + "<th style='width:25%;'><b>Browser variables</b> </th style='75%;'><th><b>Values</b></th>" + "<tr><td>navigator.appCodeName </td><td>" + navigator.appCodeName + "</td></tr>" @@ -262,11 +275,11 @@ function updateTable() { // All variables and functions that should be shown in the table. - elements = [ LANG_ARRAY[ 2 ], LANG_ISO, LANG_SEL, LANG_ARRAY, 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(), OLD_PLATFORM, SF, OTHER, ARCHIVE, ERROR ]; + elements = [ LANG_ISO, LANG_SEL, LANG_ARRAY, 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(), OLD_PLATFORM, SF, OTHER, ARCHIVE, 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): @@ -276,15 +289,35 @@ return; } -/* - function copyTable() { - // Copy all table data into the clipboard. - alert( "TODO: Implement" ); + function selectTable( table ) { + // 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 selected_range = document.createRange(); + + // All browsers but not MSIE < version 9. + if( window.getSelection ) { + selected_range.selectNodeContents( data ); + selection.removeAllRanges(); + selection.addRange( selected_range ); + + } else if( document.body.createTextRange ) { + // Only MSIE < version 9. + 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 ); + selection.removeAllRanges(); + selection.addRange( selected_range ); + } return; } -*/ </script> </div>