[ticket/10270] Disabling links in disappearing content

Disabling click events for blocks that are being removed via ajax

PHPBB3-10270
This commit is contained in:
Vjacheslav Trushkin 2012-02-22 12:08:13 +02:00 committed by Igor Wiedler
parent 10055d58cd
commit cf92528390

View file

@ -10,7 +10,7 @@ phpbb.add_ajax_callback('post_delete', function() {
if (el.attr('data-refresh') === undefined) if (el.attr('data-refresh') === undefined)
{ {
post_id = el[0].href.split('&p=')[1]; post_id = el[0].href.split('&p=')[1];
el.parents('#p' + post_id).fadeOut(function() { el.parents('#p' + post_id).css('pointer-events', 'none').fadeOut(function() {
$(this).remove(); $(this).remove();
}); });
} }
@ -19,14 +19,14 @@ phpbb.add_ajax_callback('post_delete', function() {
// This callback removes the approve / disapprove div or link. // This callback removes the approve / disapprove div or link.
phpbb.add_ajax_callback('post_approve', function(res) { phpbb.add_ajax_callback('post_approve', function(res) {
var remove = (res.approved) ? $(this) : $(this).parents('.post'); var remove = (res.approved) ? $(this) : $(this).parents('.post');
$(remove).fadeOut(function() { $(remove).css('pointer-events', 'none').fadeOut(function() {
$(this).remove(); $(this).remove();
}); });
}); });
// This callback handles the removal of the quick reply form. // This callback handles the removal of the quick reply form.
phpbb.add_ajax_callback('qr-submit', function() { phpbb.add_ajax_callback('qr-submit', function() {
$(this).fadeOut(function() { $(this).css('pointer-events', 'none').fadeOut(function() {
$(this).remove(); $(this).remove();
}); });
}); });