mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-12-29 11:49:59 +01:00
Set location information to reply comment correctly
This commit is contained in:
@@ -8,29 +8,6 @@
|
||||
@if(comment.newLine.isDefined){newline="@comment.newLine.get"}
|
||||
@if(comment.oldLine.isDefined){oldline="@comment.oldLine.get"}>
|
||||
<div class="commit-comment-@comment.commentId">
|
||||
@*
|
||||
<div class="panel-heading">
|
||||
@helpers.avatar(comment.commentedUserName, 20)
|
||||
@helpers.user(comment.commentedUserName, styleClass="username strong")
|
||||
<span class="muted">
|
||||
commented on
|
||||
@if(comment.issueId.isDefined){
|
||||
<a href="@helpers.url(repository)/pull/@comment.issueId">#@comment.issueId</a>
|
||||
}
|
||||
@comment.fileName.map { fileName =>
|
||||
@fileName in
|
||||
}
|
||||
<a href="@context.path/@repository.owner/@repository.name/commit/@comment.commitId">@comment.commitId.substring(0, 7)</a>
|
||||
@gitbucket.core.helper.html.datetimeago(comment.registeredDate)
|
||||
</span>
|
||||
<span class="pull-right">
|
||||
@if(hasWritePermission || context.loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){
|
||||
<a href="#" data-comment-id="@comment.commentId"><i class="octicon octicon-pencil"></i></a>
|
||||
<a href="#" data-comment-id="@comment.commentId"><i class="octicon octicon-x"></i></a>
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
*@
|
||||
<div class="markdown-body">
|
||||
<div>
|
||||
@helpers.avatar(comment.commentedUserName, 20)
|
||||
|
||||
@@ -365,14 +365,14 @@ $(function(){
|
||||
});
|
||||
for(var key in elements){
|
||||
filename = elements[key]['filename'];
|
||||
oldline = elements[key]['oldline'];
|
||||
newline = elements[key]['newline'];
|
||||
oldline = elements[key]['oldline'] ? elements[key]['oldline'] : '';
|
||||
newline = elements[key]['newline'] ? elements[key]['newline'] : '';
|
||||
|
||||
var $v = $('<div class="commit-comment-box reply-comment-box">')
|
||||
.append($('<input type="text" class="form-control reply-comment" placeholder="Reply...">')
|
||||
.data('filename', filename)
|
||||
.data('newline', newline)
|
||||
.data('oldline', oldline));
|
||||
.append($('<input type="text" class="form-control reply-comment" placeholder="Reply..." '
|
||||
+ 'data-filename="' + filename + '" '
|
||||
+ 'data-newline="' + newline + '" '
|
||||
+ 'data-oldline="' + oldline + '">'));
|
||||
|
||||
var tmp;
|
||||
if (typeof oldline !== 'undefined') {
|
||||
|
||||
Reference in New Issue
Block a user