From b80d06d32759415dbc10191b91076d48f2d29d23 Mon Sep 17 00:00:00 2001 From: "chm@openerp.com" <> Date: Wed, 19 Mar 2014 10:20:12 +0100 Subject: [PATCH] [FIX] website tour: reset tour before console.log 'ok' or 'error' who close phantomjs tour bzr revid: chm@openerp.com-20140319092012-v83w99ts6z0apgl0 --- addons/website/static/src/js/website.tour.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 2254ff9c84f..fb98fda008c 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -372,12 +372,13 @@ website.Tour = openerp.Class.extend({ } }, endTour: function () { - if (parseInt(this.localStorage.getItem("tour-"+this.id+"-test"),10) >= this.steps.length-1) { + var test = parseInt(this.localStorage.getItem("tour-"+this.id+"-test"),10) >= this.steps.length-1; + this.reset(); + if (test) { console.log('ok'); } else { console.log('error'); } - this.reset(); }, autoNextStep: function () { var self = this;