diff options
Diffstat (limited to 'phpBB/styles/prosilver/template')
| -rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 5 |
1 files changed, 3 insertions, 2 deletions
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(); }); }); |
