Merge branch 'master' of https://github.com/odoo/odoo
[odoo/odoo.git] / addons / website_event / static / src / js / website.tour.event.js
1 (function () {
2     'use strict';
3
4     var _t = openerp._t;
5
6     openerp.Tour.register({
7         id:   'event',
8         name: _t("Create an event"),
9         steps: [
10             {
11                 title:     _t("Create an Event"),
12                 content:   _t("Let's go through the first steps to publish a new event."),
13                 popover:   { next: _t("Start Tutorial"), end: _t("Skip It") },
14             },
15             {
16                 element:   '#content-menu-button',
17                 placement: 'left',
18                 title:     _t("Add Content"),
19                 content:   _t("The <em>Content</em> menu allows you to create new pages, events, menus, etc."),
20                 popover:   { fixed: true },
21             },
22             {
23                 element:   'a[data-action=new_event]',
24                 placement: 'left',
25                 title:     _t("New Event"),
26                 content:   _t("Click here to create a new event."),
27                 popover:   { fixed: true },
28             },
29             {
30                 element:   '.modal #editor_new_event input[type=text]',
31                 sampleText: 'Advanced Technical Training',
32                 placement: 'right',
33                 title:     _t("Create an Event Name"),
34                 content:   _t("Create a name for your new event and click <em>'Continue'</em>. e.g: Technical Training"),
35             },
36             {
37                 waitNot:   '.modal input[type=text]:not([value!=""])',
38                 element:   '.modal button.btn-primary',
39                 placement: 'right',
40                 title:     _t("Create Event"),
41                 content:   _t("Click <em>Continue</em> to create the event."),
42             },
43             {
44                 waitFor:   'body:has(button[data-action=save]:visible):has(.js_event)',
45                 title:     _t("New Event Created"),
46                 content:   _t("This is your new event page. We will edit the event presentation page."),
47                 popover:   { next: _t("Continue") },
48             },
49             {
50                 element:   'button[data-action=snippet]',
51                 placement: 'bottom',
52                 title:     _t("Layout your event"),
53                 content:   _t("Insert blocks to layout the body of your event."),
54                 popover:   { fixed: true },
55             },
56             {
57                 snippet:   '#snippet_structure .oe_snippet:eq(2)',
58                 placement: 'bottom',
59                 title:     _t("Drag & Drop a block"),
60                 content:   _t("Drag the 'Image-Text' block and drop it in your page."),
61                 popover:   { fixed: true },
62             },
63             {
64                 
65                 element:   'button[data-action=snippet]',
66                 placement: 'bottom',
67                 title:     _t("Layout your event"),
68                 content:   _t("Insert another block to your event."),
69                 popover:   { fixed: true },
70             },
71             {
72                 snippet:   '#snippet_structure .oe_snippet:eq(4)',
73                 placement: 'bottom',
74                 title:     _t("Drag & Drop a block"),
75                 content:   _t("Drag the 'Text Block' in your event page."),
76                 popover:   { fixed: true },
77             },
78             {
79                 element:   'button[data-action=save]',
80                 placement: 'right',
81                 title:     _t("Save your modifications"),
82                 content:   _t("Once you click on save, your event is updated."),
83                 popover:   { fixed: true },
84             },
85             {
86                 waitFor:   'button[data-action=edit]:visible',
87                 element:   'button.btn-danger.js_publish_btn',
88                 placement: 'top',
89                 title:     _t("Publish your event"),
90                 content:   _t("Click to publish your event."),
91             },
92             {
93                 waitFor:   '.js_publish_management button.js_publish_btn.btn-success:visible',
94                 element:   '.js_publish_management button[data-toggle="dropdown"]',
95                 placement: 'left',
96                 title:     _t("Customize your event"),
97                 content:   _t("Click here to customize your event further."),
98             },
99             {
100                 element:   '.js_publish_management ul>li>a:last:visible',
101             },
102         ]
103     });
104
105 }());