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.",
69 title: "Blog Post Created",
70 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.",
71 template: self.popover({ next: "Continue" }),
75 element: 'h1[data-oe-expression="blog_post.name"]',
77 title: "Create a Title",
78 content: "Click on this area and set a catchy title.",
79 template: self.popover({ next: "OK" }),
82 stepId: 'add-image-text',
83 element: 'button[data-action=snippet]',
85 title: "Layout Your Blog Post",
86 content: "Use well designed building blocks to structure the content of your blog. Click 'Insert Blocks' to add new content.",
87 template: self.popover({ fixed: true }),
91 stepId: 'drag-image-text',
92 snippet: 'image-text',
94 title: "Drag & Drop a Block",
95 content: "Drag the <em>'Image-Text'</em> block and drop it in your page.",
96 template: self.popover({ fixed: true }),
100 stepId: 'add-text-block',
101 element: 'button[data-action=snippet]',
103 title: "Add Another Block",
104 content: "Let's add another block to your post.",
105 template: self.popover({ fixed: true }),
109 stepId: 'drag-text-block',
110 snippet: 'text-block',
112 title: "Drag & Drop a block",
113 content: "Drag the <em>'Text Block'</em> block and drop it below the image block.",
114 template: self.popover({ fixed: true }),
118 stepId: 'activate-text-block-title',
119 element: '#wrap [data-snippet-id=text-block] .text-center[data-snippet-id=colmd]',
121 title: "Edit an Area",
122 content: "Select any area of the page to modify it. Click on this subtitle.",
124 id: 'snippet-activated',
128 stepId: 'remove-text-block-title',
129 element: '.oe_active .oe_snippet_remove',
131 title: "Delete the Title",
132 content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the garbage can image to delete the title.",
136 stepId: 'save-changes',
137 element: 'button[data-action=save]',
139 title: "Save Your Blog",
140 content: "Click the <em>Save</em> button to record changes on the page.",
141 template: self.popover({ fixed: true }),
145 stepId: 'publish-post',
146 element: 'button.btn-danger.js_publish_btn',
148 title: "Publish Your Post",
149 content: "Your blog post is not yet published. You can update this draft version and publish it once you are ready.",
154 stepId: 'end-tutorial',
156 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.",
157 template: self.popover({ end: "Close Tutorial" }),
161 return this._super();
163 trigger: function () {
164 return (this.resume() && this.testUrl(/^\/blogpost\/[0-9]+\//)) || this._super();