[FIX] web_tour: log killing tour message as an error

Instead of logging "Killing tour x" when calling the run method a
second time and then logging "ok" when consuming the old running tour,
the message "Killing tour x" is now logged as an error for phamtomJS.

Also, let "x" be the tour which is killed and not the one which wanted
to be runned.
This commit is contained in:
qsm-odoo
2016-08-25 13:14:42 +02:00
parent 39d68acd08
commit e671d05525
@@ -143,9 +143,8 @@ return core.Class.extend({
},
run: function (tour_name, step_delay) {
if (this.running_tour) {
console.warn(_.str.sprintf("Killing tour %s", tour_name));
this._deactivate_tip(this.active_tooltips[tour_name]);
this._consume_tour(tour_name);
this._deactivate_tip(this.active_tooltips[this.running_tour]);
this._consume_tour(this.running_tour, _.str.sprintf("Killing tour %s", this.running_tour));
return;
}
var tour = this.tours[tour_name];