More patches from Matthew Wilson <msw@gimp.org> -- keep popup layer location; quote some URLs better.

This commit is contained in:
terry 1998-06-26 19:00:22 +00:00
Родитель 09eaa8f230
Коммит e283f6603c
4 изменённых файлов: 41 добавлений и 6 удалений

Просмотреть файл

@ -187,7 +187,7 @@ if ($ENV{'HTTP_USER_AGENT'} =~ /Win/) {
#
$output = "<DIV ALIGN=LEFT>";
foreach $path (split('/',$rcs_path)) {
$link_path .= $path;
$link_path .= url_encode2($path);
$output .= "<A HREF='rview.cgi?dir=$link_path";
$output .= "&cvsroot=$form{'root'}" if defined $form{'root'};
$output .= "&rev=$browse_revtag" unless $browse_revtag eq 'HEAD';
@ -346,6 +346,8 @@ sub print_top {
local ($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";
$diff_link = &url_encode3($diff_link);
print <<__TOP__;
<HTML>
@ -391,7 +393,12 @@ function log(event, line, prev_rev, rev) {
l.document.write(eval("log" + revToName(rev)) + "</TD></TR></TABLE>");
l.document.close();
}
l.top = event.target.y - 3;
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 - 3;
}
l.left = event.target.x + 40;
l.visibility="show";

Просмотреть файл

@ -173,6 +173,7 @@ if ($opt_sort eq 'author') {
$table_header_tag .= "<TH ALIGN=LEFT>Rev<TH ALIGN=LEFT><A HREF='cvslog.cgi?file=$filename&root=$root&rev=$browse_revtag&sort=author&author=$author_arg'>Author</A><TH ALIGN=LEFT>Date<TH><TH ALIGN=LEFT>Log";
}
$table_header_tag = &url_encode3($table_header_tag);
print "$font_tag$table_tag$table_header_tag";
# Print each line of the revision, preceded by its annotation.
@ -215,16 +216,24 @@ foreach $revision (@revisions)
}
$output .= "<TR$bgcolor VALIGN=TOP><TD>"
."<A NAME=$revision><A HREF='cvsview2.cgi";
."<A NAME=$revision>";
$anchor = "<A HREF=cvsview2.cgi";
if (defined($prev_revision{$revision})) {
$output .= "?diff_mode=context&whitespace_mode=show&file=$file_tail"
$anchor .= "?diff_mode=context&whitespace_mode=show&file=$file_tail"
."&root=$root&subdir=$rcs_path&command=DIFF_FRAMESET"
."&rev1=$prev_revision{$revision}&rev2=$revision";
} else {
$output .= "?files=$file_tail"
$anchor .= "?files=$file_tail"
."&root=$root&subdir=$rcs_path\&command=DIRECTORY\&rev2=$revision";
$output .= "&branch=$browse_revtag" unless $browse_revtag eq 'HEAD';
$anchor .= "&branch=$browse_revtag" unless $browse_revtag eq 'HEAD';
}
$anchor = &url_encode3($anchor);
$output .= $anchor;
$output .= "'>$revision</A>"
.'&nbsp' x ($max_rev_length - length($revision)).'</TD>';

Просмотреть файл

@ -69,6 +69,17 @@ sub url_encode2 {
$s =~ s/\'/\%27/g;
$s =~ s/\|/\%7c/g;
$s =~ s/\&/\%26/g;
$s =~ s/\+/\%2b/g;
return $s;
}
sub url_encode3 {
local( $s ) = @_;
$s =~ s/\n/\%0a/g;
$s =~ s/\r//g;
$s =~ s/\"/\%22/g;
$s =~ s/\+/\%2b/g;
return $s;
}

Просмотреть файл

@ -143,4 +143,12 @@ create table tags (
create table checkinlocks (
repositoryid mediumint not null,
branchid mediumint not null,
dirid mediumint not null,
fileid mediumint not null,
revision
OK_ALL_DONE