mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 08:55:20 +02:00
Make diff line-marker non-selectable (#7279)
* Make diff line-marker non-selectable * Move to use data-* as per @mrsdizzie * fix missing line nums * Add a minimum-width to force right-align of the line num * Move line-type-marker into separate column
This commit is contained in:
parent
e07ff2f890
commit
5908bb1030
6 changed files with 70 additions and 32 deletions
|
@ -8,13 +8,16 @@
|
|||
{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}}
|
||||
</td>
|
||||
{{else}}
|
||||
<td class="lines-num lines-num-old">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
|
||||
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}"></span>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
|
||||
<td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}"></span>
|
||||
</td>
|
||||
{{end}}
|
||||
<td class="lines-type-marker">
|
||||
<pre><span class="line-type-marker" data-type-marker="{{$line.GetLineTypeMarker}}"></span></pre>
|
||||
</td>
|
||||
<td class="lines-code {{if (not $line.RightIdx)}}lines-code-old{{end}}">
|
||||
{{if and $.root.SignedUserID $line.CanComment $.root.PageIsPullFiles}}
|
||||
<a class="ui green button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">+</a>
|
||||
|
@ -25,6 +28,7 @@
|
|||
{{if gt (len $line.Comments) 0}}
|
||||
<tr>
|
||||
<td colspan="2" class="lines-num"></td>
|
||||
<td class="lines-type-marker"></td>
|
||||
<td class="add-comment-left add-comment-right">
|
||||
<div class="field comment-code-cloud">
|
||||
<div class="comment-list">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue