Automatically reload batch moderation page if no comments are left. This refs #11298.
svn path=/plone.app.discussion/trunk/; revision=51274
This commit is contained in:
parent
7225fc78ad
commit
dbda349768
@ -4,6 +4,10 @@ Changelog
|
||||
2.0.8 (unreleased)
|
||||
------------------
|
||||
|
||||
- Automatically reload batch moderation page if no comments are left. This
|
||||
fixes http://dev.plone.org/plone/ticket/11298.
|
||||
[timo]
|
||||
|
||||
|
||||
2.0.7 (2011-07-15)
|
||||
------------------
|
||||
|
@ -36,6 +36,11 @@
|
||||
$(row).fadeOut("normal", function () {
|
||||
$(this).remove();
|
||||
});
|
||||
// reload page if all comments have been removed
|
||||
var comments = $("table#review-comments > tbody > tr");
|
||||
if (comments.length === 1) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
error: function (msg) {
|
||||
alert("Error sending AJAX request:" + target);
|
||||
@ -62,6 +67,11 @@
|
||||
$(row).fadeOut("normal", function () {
|
||||
$(this).remove();
|
||||
});
|
||||
// reload page if all comments have been removed
|
||||
var comments = $("table#review-comments > tbody > tr");
|
||||
if (comments.length === 1) {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
error: function (msg) {
|
||||
alert("Error sending AJAX request:" + target);
|
||||
@ -96,6 +106,11 @@
|
||||
row.remove();
|
||||
});
|
||||
});
|
||||
// reload page if all comments have been removed
|
||||
var comments = $("table#review-comments > tbody > tr");
|
||||
if (comments.length <= valArray.length) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
// reset the bulkaction select
|
||||
selectField.find("option[value='-1']").attr('selected', 'selected');
|
||||
@ -139,7 +154,7 @@
|
||||
error: function (msg) {
|
||||
alert("Error getting full comment text:" + target);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user