From 14e2600a79357d4f19d11e3d363861906dec4392 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 27 Oct 2010 16:10:04 +0000 Subject: [PATCH] Make ajax call for delete comment button work for comment replies. svn path=/plone.app.discussion/trunk/; revision=40853 --- plone/app/discussion/browser/javascripts/comments.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index eff4196..dfce697 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -169,14 +169,15 @@ var form = $(this).parents("form"); var data = $(form).serialize(); var form_url = $(form).attr("action"); + var comment_div = form.parent().parent(); $.ajax({ type:'POST', url:form_url, context: $(trigger).parents(".comment"), success: function(data) { if($(".discussion .comment").length == 1) { - $(".discussion").fadeOut('fast', function() { - $(".discussion").remove(); + comment_div.fadeOut('fast', function() { + comment_div.remove(); }); } else {