Only switch on the line number toggle when highlighting is activated

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2011-09-25 10:23:29 +02:00
committed by Karsten Blees
parent 26109b246d
commit 2d8053b226

View File

@@ -4543,7 +4543,8 @@ sub git_print_page_path {
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
hash_base=>$hb),
-title => $name}, esc_path($basename));
print '&nbsp;&nbsp;&nbsp;&nbsp;
if (gitweb_check_feature('highlight')) {
print '&nbsp;&nbsp;&nbsp;&nbsp;
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
<script>
function toggleLineNumbers() {
@@ -4564,6 +4565,7 @@ document.getElementsByTagName("head")[0].appendChild(style);
toggleLineNumbers();
</script>
';
}
} elsif (defined $type && $type eq 'tree') {
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
hash_base=>$hb),