From ac320fad0599184f458786455cc441010d6f6d35 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sat, 31 Mar 2012 01:57:10 +0300 Subject: [PATCH] [ticket/10270] Alter background colors for posts Change background colors for posts after deleted post PHPBB3-10270 --- phpBB/styles/prosilver/template/ajax.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 3ad03f1539..cc886c42b1 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -10,7 +10,14 @@ phpbb.add_ajax_callback('post_delete', function() { if (el.attr('data-refresh') === undefined) { post_id = el[0].href.split('&p=')[1]; - el.parents('#p' + post_id).css('pointer-events', 'none').fadeOut(function() { + var post = el.parents('#p' + post_id).css('pointer-events', 'none'); + if (post.hasClass('bg1') || post.hasClass('bg2')) + { + var posts1 = post.nextAll('.bg1'); + post.nextAll('.bg2').removeClass('bg2').addClass('bg1'); + posts1.removeClass('bg1').addClass('bg2'); + } + post.fadeOut(function() { $(this).remove(); }); }