Reply button is not removed when deleting a code review comment (#13824)
Backport #13774
This commit is contained in:
parent
0d43a2a069
commit
10fff12da4
3 changed files with 100 additions and 90 deletions
|
@ -166,6 +166,7 @@
|
||||||
<td class="lines-num"></td>
|
<td class="lines-num"></td>
|
||||||
<td class="lines-type-marker"></td>
|
<td class="lines-type-marker"></td>
|
||||||
<td class="add-comment-left">
|
<td class="add-comment-left">
|
||||||
|
<div class="conversation-holder">
|
||||||
{{if and $resolved (eq $line.GetCommentSide "previous")}}
|
{{if and $resolved (eq $line.GetCommentSide "previous")}}
|
||||||
<div class="ui top attached header">
|
<div class="ui top attached header">
|
||||||
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
||||||
|
@ -198,10 +199,12 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="lines-num"></td>
|
<td class="lines-num"></td>
|
||||||
<td class="lines-type-marker"></td>
|
<td class="lines-type-marker"></td>
|
||||||
<td class="add-comment-right">
|
<td class="add-comment-right">
|
||||||
|
<div class="conversation-holder">
|
||||||
{{if and $resolved (eq $line.GetCommentSide "proposed")}}
|
{{if and $resolved (eq $line.GetCommentSide "proposed")}}
|
||||||
<div class="ui top attached header">
|
<div class="ui top attached header">
|
||||||
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
||||||
|
@ -234,6 +237,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="lines-num"></td>
|
<td colspan="2" class="lines-num"></td>
|
||||||
<td class="add-comment-left add-comment-right" colspan="2">
|
<td class="add-comment-left add-comment-right" colspan="2">
|
||||||
|
<div class="conversation-holder">
|
||||||
{{if $resolved}}
|
{{if $resolved}}
|
||||||
<div class = "ui attached header">
|
<div class = "ui attached header">
|
||||||
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span>
|
||||||
|
@ -69,6 +70,7 @@
|
||||||
</button>
|
</button>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1055,7 +1055,11 @@ async function initRepository() {
|
||||||
$.post($this.data('url'), {
|
$.post($this.data('url'), {
|
||||||
_csrf: csrf
|
_csrf: csrf
|
||||||
}).done(() => {
|
}).done(() => {
|
||||||
|
const $conversationHolder = $this.closest('.conversation-holder');
|
||||||
$(`#${$this.data('comment-id')}`).remove();
|
$(`#${$this.data('comment-id')}`).remove();
|
||||||
|
if ($conversationHolder.length && !$conversationHolder.find('.comment').length) {
|
||||||
|
$conversationHolder.remove();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Reference in a new issue