[FIX] website tour: reset tour before console.log 'ok' or 'error' who close phantomjs tour

bzr revid: chm@openerp.com-20140319092012-v83w99ts6z0apgl0
This commit is contained in:
chm@openerp.com 2014-03-19 10:20:12 +01:00
parent a762af1f21
commit b80d06d327
1 changed files with 3 additions and 2 deletions

View File

@ -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;