From 95ab97c2f3d9b1f9b0ff45cea61652bf6849aff2 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Wed, 20 Feb 2019 14:40:29 +0000 Subject: [PATCH] [FIX] website_slides: reload page when joining channel When a user join a channel, the button 'join' changed and indicates him that he is now member, but since the page is not refreshed, he still can not access to slides displayed on the page. This commit makes the widget trigger a page refresh. Commit linked to task ID 1941250 and PR #31317. --- addons/website_slides/static/src/js/slides_join_channel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_slides/static/src/js/slides_join_channel.js b/addons/website_slides/static/src/js/slides_join_channel.js index 342e27e738f..39e454dc93a 100644 --- a/addons/website_slides/static/src/js/slides_join_channel.js +++ b/addons/website_slides/static/src/js/slides_join_channel.js @@ -51,10 +51,10 @@ var JoinChannelButton = Widget.extend({ }, }).then(function (data) { if (! data.error) { - self.$('a.o_wslides_join_channel_link').text(_t('Joined')); + location.reload(); } else { if (data.error === 'public_user') { - self._popoverAlert(self.$el, _.str.sprintf(_t('Please login to join this channel.'), (document.URL))); + self._popoverAlert(self.$el, _.str.sprintf(_t('Please login to join this course.'), (document.URL))); } else if (data.error === 'join_done') { self._popoverAlert(self.$el, _t('You have already joined this channel')); } else {