[IMP] web_tour: allow theme to override a tour

Each theme now will earase the homepage tour with his own tour

X-original-commit: 60c4cb82c40e2823daafe8709417e2b8997cef91
This commit is contained in:
Jeremy Kersten
2020-09-11 16:31:53 +00:00
parent 4afa019dec
commit 301f002ff0
@@ -81,7 +81,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, {
var options = args.length === 2 ? {} : args[1];
var steps = last_arg instanceof Array ? last_arg : [last_arg];
var tour = {
name: name,
name: options.saveAs || name,
steps: steps,
url: options.url,
rainbowMan: options.rainbowMan === undefined ? true : !!options.rainbowMan,
@@ -98,7 +98,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, {
this._consume_tour(name);
};
}
this.tours[name] = tour;
this.tours[tour.name] = tour;
},
/**
* Returns a promise which is resolved once the tour can be started. This