The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit a1b3ac94 authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Restore recordComment ids.

parent a3e8eb86
No related merge requests found
......@@ -83,7 +83,7 @@ function refreshCommentList($target, recordId, recordSource) {
$commentList.empty();
$commentList.append(response.data);
$commentList.find('.delete').unbind('click').click(function() {
var commentId = $(this).attr('id');
var commentId = $(this).attr('id').substr('recordComment'.length);
deleteRecordComment(this, recordId, recordSource, commentId);
return false;
});
......@@ -125,7 +125,8 @@ function registerAjaxCommentRecord() {
});
// Delete links
$('.delete').click(function() {
deleteRecordComment(this, $('.hiddenId').val(), $('.hiddenSource').val(), this.id.substr(13));
var commentId = this.id.substr('recordComment'.length);
deleteRecordComment(this, $('.hiddenId').val(), $('.hiddenSource').val(), commentId);
return false;
});
}
......
......@@ -9,7 +9,7 @@
<small>
<?=$this->escapeHtml($comment->created)?>
<? if (($user = $this->auth()->isLoggedIn()) && $comment->user_id == $user->id): ?>
<a href="<?=$this->recordLink()->getActionUrl($this->driver, 'DeleteComment')?>?delete=<?=urlencode($comment->id)?>" id="<?=$this->escapeHtml($comment->id)?>" class="delete text-danger"><?=$this->transEsc('Delete')?></a>
<a href="<?=$this->recordLink()->getActionUrl($this->driver, 'DeleteComment')?>?delete=<?=urlencode($comment->id)?>" id="recordComment<?=$this->escapeHtml($comment->id)?>" class="delete text-danger"><?=$this->transEsc('Delete')?></a>
<? endif; ?>
</small>
</div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment