From 0677fda79ec8e57930762464a958eaf852b1441e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 6 Feb 2014 15:06:43 +0100 Subject: [FIX] website tours: fix and translate bzr revid: chm@openerp.com-20140206140643-z3b2fu2v9uaozc1z --- .../static/src/js/website.tour.event.js | 55 +++++++++++----------- 1 file changed, 28 insertions(+), 27 deletions(-) (limited to 'addons/website_event/static/src') 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..497a38d67af 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.", + title: _t("Create an Event"), + content: _t("Let's go through the first steps to publish a new event."), template: self.popover({ next: "Start Tutorial", end: "Skip It" }), }, { element: '#content-menu-button', placement: 'left', - title: "Add Content", - content: "The Content menu allows you to create new pages, events, menus, etc.", + title: _t("Add Content"), + content: _t("The Content menu allows you to create new pages, events, menus, etc."), template: self.popover({ fixed: true }), }, { element: 'a[data-action=new_event]', placement: 'left', - title: "New Event", - content: "Click here to create a new event.", + title: _t("New Event"), + content: _t("Click here to create a new event."), template: self.popover({ fixed: true }), }, { element: '.modal:contains("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 'Continue'. e.g: Technical Training", + title: _t("Create an Event Name"), + content: _t("Create a name for your new event and click 'Continue'. e.g: Technical Training"), }, { waitNot: '.modal input[type=text]:not([value!=""])', element: '.modal button.btn-primary', placement: 'right', - title: "Create Event", - content: "Click Continue to create the event.", + title: _t("Create Event"), + content: _t("Click Continue 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" }), + title: _t("New Event Created"), + content: _t("This is your new event page. We will edit the event presentation page."), + template: self.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.", + title: _t("Layout your event"), + content: _t("Insert blocks to layout the body of your event."), template: self.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.", + title: _t("Drag & Drop a block"), + content: _t("Drag the 'Image-Text' block and drop it in your page."), template: self.popover({ fixed: true }), }, { element: 'button[data-action=snippet]', placement: 'bottom', - title: "Layout your event", - content: "Insert another block to your event.", + title: _t("Layout your event"), + content: _t("Insert another block to your event."), template: self.popover({ fixed: true }), }, { snippet: 'text-block', placement: 'bottom', - title: "Drag & Drop a block", - content: "Drag the 'Text Block' in your event page.", + title: _t("Drag & Drop a block"), + content: _t("Drag the 'Text Block' in your event page."), template: self.popover({ fixed: true }), }, { element: 'button[data-action=save]', placement: 'right', - title: "Save your modifications", - content: "Once you click on save, your event is updated.", + title: _t("Save your modifications"), + content: _t("Once you click on save, your event is updated."), template: self.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', -- cgit v1.2.3 From 14b4efcd281b33a29d280974148b5f2fa02e303e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 6 Feb 2014 15:52:36 +0100 Subject: [FIX] tour and translate title bzr revid: chm@openerp.com-20140206145236-vwdq74yyz21qvyzu --- addons/website_event/static/src/js/website.tour.event.js | 4 ++-- addons/website_event/static/src/js/website_event.editor.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'addons/website_event/static/src') 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..c84c0b36bb6 100644 --- a/addons/website_event/static/src/js/website.tour.event.js +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -37,7 +37,7 @@ template: self.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", @@ -51,7 +51,7 @@ content: "Click Continue to create the event.", }, { - waitFor: '#website-top-navbar button[data-action="save"]:visible', + waitFor: 'body:has(button[data-action=save]:visible):has(.js_event)', title: "New Event Created", content: "This is your new event page. We will edit the event presentation page.", template: self.popover({ next: "Continue" }), 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', { -- cgit v1.2.3 From 6d7eccf10ab732b539ed44566d8679189b5d2561 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 7 Feb 2014 16:45:20 +0100 Subject: [FIX] website snippet drop for rte; remove dependence to qweb template (remove popover from tours); fx import file with ajax bzr revid: chm@openerp.com-20140207154520-2injapzg9lgrdbvc --- .../website_event/static/src/js/website.tour.event.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'addons/website_event/static/src') 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 caab6f1fece..73510b455dd 100644 --- a/addons/website_event/static/src/js/website.tour.event.js +++ b/addons/website_event/static/src/js/website.tour.event.js @@ -21,21 +21,21 @@ { title: _t("Create an Event"), content: _t("Let's go through the first steps to publish a new event."), - template: self.popover({ next: "Start Tutorial", end: "Skip It" }), + popover: { next: _("Start Tutorial"), end: _("Skip It") }, }, { element: '#content-menu-button', placement: 'left', title: _t("Add Content"), content: _t("The Content menu allows you to create new pages, events, menus, etc."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { element: 'a[data-action=new_event]', placement: 'left', title: _t("New Event"), content: _t("Click here to create a new event."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { element: '.modal #editor_new_event input[type=text]', @@ -55,21 +55,21 @@ 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."), - template: self.popover({ next: _t("Continue") }), + popover: { next: _t("Continue") }, }, { element: 'button[data-action=snippet]', placement: 'bottom', title: _t("Layout your event"), content: _t("Insert blocks to layout the body of your event."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { snippet: 'image-text', placement: 'bottom', title: _t("Drag & Drop a block"), content: _t("Drag the 'Image-Text' block and drop it in your page."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { @@ -77,21 +77,21 @@ placement: 'bottom', title: _t("Layout your event"), content: _t("Insert another block to your event."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { snippet: 'text-block', placement: 'bottom', title: _t("Drag & Drop a block"), content: _t("Drag the 'Text Block' in your event page."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { element: 'button[data-action=save]', placement: 'right', title: _t("Save your modifications"), content: _t("Once you click on save, your event is updated."), - template: self.popover({ fixed: true }), + popover: { fixed: true }, }, { waitFor: 'button[data-action=edit]:visible', -- cgit v1.2.3