summaryrefslogtreecommitdiff
path: root/addons/website_event/static
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_event/static')
-rw-r--r--addons/website_event/static/src/js/website.tour.event.js75
-rw-r--r--addons/website_event/static/src/js/website_event.editor.js4
2 files changed, 41 insertions, 38 deletions
diff --git a/addons/website_event/static/src/js/website.tour.event.js b/addons/website_event/static/src/js/website.tour.event.js
index 05de73ceffb..73510b455dd 100644
--- a/addons/website_event/static/src/js/website.tour.event.js
+++ b/addons/website_event/static/src/js/website.tour.event.js
@@ -2,6 +2,7 @@
'use strict';
var website = openerp.website;
+ var _t = openerp._t;
website.EditorBar.include({
start: function () {
@@ -18,93 +19,93 @@
var self = this;
self.steps = [
{
- title: "Create an Event",
- content: "Let's go through the first steps to publish a new event.",
- template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
+ title: _t("Create an Event"),
+ content: _t("Let's go through the first steps to publish a new event."),
+ popover: { next: _("Start Tutorial"), end: _("Skip It") },
},
{
element: '#content-menu-button',
placement: 'left',
- title: "Add Content",
- content: "The <em>Content</em> menu allows you to create new pages, events, menus, etc.",
- template: self.popover({ fixed: true }),
+ title: _t("Add Content"),
+ content: _t("The <em>Content</em> menu allows you to create new pages, events, menus, etc."),
+ popover: { fixed: true },
},
{
element: 'a[data-action=new_event]',
placement: 'left',
- title: "New Event",
- content: "Click here to create a new event.",
- template: self.popover({ fixed: true }),
+ title: _t("New Event"),
+ content: _t("Click here to create a new event."),
+ popover: { fixed: true },
},
{
- element: '.modal:contains("New Event") input[type=text]',
+ element: '.modal #editor_new_event input[type=text]',
sampleText: 'Advanced Technical Training',
placement: 'right',
- title: "Create an Event Name",
- content: "Create a name for your new event and click <em>'Continue'</em>. e.g: Technical Training",
+ title: _t("Create an Event Name"),
+ content: _t("Create a name for your new event and click <em>'Continue'</em>. e.g: Technical Training"),
},
{
waitNot: '.modal input[type=text]:not([value!=""])',
element: '.modal button.btn-primary',
placement: 'right',
- title: "Create Event",
- content: "Click <em>Continue</em> to create the event.",
+ title: _t("Create Event"),
+ content: _t("Click <em>Continue</em> to create the event."),
},
{
- waitFor: '#website-top-navbar button[data-action="save"]:visible',
- title: "New Event Created",
- content: "This is your new event page. We will edit the event presentation page.",
- template: self.popover({ next: "Continue" }),
+ waitFor: 'body:has(button[data-action=save]:visible):has(.js_event)',
+ title: _t("New Event Created"),
+ content: _t("This is your new event page. We will edit the event presentation page."),
+ popover: { next: _t("Continue") },
},
{
element: 'button[data-action=snippet]',
placement: 'bottom',
- title: "Layout your event",
- content: "Insert blocks to layout the body of your event.",
- template: self.popover({ fixed: true }),
+ title: _t("Layout your event"),
+ content: _t("Insert blocks to layout the body of your event."),
+ popover: { fixed: true },
},
{
snippet: 'image-text',
placement: 'bottom',
- title: "Drag & Drop a block",
- content: "Drag the 'Image-Text' block and drop it in your page.",
- template: self.popover({ fixed: true }),
+ title: _t("Drag & Drop a block"),
+ content: _t("Drag the 'Image-Text' block and drop it in your page."),
+ popover: { fixed: true },
},
{
element: 'button[data-action=snippet]',
placement: 'bottom',
- title: "Layout your event",
- content: "Insert another block to your event.",
- template: self.popover({ fixed: true }),
+ title: _t("Layout your event"),
+ content: _t("Insert another block to your event."),
+ popover: { fixed: true },
},
{
snippet: 'text-block',
placement: 'bottom',
- title: "Drag & Drop a block",
- content: "Drag the 'Text Block' in your event page.",
- template: self.popover({ fixed: true }),
+ title: _t("Drag & Drop a block"),
+ content: _t("Drag the 'Text Block' in your event page."),
+ popover: { fixed: true },
},
{
element: 'button[data-action=save]',
placement: 'right',
- title: "Save your modifications",
- content: "Once you click on save, your event is updated.",
- template: self.popover({ fixed: true }),
+ title: _t("Save your modifications"),
+ content: _t("Once you click on save, your event is updated."),
+ popover: { fixed: true },
},
{
waitFor: 'button[data-action=edit]:visible',
element: 'button.btn-danger.js_publish_btn',
placement: 'top',
- title: "Publish your event",
- content: "Click to publish your event.",
+ title: _t("Publish your event"),
+ content: _t("Click to publish your event."),
},
{
waitFor: '.js_publish_management button.js_publish_btn.btn-success:visible',
element: '.js_publish_management button[data-toggle="dropdown"]',
placement: 'left',
- title: "Customize your event",
- content: "Click here to customize your event further.",
+ title: _t("Customize your event"),
+ content: _t("Click here to customize your event further."),
},
{
element: '.js_publish_management ul>li>a:last:visible',
diff --git a/addons/website_event/static/src/js/website_event.editor.js b/addons/website_event/static/src/js/website_event.editor.js
index 056d6ed37e4..ac81be7ec36 100644
--- a/addons/website_event/static/src/js/website_event.editor.js
+++ b/addons/website_event/static/src/js/website_event.editor.js
@@ -2,6 +2,7 @@
"use strict";
var website = openerp.website;
+ var _t = openerp._t;
website.add_template_file('/website_event/static/src/xml/website_event.xml');
website.is_editable = true;
@@ -16,7 +17,8 @@
'click a[data-action=new_event]': function (ev) {
ev.preventDefault();
website.prompt({
- window_title: "New Event",
+ id: "editor_new_event",
+ window_title: _t("New Event"),
input: "Event Name",
}).then(function (event_name) {
website.form('/event/add_event', 'POST', {