Skip to content
Snippets Groups Projects
Commit 4536764a authored by nans's avatar nans
Browse files

[FIX] website_mail_channel: fix load more replies

On a thread with at least 21 replies, click on "show N more replies".
The first time, it does the last 10 replies.
Click again: it appends the same batch of 10 replies to the thread.
The button loads the replies starting from the last reply id,
but this id is not updated after load.

This is because the code searches for a `p.well` in the DOM
assumed to be the `o_mg_read_more` parent (see c40f1841).
However, commit 59237ea8 removed the `.well` class of the parent.
The new button is not found, the old button is not removed, and so it goes.
parent 7f25f9dc
Branches
Tags
No related merge requests found
......@@ -37,9 +37,9 @@ $(document).ready(function () {
if ($thread_container) {
var $last_msg = $thread_container.find('li.media').last();
$(data).find('li.media').insertAfter($last_msg);
$(data).find('p.well').appendTo($thread_container);
$(data).find('.o_mg_read_more').parent().appendTo($thread_container);
}
var $show_more = $link.parents('p.well').first();
var $show_more = $link.parent();
$show_more.remove();
return true;
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment