4 var website = openerp.website;
6 website.EditorBar.include({
8 this.registerTour(new website.EventTour(this));
13 website.EventTour = website.Tour.extend({
15 name: "Create an event",
17 init: function (editor) {
21 stepId: 'welcome-event',
25 content: "We will show how to create a new event.",
26 template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
29 stepId: 'content-menu',
30 element: '#content-menu-button',
33 title: "Edit the content",
34 content: "Click here to add content to your site.",
37 stepId: 'new-post-entry',
38 element: 'a[data-action=new_event]',
41 content: "Click here to create an event.",
43 $(document).one('shown.bs.modal', function () {
44 $('.modal button.btn-primary').click(function () {
45 self.movetoStep('event-page');
47 self.movetoStep('choose-category');
52 stepId: 'choose-name',
53 element: '.modal input',
55 title: "Choose the event name",
56 content: "Choose a name for the new event and click 'Continue'.",
62 title: "New event created",
63 content: "You just created a new event. We are now going to edit it.",
64 template: self.popover({ next: "OK" }),
68 element: 'button[data-action=snippet]',
71 title: "Layout your event",
72 content: "Insert blocks like text-image to layout the body of your event.",
77 continue: function () {
78 return this.isCurrentStep('event-page') && !this.tour.ended();
80 trigger: function () {
81 return (this.continue() && this.testUrl(/^\/event\/[0-9]+\/\?enable_editor=1/)) || this._super();