[REV] website_slides : Adjust container to contain the full course name

This reverts commit 27a1ccc8 which fixed the container height
when course name was too long. It added a 'visibility: hidden'
style which caused an issue on the course left bar where the
progress bar and completed tag are located next to each other.

Task-3607404

X-original-commit: cac68b35777210c3f96a5bd187b479589716145d
Part-of: odoo/odoo#151736
This commit is contained in:
Patrick Hoste
2024-01-31 06:59:13 +00:00
parent 98c0068033
commit 8c993deca6
2 changed files with 8 additions and 25 deletions
@@ -35,22 +35,6 @@ export const SlideCoursePage = publicWidget.Widget.extend({
}
},
/**
* @override
*/
start: function () {
// TODO: we need to clean this code and make the changes in the view in master
const $completed = $('.o_wslides_channel_completion_completed');
const $progressbar = $('.o_wslides_channel_completion_progressbar');
if($progressbar.hasClass('d-none')){
$progressbar.removeClass('d-none').addClass('d-flex').addClass('hidden-progressbar-completed-tag');
}
if($completed.hasClass('d-none')){
$completed.removeClass('d-none').addClass('hidden-progressbar-completed-tag');
}
return this._super.apply(this, arguments)
},
/**
* Greens up the bullet when the slide is completed
*
@@ -90,12 +74,12 @@ export const SlideCoursePage = publicWidget.Widget.extend({
if (completion < 100) {
// Hide the "Completed" text and show the progress bar
$completed.addClass('hidden-progressbar-completed-tag');
$progressbar.removeClass('hidden-progressbar-completed-tag');
$completed.addClass('d-none');
$progressbar.removeClass('d-none').addClass('d-flex');
} else {
// Hide the progress bar and show the "Completed" text
$completed.removeClass('hidden-progressbar-completed-tag');
$progressbar.addClass('hidden-progressbar-completed-tag');
$completed.removeClass('d-none');
$progressbar.addClass('d-none').removeClass('d-flex');
}
$progressbar.find('.progress-bar').css('width', `${completion}%`);
@@ -617,11 +617,10 @@ $line-height-truncate: 1.25em;
}
}
.hidden-progressbar-completed-tag {
visibility: hidden;
@include media-breakpoint-down(sm) {
display: none !important;
}
// Enforce the height of the lesson header, so the DOM element size do not change
// when the completion progressbar become visible / hidden
.o_wslides_lesson_header_container {
height: 80px;
}
.o_wslides_fs_sidebar_section {