diff options
| author | Jeremy Kersten <jke@odoo.com> | 2018-09-13 12:31:18 +0200 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2018-09-13 13:58:23 +0200 |
| commit | 96638bfcb08c5a2c0b6e556d16cdede99f2a4de9 (patch) | |
| tree | 0c1a30ee001e3877b8dc34347daab1d16de1f869 | |
| parent | 54b70dd6fac4c852f3af31e59694d8cfe16da608 (diff) | |
[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
| -rw-r--r-- | addons/website/static/src/js/menu/edit.js | 6 | ||||
| -rw-r--r-- | addons/website/static/src/scss/website.edit_mode.scss | 1 | ||||
| -rw-r--r-- | addons/website/static/src/xml/website.editor.xml | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/addons/website/static/src/js/menu/edit.js b/addons/website/static/src/js/menu/edit.js index 0397b1f8aca..0fa1e0479d0 100644 --- a/addons/website/static/src/js/menu/edit.js +++ b/addons/website/static/src/js/menu/edit.js @@ -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; }, diff --git a/addons/website/static/src/scss/website.edit_mode.scss b/addons/website/static/src/scss/website.edit_mode.scss index a93cc90f49d..0bc39b4f1a1 100644 --- a/addons/website/static/src/scss/website.edit_mode.scss +++ b/addons/website/static/src/scss/website.edit_mode.scss @@ -170,6 +170,7 @@ .o_tooltip_container { display: inline-flex; align-items: center; + transition: opacity 1s linear; > .o_tooltip { @include o-position-absolute; diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index 0c78fb1250d..5b3f456caf9 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -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> |
