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) { ...@@ -83,7 +83,7 @@ function refreshCommentList($target, recordId, recordSource) {
$commentList.empty(); $commentList.empty();
$commentList.append(response.data); $commentList.append(response.data);
$commentList.find('.delete').unbind('click').click(function() { $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); deleteRecordComment(this, recordId, recordSource, commentId);
return false; return false;
}); });
...@@ -125,7 +125,8 @@ function registerAjaxCommentRecord() { ...@@ -125,7 +125,8 @@ function registerAjaxCommentRecord() {
}); });
// Delete links // Delete links
$('.delete').click(function() { $('.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; return false;
}); });
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<small> <small>
<?=$this->escapeHtml($comment->created)?> <?=$this->escapeHtml($comment->created)?>
<? if (($user = $this->auth()->isLoggedIn()) && $comment->user_id == $user->id): ?> <? 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; ?> <? endif; ?>
</small> </small>
</div> </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