[IMP] Various tour imps

bzr revid: ddm@openerp.com-20131122173038-s9dfq8lxau3fadfl
This commit is contained in:
ddm 2013-11-22 18:30:38 +01:00
parent de554f8d78
commit 0bda85949a
7 changed files with 20 additions and 21 deletions

View File

@ -30,7 +30,7 @@
placement: 'left',
title: "Install an app",
content: "Add new apps by customizing your website.",
onShow: function () {
triggers: function () {
editor.on('rte:customize_menu_ready', editor, function () {
self.movetoStep('install-app');
});

View File

@ -31,7 +31,7 @@
placement: 'bottom',
title: "Edit this page",
content: "Every page of your website can be modified through the <i>Edit</i> button.",
onShow: function () {
triggers: function () {
editor.on('tour:editor_bar_loaded', editor, function () {
self.movetoStep('add-block');
});
@ -43,7 +43,7 @@
placement: 'bottom',
title: "Insert building blocks",
content: "To add content in a page, you can insert building blocks.",
onShow: function () {
triggers: function () {
$('button[data-action=snippet]').click(function () {
self.movetoStep('drag-banner');
});
@ -55,7 +55,7 @@
placement: 'bottom',
title: "Drag & Drop a Banner",
content: "Drag the Banner block and drop it in your page.",
onShow: function () {
triggers: function () {
self.onSnippetDraggedMoveTo('edit-title');
},
},
@ -66,7 +66,7 @@
title: "Customize banner's text",
content: "Click in the text and start editing it. Click continue once it's done.",
template: self.popover({ next: "Continue" }),
onHide: function () {
triggers: function () {
var $banner = $("#wrap [data-snippet-id=carousel]:first");
if ($banner.length) {
$banner.click();
@ -80,7 +80,7 @@
title: "Customize the banner",
content: "You can customize characteristic of any blocks through the Customize menu. For instance, change the background of the banner.",
template: self.popover({ next: "Continue" }),
onShow: function () {
triggers: function () {
$('.dropdown-menu [name=carousel-background]').click(function () {
self.movetoStep('save-changes');
});

View File

@ -17,6 +17,7 @@
});
this.tour.addSteps(_.map(this.steps, function (step) {
step.title = openerp.qweb.render('website.tour_popover_title', { title: step.title });
step.onShow = step.triggers;
return step;
}));
},

View File

@ -38,7 +38,7 @@
placement: 'left',
title: "Edit menu",
content: "Click here to create a new menu entry and manage options.",
onShow: function () {
triggers: function () {
$(document).one('shown.bs.modal', function () {
self.movetoStep('add-menu-entry');
});
@ -50,7 +50,7 @@
placement: 'left',
title: "Add menu entry",
content: "Click here to create a new menu entry.",
onShow: function () {
triggers: function () {
$(document).one('shown.bs.modal', function () {
self.movetoStep('enter-entry-name');
});
@ -78,7 +78,7 @@
placement: 'right',
title: "Save the page",
content: "Save your new page.",
onShow: function () {
triggers: function () {
$(document).one('hidden.bs.modal', function () {
self.movetoStep('save-menu');
});

View File

@ -38,7 +38,7 @@
placement: 'left',
title: "New blog post",
content: "Click here to create a blog post.",
onShow: function () {
triggers: function () {
$(document).one('shown.bs.modal', function () {
$('.modal button.btn-primary').click(function () {
self.movetoStep('post-page');
@ -53,7 +53,7 @@
placement: 'right',
title: "Choose the post category",
content: "Select the 'News' category and click 'Continue'.",
onShow: function () {
triggers: function () {
$('.modal select').change(function () {
var $this = $(this);
var selected = $this.find("[value="+$this.val()+"]").text();
@ -92,7 +92,7 @@
placement: 'bottom',
title: "Layout your blog post",
content: "Insert blocks like text-image to layout the body of your blog post.",
onShow: function () {
triggers: function () {
$('button[data-action=snippet]').click(function () {
self.movetoStep('drag-image-text');
});
@ -104,7 +104,7 @@
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Image Text' block and drop it in your page.",
onShow: function () {
triggers: function () {
self.onSnippetDraggedMoveTo('add-text-block');
},
},
@ -114,7 +114,7 @@
placement: 'bottom',
title: "Add another block",
content: "Let's add another blog to your post.",
onShow: function () {
triggers: function () {
$('button[data-action=snippet]').click(function () {
self.movetoStep('drag-text-block');
});
@ -126,7 +126,7 @@
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Text Block' block and drop it below the image block.",
onShow: function () {
triggers: function () {
self.onSnippetDraggedMoveTo('activate-text-block-title');
},
},
@ -136,11 +136,9 @@
placement: 'top',
title: "Activate on the title",
content: "Click on the title to activate it.",
onShow: function () {
triggers: function () {
$('#wrap [data-snippet-id=text-block] .text-center[data-snippet-id=colmd]').click(function () {
setTimeout(function () {
self.movetoStep('remove-text-block-title');
}, 50);
self.movetoStep('remove-text-block-title');
});
},
},

View File

@ -38,7 +38,7 @@
placement: 'left',
title: "New event",
content: "Click here to create an event.",
onShow: function () {
triggers: function () {
$(document).one('shown.bs.modal', function () {
$('.modal button.btn-primary').click(function () {
self.movetoStep('event-page');

View File

@ -38,7 +38,7 @@
placement: 'left',
title: "Create a new product",
content: "Select 'New Product' to create it and manage its properties to boost your sales.",
onShow: function () {
triggers: function () {
$(document).one('shown.bs.modal', function () {
$('.modal button.btn-primary').click(function () {
self.movetoStep('product-page');