From 73291940e685141db89c25bc49b2d06cba6b0e09 Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Sat, 20 Mar 1999 01:30:16 +0000 Subject: [PATCH] Redo the header. --- webtools/bonsai/cvsblame.cgi | 105 ++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/webtools/bonsai/cvsblame.cgi b/webtools/bonsai/cvsblame.cgi index c61a25371ca4..290e3a4b7482 100755 --- a/webtools/bonsai/cvsblame.cgi +++ b/webtools/bonsai/cvsblame.cgi @@ -189,29 +189,56 @@ foreach $mark (split(',',$mark_arg)) { # &print_top; +# Print Header +# + # Print link at top for directory browsing # -$output = "
"; -foreach $path (split('/',$rcs_path)) { - $link_path .= url_encode2($path); - $output .= "$path/ "; - $link_path .= '/'; -} -$output .= "$file_tail " - ." ( + + + + + + + +
+ + Blame Annotated Source + +
+); + +foreach $path (split('/',$rcs_path)) { + $link_path .= url_encode2($path).'/' if $path ne 'mozilla'; + print "$path/ "; +} +print "$file_tail "; + +print " ("; +print "$browse_revtag:" unless $browse_revtag eq 'HEAD'; +print $revision if $revision; +print ")"; + +print qq( + +
+ + + + +
+ Full Change Log +
+
+ ); + -$output .= "
"; -EmitHtmlHeader("CVS Blame", $output); -print "
\n"; print $font_tag; @@ -333,8 +360,8 @@ if ($useLayers) { $author = $revision_author{$revision}; $author =~ tr/%/@/; print "log$revisionName = \"" - ."$revision   $author" - ."   $revision_ctime{$revision}
" + ."$revision <$author>" + ." $revision_ctime{$revision}
" ."$log\";\n"; } print ""; @@ -350,23 +377,23 @@ if ( $opt_sanitize ) ## END of main script sub max { - local ($a, $b) = @_; + my ($a, $b) = @_; return ($a > $b ? $a : $b); } sub print_top { - local ($title_text) = "for $file_tail ("; + my ($title_text) = "for $file_tail ("; $title_text .= "$browse_revtag:" unless $browse_revtag eq 'HEAD'; $title_text .= $revision if $revision; $title_text .= ")"; $title_text =~ s/\(\)//; - local ($diff_dir_link) = + my ($diff_dir_link) = "cvsview2.cgi?subdir=$rcs_path&files=$file_tail&command=DIRECTORY"; $diff_dir_link .= "&root=$form{'root'}" if defined $form{'root'}; $diff_dir_link .= "&branch=$browse_revtag" unless $browse_revtag eq 'HEAD'; - local ($diff_link) = "cvsview2.cgi?diff_mode=context&whitespace_mode=show"; + my ($diff_link) = "cvsview2.cgi?diff_mode=context&whitespace_mode=show"; $diff_link .= "&root=$form{'root'}" if defined $form{'root'}; $diff_link .= "&subdir=$rcs_path&command=DIFF_FRAMESET&file=$file_tail"; @@ -407,10 +434,11 @@ function log(event, prev_rev, rev) { return true; } - l = document.layers['popup']; + var l = document.layers['popup']; + var shadow = document.layers['shadow']; if (document.loaded) { - l.document.write("
"); - l.document.write("
"); + l.document.write("
"); + l.document.write("
"); l.document.write(eval("log" + revToName(rev)) + "
"); l.document.write("
"); l.document.close(); @@ -419,9 +447,10 @@ function log(event, prev_rev, rev) { if(event.target.y > window.innerHeight + window.pageYOffset - l.clip.height) { l.top = (window.innerHeight + window.pageYOffset - (l.clip.height + 15)); } else { - l.top = event.target.y - 10; + l.top = event.target.y - 9; } l.left = event.target.x + 70; + l.visibility="show"; return true; @@ -429,20 +458,20 @@ function log(event, prev_rev, rev) { file_tail = "$file_tail"; -initialLayer = "
Page loading...please wait.
"; +initialLayer = "
Page loading...please wait.
"; - + __TOP__ - print '' if not $useLayers; + print '' if not $useLayers; } # print_top sub print_usage { - local ($linenum_message) = ''; - local ($new_linenum, $src_roots_list); - local ($title_text) = "Usage"; + my ($linenum_message) = ''; + my ($new_linenum, $src_roots_list); + my ($title_text) = "Usage"; if ($ENV{"REQUEST_METHOD"} eq 'POST' && defined($form{'set_line'})) { @@ -557,7 +586,7 @@ __BOTTOM__ sub link_includes { - local ($text) = $_[0]; + my ($text) = $_[0]; if ($text =~ /\#(\s*)include(\s*)"(.*?)"/) { foreach $trial_root (($rcs_path, 'ns/include', @@ -588,7 +617,7 @@ sub html_comments_init { } sub leave_html_comments { - local ($text) = $_[0]; + my ($text) = $_[0]; # Allow HTML in the comments. # $newtext = "";