[IMP] Finish tour according to kanban task

bzr revid: ddm@openerp.com-20131009160949-ma5e3a13qchzq4vy
This commit is contained in:
ddm
2013-10-09 18:09:49 +02:00
parent 75bf46996c
commit 9ba56d0d71
2 changed files with 28 additions and 4 deletions
@@ -203,8 +203,9 @@
}
});
// Adding Static Menus
menu.append('<li class="divider"></li><li><a href="/page/website.themes">Change Theme</a></li>');
menu.append('<li class="divider"></li><li class="js_change_theme"><a href="/page/website.themes">Change Theme</a></li>');
menu.append('<li class="divider"></li><li><a data-action="ace" href="#">Advanced view editor</a></li>');
self.trigger('rte:customize_menu_ready');
}
);
});
+26 -3
View File
@@ -69,7 +69,7 @@
website.EditorBasicTour = website.EditorTour.extend({
id: 'add_banner_tour',
name: "How to add a banner",
init: function () {
init: function (editor) {
var self = this;
self.steps = [
{
@@ -175,6 +175,28 @@
content: "Congratulations on your first modifications.",
template: render('website.tour_confirm', { next: "OK" }),
},
{
stepId: 'show-customize',
element: '#customize-menu-button',
placement: 'left',
title: "Customize your Website",
content: "Go on the <em>Customize</em> menu to get access customization options for the current page.",
template: render('website.tour_simple'),
onShow: function () {
editor.on('rte:customize_menu_ready', self, function () {
self.movetoStep('change-themes');
});
},
},
{
stepId: 'change-themes',
element: '.js_change_theme',
placement: 'left',
reflex: true,
title: "Click to View Themes",
content: "You can change the theme at any time to customize the look and feel of your website.",
template: render('website.tour_simple'),
},
{
stepId: 'show-tutorials',
element: '#help-menu-button',
@@ -189,7 +211,8 @@
startOfPart2: function () {
var currentStepIndex = this.currentStepIndex();
var secondPartIndex = this.indexOfStep('part-2');
return currentStepIndex === secondPartIndex && !this.tour.ended();
var showTutorialsIndex = this.indexOfStep('show-tutorials');
return (currentStepIndex === secondPartIndex || currentStepIndex === showTutorialsIndex) && !this.tour.ended();
},
canResume: function () {
return this.startOfPart2() || this._super();
@@ -214,7 +237,7 @@
website.EditorBar.include({
start: function () {
website.tutorials = {
basic: new website.EditorBasicTour(),
basic: new website.EditorBasicTour(this),
};
var menu = $('#help-menu');
_.each(website.tutorials, function (tutorial) {