[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 (seec40f184). However, commit59237earemoved 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 4536764ad52b5b closes odoo/odoo#60647 X-original-commit: 69dd830a15da2d7e43e6040e26d960d2e941002e Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user