Fix JS comment deletion
If the comment tree had just one top level comment the whole tree was removed by the JS code if just one comment in the tree was deleted. These comments were (correctly) not removed from the ZODB.
This commit is contained in:
parent
1b0ba3c0b0
commit
4e0bf9f25e
@ -4,6 +4,9 @@ Changelog
|
||||
2.1.6 (unreleased)
|
||||
------------------
|
||||
|
||||
- Fix excessive JS comment deletion.
|
||||
[gaudenz]
|
||||
|
||||
- No longer depend on zope.app packages.
|
||||
[hannosch]
|
||||
|
||||
|
@ -179,12 +179,6 @@
|
||||
url: form_url,
|
||||
context: $(trigger).parents(".comment"),
|
||||
success: function (data) {
|
||||
if ($(".discussion .replyTreeLevel0").length === 1) {
|
||||
$(".discussion").fadeOut('fast', function () {
|
||||
$(".discussion").remove();
|
||||
});
|
||||
}
|
||||
else {
|
||||
var comment = $(this);
|
||||
var clss = comment.attr('class');
|
||||
// remove replies
|
||||
@ -203,7 +197,6 @@
|
||||
$(this).fadeOut('fast', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function (req, error) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user