From 73d16d6d9b2b140cef42605c02721a4cf4bccb99 Mon Sep 17 00:00:00 2001 From: ddm Date: Fri, 22 Nov 2013 10:49:42 +0100 Subject: [PATCH] [IMP] Blog tour imps bzr revid: ddm@openerp.com-20131122094942-au6yn70qdqvcu11u --- addons/website/static/src/js/website.tour.js | 2 +- .../website/static/src/js/website.tour.page.js | 2 +- .../static/src/js/website.tour.blog.js | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index 8cefecba466..177736b817c 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -64,7 +64,7 @@ redirect: function (url) { url = url || new website.UrlParser(window.location.href); if (this.startPath && url.pathname !== this.startPath) { - var newUrl = this.startPath + (url.search ? (url.search + "&") : "?") + this.id + "=true" + var newUrl = this.startPath + (url.search ? (url.search + "&") : "?") + this.id + "=true"; window.location.replace(newUrl); } }, diff --git a/addons/website/static/src/js/website.tour.page.js b/addons/website/static/src/js/website.tour.page.js index b52c11efa28..fb15b6feef3 100644 --- a/addons/website/static/src/js/website.tour.page.js +++ b/addons/website/static/src/js/website.tour.page.js @@ -12,7 +12,7 @@ website.PageTour = website.Tour.extend({ id: 'page-tutorial', - name: "Add a new page", + name: "Add a page", init: function (editor) { var self = this; self.steps = [ diff --git a/addons/website_blog/static/src/js/website.tour.blog.js b/addons/website_blog/static/src/js/website.tour.blog.js index e524758819f..50b352e584d 100644 --- a/addons/website_blog/static/src/js/website.tour.blog.js +++ b/addons/website_blog/static/src/js/website.tour.blog.js @@ -54,6 +54,23 @@ placement: 'right', title: "Choose the post category", content: "Select the 'News' category and click 'Continue'.", + onShow: function () { + $('.modal select').change(function () { + var $this = $(this); + var selected = $this.val() + var name = $this.find("[value="+selected+"]").text(); + if (name.toLowerCase() === 'news') { + self.movetoStep('continue-category'); + } + }); + }, + }, + { + stepId: 'continue-category', + element: '.modal button.btn-primary', + placement: 'right', + title: "Choose the post category", + content: "Click 'Continue' to create the post.", }, { stepId: 'post-page',