From 8a036fa3e4e1fc51a3eb7fded346ccbd84a291b5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 29 Aug 2012 18:42:14 +0200 Subject: [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 --- phpBB/styles/prosilver/template/ajax.js | 4 ++-- phpBB/styles/prosilver/template/viewtopic_body.html | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'phpBB/styles/prosilver') diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 54f34e4204..b473e608dc 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -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(); }); diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html index 6f0dbfc1eb..ddcca7e9aa 100644 --- a/phpBB/styles/prosilver/template/viewtopic_body.html +++ b/phpBB/styles/prosilver/template/viewtopic_body.html @@ -139,7 +139,7 @@

{postrow.MINI_POST_IMG}{postrow.MINI_POST_IMG}{L_POST_BY_AUTHOR} {postrow.POST_AUTHOR_FULL} » {postrow.POST_DATE}

-
+

{UNAPPROVED_IMG} {L_POST_UNAPPROVED} @@ -147,8 +147,15 @@ {S_FORM_TOKEN} -
- {DELETED_IMG} {L_POST_DELETED_RESTORE}
+
+ + {DELETED_IMG} {L_POST_DELETED} + + + + {S_FORM_TOKEN} +
+ {REPORTED_IMG} {L_POST_REPORTED}

-- cgit v1.2.1