Delete own comments

Add permission to allow comment authors to delete their own comments if
there are no replies yet.
This commit is contained in:
Gaudenz Steinlin
2012-05-07 13:02:07 +02:00
parent 3eab51e1c4
commit a7b3c818f2
8 changed files with 98 additions and 2 deletions
@@ -193,6 +193,9 @@
$(this).remove();
});
});
// Add delete button to the parent
var parent = comment.prev('[class*="replyTreeLevel' + (treelevel - 1) + '"]');
parent.find('form[name="delete"]').css('display', 'inline');
// remove comment
$(this).fadeOut('fast', function () {
$(this).remove();