- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 23 Oct 2007 07:19:06 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin In directory hutz:/tmp/cvs-serv24125/bin Modified Files: checklink Log Message: adding a "progress bar" at top of scrolling pre Index: checklink =================================================================== RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v retrieving revision 4.75 retrieving revision 4.76 diff -u -d -r4.75 -r4.76 --- checklink 18 Sep 2007 16:24:13 -0000 4.75 +++ checklink 23 Oct 2007 07:19:04 -0000 4.76 @@ -260,6 +260,15 @@ <meta http-equiv="Content-Script-Type" content="text/javascript"> <meta name="generator" content="%s"> <link rel="stylesheet" type="text/css" href="%s"> +<script type="text/javascript"> +function show_progress(progress_text, progress_head_id) { +var progressHead = document.getElementById(progress_head_id); +var txt = document.createTextNode(progress_text); +oChild=progressHead.childNodes[1]; +oNewChild=document.createElement("span"); +oNewChild.appendChild(txt); +progressHead.replaceChild(oNewChild, oChild); +};</script> EOF # Trusted environment variables that need laundering in taint mode. @@ -805,7 +814,10 @@ &encode(sprintf($Cfg{Markup_Validator_URI}, $esc_uri)), &encode(sprintf($Cfg{CSS_Validator_URI}, $esc_uri)), &encode($Opts{_Self_URI})); - print("<pre id=\"progress\">\n"); + + printf ('<h3 class="status_progress" id="status_progress%s">Status: <span></span></h3>', $result_anchor); + print("<pre class=\"progress\">\n"); + } } @@ -888,6 +900,8 @@ # Hack: avoid browser/server timeouts in summary only CGI mode, bug 896 print ' ' if ($Opts{HTML} && !$Opts{Command_Line}); } else { + printf('<script type="text/javascript">show_progress("Checking link %s", "status_progress%s");</script>' , $u, $result_anchor) + if ($Opts{HTML} && !$Opts{Summary_Only}); &hprintf("Checking link %s\n", $u); } @@ -928,9 +942,10 @@ } } } - + printf('<script type="text/javascript">show_progress("Done. Document processed in %ss.\n");</script>' , &time_diff($start, &get_timestamp())) + if ($Opts{HTML} && !$Opts{Summary_Only}); &hprintf("Processed in %ss.\n", &time_diff($start, &get_timestamp())) - unless $Opts{Summary_Only}; + unless $Opts{Summary_Only}; # Display results if ($Opts{HTML} && !$Opts{Summary_Only}) { @@ -2323,8 +2338,9 @@ <p><label for=\"uri\">Enter the address (<a href=\"http://www.w3.org/Addressing/\">URL</a>) of a document that you would like to check:</label></p> <p><input type=\"text\" size=\"50\" id=\"uri\" name=\"uri\" value=\"",$requested_uri,"\"></p> -<fieldset> - <legend>Options</legend> +<fieldset id=\"extra_opt_uri\" class=\"moreoptions\"> + <legend class=\"toggletext\">More Options</legend> + <div class=\"options\"> <p> <label for=\"summary\"><input type=\"checkbox\" id=\"summary\" name=\"summary\" value=\"on\"", $sum, "> Summary only</label> <br> @@ -2340,6 +2356,7 @@ <label title=\"Depth of the recursion (-1 is the default and means unlimited)\" for=\"depth\">recursion depth: <input type=\"text\" size=\"3\" maxlength=\"3\" id=\"depth\" name=\"depth\" value=\"", $dep, "\"></label> <br><br>", $cookie_options, " </p> + </div> </fieldset> <p class=\"submit_button\"><input type=\"submit\" name=\"check\" value=\"Check\"></p> </form>
Received on Tuesday, 23 October 2007 07:19:18 UTC