Skip to content
Snippets Groups Projects
Commit 1108d991 authored by fw-bot's avatar fw-bot Committed by Martin Trigaux
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.

Forward-Port of 4536764a

closes odoo/odoo#60643

X-original-commit: 69dd830a15da2d7e43e6040e26d960d2e941002e
Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent ee1580a8
No related branches found
No related tags found
No related merge requests found
......@@ -60,9 +60,9 @@ publicWidget.registry.websiteMailChannel = publicWidget.Widget.extend({
if ($threadContainer) {
var $lastMsg = $threadContainer.find('li.media').last();
$(data).find('li.media').insertAfter($lastMsg);
$(data).find('p.well').appendTo($threadContainer);
$(data).find('.o_mg_read_more').parent().appendTo($threadContainer);
}
var $showMore = $link.parents('p.well').first();
var $showMore = $link.parent();
$showMore.remove();
return;
});
......
......@@ -29,3 +29,4 @@ François Honoré francois.honore@acsone.eu https://github.com/acsonefho
Denis Robinet denis.robinet@acsone.eu https://github.com/RobinetDenisAcsone
Benoit Aimont benoit.aimont@acsone.eu https://github.com/baimont
Bejaoui Souheil souheil.bejaoui@acsone.eu https://github.com/sbejaoui
Nans Lefebvre nans.lefebvre@acsone.eu https://github.com/len-foss
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment