1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

#1601 support delete issue comment

This commit is contained in:
Unknwon
2016-07-26 02:48:17 +08:00
parent 2295fafb34
commit 899e799459
14 changed files with 113 additions and 27 deletions

View File

@@ -1452,7 +1452,10 @@ footer .ui.language .menu {
.repository.view.issue .comment-list .comment .actions .item {
float: left;
}
.repository.view.issue .comment-list .comment .actions a.item {
.repository.view.issue .comment-list .comment .actions .item.tag {
margin-right: 5px;
}
.repository.view.issue .comment-list .comment .actions .item.action {
margin-top: 6px;
margin-left: 10px;
}

View File

@@ -342,7 +342,7 @@ function initRepository() {
// Edit issue or comment content
$('.edit-content').click(function () {
var $segment = $(this).parent().parent().next();
var $segment = $(this).parent().parent().parent().next();
var $edit_content_zone = $segment.find('.edit-content-zone');
var $render_content = $segment.find('.render-content');
var $raw_content = $segment.find('.raw-content');
@@ -404,6 +404,19 @@ function initRepository() {
return false;
});
// Delete comment
$('.delete-comment').click(function () {
var $this = $(this);
if (confirm($this.data('locale'))) {
$.post($this.data('url'), {
"_csrf": csrf
}).success(function() {
$('#' + $this.data('comment-id')).remove();
})
}
return false;
});
// Change status
var $status_btn = $('#status-button');
$('#content').keyup(function () {

View File

@@ -393,10 +393,13 @@
.actions {
.item {
float: left;
}
a.item {
margin-top: 6px;
margin-left: 10px;
&.tag {
margin-right: 5px;
}
&.action {
margin-top: 6px;
margin-left: 10px;
}
}
}
.content {