[FIX] website_slides: fix the title of the page in fullscreen mode

before this commit, the title of the page is not correct in fullscreen mode

after this commit, set the lesson name as the page title in the fullscreen mode
and changed the title of the page as per click on lesson name

task-2040899

closes odoo/odoo#35161

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
jpr-odoo
2019-07-30 11:37:22 +00:00
parent 9885ccfda4
commit 21fb7a1f00
2 changed files with 3 additions and 0 deletions
@@ -600,6 +600,8 @@ odoo.define('website_slides.fullscreen', function (require) {
var slide = this.get('slide');
self._pushUrlState();
return this._fetchSlideContent().then(function() { // render content
var websiteName = document.title.split(" | ")[1]; // get the website name from title
document.title = (websiteName) ? slide.name + ' | ' + websiteName : slide.name;
return self._renderSlide();
}).then(function() {
if (slide._autoSetDone && !session.is_website_user) { // no useless RPC call
@@ -7,6 +7,7 @@
<link rel="canonical" t-att-href="slide.website_url" />
</t>
<t t-call="website.layout">
<t t-set="main_object" t-value="slide"/>
<div class="o_wslides_fs_main d-flex flex-column font-weight-light"
t-att-data-channel-id="slide.channel_id.id"
t-att-data-channel-enroll="slide.channel_id.enroll"