1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

[feature/soft-delete] Update restoring feature to use ajax if requested.

Also fixes the mcp as a hole:
- displayes a success message
- gives a link to the post, if only one was restored

PHPBB3-9657
This commit is contained in:
Joas Schilling
2012-08-29 18:42:14 +02:00
parent b774c09c7f
commit 8a036fa3e4
5 changed files with 33 additions and 12 deletions

View File

@@ -24,8 +24,8 @@ phpbb.add_ajax_callback('post_delete', function() {
});
// This callback removes the approve / disapprove div or link.
phpbb.add_ajax_callback('post_approve', function(res) {
var remove = (res.approved) ? $(this) : $(this).parents('.post');
phpbb.add_ajax_callback('post_visibility', function(res) {
var remove = (res.visible) ? $(this) : $(this).parents('.post');
$(remove).css('pointer-events', 'none').fadeOut(function() {
$(this).remove();
});