[IMP] Blog tour imps

bzr revid: ddm@openerp.com-20131122094942-au6yn70qdqvcu11u
This commit is contained in:
ddm 2013-11-22 10:49:42 +01:00
parent 233e460b52
commit 73d16d6d9b
3 changed files with 19 additions and 2 deletions

View File

@ -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);
}
},

View File

@ -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 = [

View File

@ -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',