From d8e21952fa4660ba2ccc6587bef6275c8cddab37 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Sun, 19 Feb 2012 17:07:24 +0000 Subject: [ticket/10273] Fixed accepting / denying posts AJAX. PHPBB3-10273 --- phpBB/styles/prosilver/template/ajax.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/styles/prosilver/template') diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index f82da9f70e..f42c37fbce 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -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(); }); }); -- cgit v1.2.1