From 1af84c99dff740dd72fbb012c50715281abc0447 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 18 Sep 2020 12:05:58 +0000 Subject: [PATCH] [IMP] web_tour: remove consume button option in step content This reverts commit 27158a0f612897e41601bf9e9d20861e9b87279f Why keep a new option now that it has been developped ? X-original-commit: bd4628e69df1e27498f88f348812a269cc9d3648 --- addons/web_tour/static/src/js/tip.js | 14 -------------- addons/web_tour/static/src/scss/tip.scss | 6 ------ addons/website/static/src/js/tours/tour_utils.js | 1 - 3 files changed, 21 deletions(-) diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js index c800bc31c1e..3f94b17bde2 100644 --- a/addons/web_tour/static/src/js/tip.js +++ b/addons/web_tour/static/src/js/tip.js @@ -14,7 +14,6 @@ var Tip = Widget.extend({ mouseenter: '_onMouseEnter', mouseleave: '_onMouseLeave', transitionend: '_onTransitionEnd', - 'click .btn_consume_event': '_onNextStep', }, /** @@ -67,9 +66,6 @@ var Tip = Widget.extend({ this.is_anchor_fixed_position = this.$anchor.css("position") === "fixed"; - if (this.info.optional === "true") { - this.info.content += ""; - } // The body never needs to have the o_tooltip_parent class. It is a // safe place to put the tip in the DOM at initialization and be able // to compute its dimensions and reposition it if required. @@ -87,9 +83,6 @@ var Tip = Widget.extend({ this.scrollContentWidth = this.$tooltip_content.outerWidth(true); this.scrollContentHeight = this.$tooltip_content.outerHeight(true); this.$tooltip_content.html(this.info.content); - if (this.info.optional === "true") { - this.content_height += this.$tooltip_content.children('button').outerHeight() + 5; // +5 to add a small margin - } this.$window = $(window); this.$tooltip_content.css({ @@ -500,13 +493,6 @@ var Tip = Widget.extend({ // Handlers //-------------------------------------------------------------------------- - /** - * @private - */ - _onNextStep: function () { - this.trigger("tip_consumed"); - this._unbind_anchor_events(); - }, /** * @private */ diff --git a/addons/web_tour/static/src/scss/tip.scss b/addons/web_tour/static/src/scss/tip.scss index 8495e00feef..1e9a9e34a47 100644 --- a/addons/web_tour/static/src/scss/tip.scss +++ b/addons/web_tour/static/src/scss/tip.scss @@ -149,12 +149,6 @@ > p:last-child { margin-bottom: 0; } - - .btn_consume_event { - position: absolute; - bottom: 5px; - right: 5px; - } } &.active { diff --git a/addons/website/static/src/js/tours/tour_utils.js b/addons/website/static/src/js/tours/tour_utils.js index 5db61872157..748a8f390d2 100644 --- a/addons/website/static/src/js/tours/tour_utils.js +++ b/addons/website/static/src/js/tours/tour_utils.js @@ -163,7 +163,6 @@ function clickOnText(snippet, element, position = "bottom") { position: position, run: "text", consumeEvent: "input", - optional: "true", }; }