mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/10272] Zebra operations using AJAX are now less hacky.
Before, they were splitting stuff by the <br />, and now JSON::add() is being used. PHPBB3-10272
This commit is contained in:
committed by
Igor Wiedler
parent
83095c2a2d
commit
082c5c5b32
@@ -364,8 +364,8 @@ phpbb.add_ajax_callback('post_delete', function(el) {
|
||||
phpbb.ajaxify({selector: tr.next().find('.up').children('a')}, false, 'forum_up');
|
||||
}
|
||||
}).add_ajax_callback('zebra', function(el, res) {
|
||||
if (res.MESSAGE_TEXT.indexOf('successfully') !== -1) {
|
||||
$('.zebra').html(res.MESSAGE_TEXT.split('<br')[0]);
|
||||
if (res.success) {
|
||||
$('.zebra').html(res.message);
|
||||
$($('.zebra').get(1)).remove();
|
||||
}
|
||||
});;
|
||||
|
Reference in New Issue
Block a user