From 3655f43e42475da4be76c5d2f51facfdd8274b52 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Oct 2013 17:11:44 +0200 Subject: [IMP] warnings and shit bzr revid: xmo@openerp.com-20131022151144-tblwba9rf77iuidl --- addons/website/static/src/js/website.tour.basic.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'addons/website/static/src/js/website.tour.basic.js') diff --git a/addons/website/static/src/js/website.tour.basic.js b/addons/website/static/src/js/website.tour.basic.js index 82ad4790c25..876d2a7b5b9 100644 --- a/addons/website/static/src/js/website.tour.basic.js +++ b/addons/website/static/src/js/website.tour.basic.js @@ -10,6 +10,7 @@ name: "Insert a banner", init: function (editor) { var self = this; + var $body = $(document.body); self.steps = [ { stepId: 'welcome', @@ -56,15 +57,16 @@ onShow: function () { function beginDrag () { $('.popover.tour').remove(); - $('body').off('mousedown', beginDrag); function goToNextStep () { $('#oe_snippets').hide(); self.movetoStep('edit-title'); - $('body').off('mouseup', goToNextStep); + $body.off('mouseup', goToNextStep); } - $('body').on('mouseup', goToNextStep); + $body.off('mousedown', beginDrag); + $body.on('mouseup', goToNextStep); } - $('body').on('mousedown', beginDrag); + + $body.on('mousedown', beginDrag); }, }, { @@ -121,7 +123,7 @@ title: "Help is always available", content: "But you can always click here if you want more tutorials.", template: render('website.tour_popover', { end: "Close" }), - }, + } ]; return this._super(); }, @@ -158,4 +160,4 @@ }, }); -}()); \ No newline at end of file +}()); -- cgit v1.2.3