4 var website = openerp.website;
6 website.EditorBar.include({
8 this.registerTour(new website.BlogTour(this));
13 website.BlogTour = website.Tour.extend({
15 name: "Create a blog post",
16 init: function (editor) {
20 stepId: 'welcome-blog',
21 title: "New Blog Post",
22 content: "Let's go through the first steps to write beautiful blog posts.",
23 template: self.popover({ next: "Start Tutorial", end: "Skip" }),
27 stepId: 'content-menu',
28 element: '#content-menu-button',
31 content: "Create new pages, blogs, menu items and products through the <em>'Content'</em> menu.",
32 template: self.popover({ fixed: true }),
36 stepId: 'new-post-entry',
37 element: 'a[data-action=new_blog_post]',
39 title: "New Blog Post",
40 content: "Select this menu item to create a new blog post.",
41 template: self.popover({ fixed: true }),
45 afterSubmit: 'post-page',
50 stepId: 'choose-category',
51 element: '.modal select',
54 content: "Blog posts are organized in multiple categories (news, job offers, events, etc). Select <em>News</em> and click <em>Continue</em>.",
60 stepId: 'continue-category',
61 element: '.modal button.btn-primary',
63 title: "Create Blog Post",
64 content: "Click <em>Continue</em> to create the blog post.",
66 url: /blogpost\/[0-9]+\/.*/,
71 title: "Blog Post Created",
72 content: "This is your new blog post. We will edit your pages inline. What You See Is What You Get. No need for a complex backend.",
73 template: self.popover({ next: "Continue" }),
77 element: 'h1[data-oe-expression="blog_post.name"]',
79 title: "Create a Title",
80 content: "Click on this area and set a catchy title.",
81 template: self.popover({ next: "OK" }),
84 stepId: 'add-image-text',
85 element: 'button[data-action=snippet]',
87 title: "Layout Your Blog Post",
88 content: "Use well designed building blocks to structure the content of your blog. Click 'Insert Blocks' to add new content.",
89 template: self.popover({ fixed: true }),
93 stepId: 'drag-image-text',
94 snippet: 'image-text',
96 title: "Drag & Drop a Block",
97 content: "Drag the <em>'Image-Text'</em> block and drop it in your page.",
98 template: self.popover({ fixed: true }),
102 stepId: 'add-text-block',
103 element: 'button[data-action=snippet]',
105 title: "Add Another Block",
106 content: "Let's add another block to your post.",
107 template: self.popover({ fixed: true }),
111 stepId: 'drag-text-block',
112 snippet: 'text-block',
114 title: "Drag & Drop a block",
115 content: "Drag the <em>'Text Block'</em> block and drop it below the image block.",
116 template: self.popover({ fixed: true }),
120 stepId: 'activate-text-block-title',
121 element: '#wrap [data-snippet-id=text-block] .text-center[data-snippet-id=colmd]',
123 title: "Edit an Area",
124 content: "Select any area of the page to modify it. Click on this subtitle.",
126 id: 'snippet-activated',
130 stepId: 'remove-text-block-title',
131 element: '.oe_active .oe_snippet_remove',
133 title: "Delete the Title",
134 content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the garbage can image to delete the title.",
138 stepId: 'save-changes',
139 element: 'button[data-action=save]',
141 title: "Save Your Blog",
142 content: "Click the <em>Save</em> button to record changes on the page.",
143 template: self.popover({ fixed: true }),
147 stepId: 'publish-post',
148 element: 'button.btn-danger.js_publish_btn',
150 title: "Publish Your Post",
151 content: "Your blog post is not yet published. You can update this draft version and publish it once you are ready.",
156 stepId: 'end-tutorial',
158 content: "This tutorial is finished. To discover more features, improve the content of this page and try the <em>Promote</em> button in the top right menu.",
159 template: self.popover({ end: "Close Tutorial" }),
163 return this._super();
165 trigger: function () {
166 return (this.resume() && this.testUrl(/^\/blogpost\/[0-9]+\//)) || this._super();