1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 09:46:46 +02:00

[ticket/10273] Fixed accepting / denying posts AJAX.

PHPBB3-10273
This commit is contained in:
Callum Macrae
2012-02-19 17:07:24 +00:00
committed by Igor Wiedler
parent 64df9d1406
commit d8e21952fa
2 changed files with 32 additions and 4 deletions

View File

@@ -17,8 +17,9 @@ phpbb.add_ajax_callback('post_delete', function() {
});
// This callback removes the approve / disapprove div or link.
phpbb.add_ajax_callback('post_approve', function(res, act) {
$(this).parents((act === 'approve') ? '.rules' : '.post').fadeOut(function() {
phpbb.add_ajax_callback('post_approve', function(res) {
var remove = (res.approved) ? $(this) : $(this).parents('.post');
$(remove).fadeOut(function() {
$(this).remove();
});
});