[FIX] website: only show 'Follow tooltip' when possible

Before this commit, the message was always displayed.
Now we only show into the default homepage the message "Follow all the tooltip"
when there at least 1 tooltip in the current page.

task-1878245
This commit is contained in:
Jeremy Kersten
2018-09-13 13:58:23 +02:00
parent 54b70dd6fa
commit 96638bfcb0
3 changed files with 8 additions and 1 deletions
@@ -51,6 +51,12 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
this.$welcomeMessage.css('min-height', $wrap.parent('main').height() - ($wrap.outerHeight(true) - $wrap.height()));
$wrap.empty().append(this.$welcomeMessage);
setTimeout(function(){
if($('.o_tooltip.o_animated').length) {
$('.o_tooltip_container').addClass('show');
}
}, 1000); // ugly hack to wait that tooltip is loaded
return def;
},
@@ -170,6 +170,7 @@
.o_tooltip_container {
display: inline-flex;
align-items: center;
transition: opacity 1s linear;
> .o_tooltip {
@include o-position-absolute;
@@ -3,7 +3,7 @@
<div t-name="website.homepage_editor_welcome_message" class="container text-center o_homepage_editor_welcome_message">
<h2 class="mt0">Welcome to your <b>Homepage</b>!</h2>
<p class="lead d-none d-md-block">Let's start designing.</p>
<div class="o_tooltip_container d-none d-md-block">Follow all the <div class="o_tooltip bottom"/> signs to get your website ready in no time.</div>
<div class="o_tooltip_container d-none d-md-block fade">Follow all the <div class="o_tooltip bottom"/> signs to get your website ready in no time.</div>
</div>
<div t-name="website.leaving_current_page_edition">
<p>What do you want to do?</p>