Skip to content

Commit

Permalink
gitweb: Move 'lineno' id from link to row element in git_blame
Browse files Browse the repository at this point in the history
Move l<line number> ID from <a> link element inside table row (inside
cell element for column with line numbers), to encompassing <tr> table
row element.  It was done to make it easier to manipulate result HTML
with DOM, and to be able write 'blame_incremental' view with the same,
or nearly the same result.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Dec 10, 2008
1 parent f371d3e commit 4a24bfc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -4645,7 +4645,7 @@ sub git_blame {
if ($group_size) {
$current_color = ++$current_color % $num_colors;
}
print "<tr class=\"$rev_color[$current_color]\">\n";
print "<tr id=\"l$lineno\" class=\"$rev_color[$current_color]\">\n";
if ($group_size) {
print "<td class=\"sha1\"";
print " title=\"". esc_html($author) . ", $date\"";
Expand All @@ -4667,7 +4667,6 @@ sub git_blame {
hash_base => $parent_commit);
print "<td class=\"linenr\">";
print $cgi->a({ -href => "$blamed#l$orig_lineno",
-id => "l$lineno",
-class => "linenr" },
esc_html($lineno));
print "</td>";
Expand Down

0 comments on commit 4a24bfc

Please sign in to comment.