mirror of https://github.com/go-gitea/gitea.git
fix #15718 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
0a32861b28
commit
717b313c34
|
@ -111,6 +111,7 @@
|
|||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{if $.Permission.CanRead $.UnitTypeIssues}}
|
||||
<div class="code-view-menu-list ui fluid popup transition hidden">
|
||||
<div class="ui column relaxed equal height">
|
||||
<div class="column">
|
||||
|
@ -122,6 +123,7 @@
|
|||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2180,6 +2180,10 @@ function searchRepositories() {
|
|||
}
|
||||
|
||||
function showCodeViewMenu() {
|
||||
if ($('.code-view-menu-list').length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get clicked tr
|
||||
const $code_tr = $('.code-view td.lines-code.active').parent();
|
||||
|
||||
|
@ -2834,6 +2838,11 @@ function selectRange($list, $select, $from) {
|
|||
|
||||
// add hashchange to permalink
|
||||
const $issue = $('a.ref-in-new-issue');
|
||||
|
||||
if ($issue.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const matched = $issue.attr('href').match(/%23L\d+$|%23L\d+-L\d+$/);
|
||||
if (matched) {
|
||||
$issue.attr('href', $issue.attr('href').replace($issue.attr('href').substr(matched.index), `%23L${a}-L${b}`));
|
||||
|
@ -2849,6 +2858,11 @@ function selectRange($list, $select, $from) {
|
|||
|
||||
// add hashchange to permalink
|
||||
const $issue = $('a.ref-in-new-issue');
|
||||
|
||||
if ($issue.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const matched = $issue.attr('href').match(/%23L\d+$|%23L\d+-L\d+$/);
|
||||
if (matched) {
|
||||
$issue.attr('href', $issue.attr('href').replace($issue.attr('href').substr(matched.index), `%23${$select.attr('rel')}`));
|
||||
|
|
Loading…
Reference in New Issue