[feature/ajax] Better handling for zebra

Better handling for zebra: message is displayed instead of first .zebra. Other .zebra entries are emptied, but not completely removed to avoid changing layout.

PHPBB3-10272
This commit is contained in:
Vjacheslav Trushkin 2012-02-09 17:10:16 +02:00 committed by Igor Wiedler
parent 8a0d8c0a84
commit 2ede0b1c81

View file

@ -41,8 +41,8 @@ phpbb.add_ajax_callback('zebra', function(res) {
if (res.success) {
zebra = $('.zebra');
zebra.html(res.MESSAGE_TEXT);
$(zebra.get(1)).remove();
zebra.first().html(res.MESSAGE_TEXT);
zebra.not(':first').html(' ').prev().html(' ');
}
});