diff --git a/addons/website/static/src/js/website.tour.banner.js b/addons/website/static/src/js/website.tour.banner.js index 874f219c69f..bb4b576ba24 100644 --- a/addons/website/static/src/js/website.tour.banner.js +++ b/addons/website/static/src/js/website.tour.banner.js @@ -18,7 +18,6 @@ startPath: '/page/website.homepage', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome', @@ -62,6 +61,7 @@ content: "Drag the Banner block and drop it in your page.", template: render('website.tour_popover'), onShow: function () { + var $body = $(document.body); function beginDrag () { $('.popover.tour').remove(); function goToNextStep () { @@ -72,7 +72,6 @@ $body.off('mousedown', beginDrag); $body.on('mouseup', goToNextStep); } - $body.on('mousedown', beginDrag); }, }, diff --git a/addons/website/static/src/js/website.tour.install-app.js b/addons/website/static/src/js/website.tour.install-app.js index f10c5c951ca..d7d98fb5430 100644 --- a/addons/website/static/src/js/website.tour.install-app.js +++ b/addons/website/static/src/js/website.tour.install-app.js @@ -17,7 +17,6 @@ name: "Install a new App", init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-install-app', diff --git a/addons/website/static/src/js/website.tour.menu-editor.js b/addons/website/static/src/js/website.tour.menu-editor.js index b4dedc11c3b..b37d3c3813e 100644 --- a/addons/website/static/src/js/website.tour.menu-editor.js +++ b/addons/website/static/src/js/website.tour.menu-editor.js @@ -17,7 +17,6 @@ name: "Add a new page", init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-menu-editor', diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index 9ffb89b975b..02c69530ce5 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -18,7 +18,6 @@ startPath: '/blog/cat/1/', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-blog', diff --git a/addons/website_sale/static/src/js/website.tour.shop.js b/addons/website_sale/static/src/js/website.tour.shop.js index 35035853fe3..6b67836ac84 100644 --- a/addons/website_sale/static/src/js/website.tour.shop.js +++ b/addons/website_sale/static/src/js/website.tour.shop.js @@ -18,7 +18,6 @@ startPath: '/shop', init: function (editor) { var self = this; - var $body = $(document.body); self.steps = [ { stepId: 'welcome-shop',