[IMP] Install app tour v1
bzr revid: ddm@openerp.com-20131115164026-6i284uve1i2yh3f7
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var website = openerp.website;
|
||||
|
||||
var render = website.tour.render;
|
||||
|
||||
website.InstallAppTour = website.EditorTour.extend({
|
||||
id: 'install_app',
|
||||
name: "Instal a new App",
|
||||
init: function (editor) {
|
||||
var self = this;
|
||||
var $body = $(document.body);
|
||||
self.steps = [
|
||||
{
|
||||
stepId: 'welcome-install-app',
|
||||
orphan: true,
|
||||
backdrop: true,
|
||||
title: "Install an App",
|
||||
content: "You can intall some apps to manage your website content.",
|
||||
template: render('website.tour_popover', { next: "Start Tutorial", end: "Skip It" }),
|
||||
},
|
||||
{
|
||||
stepId: 'customize',
|
||||
element: '#customize-menu-button',
|
||||
placement: 'left',
|
||||
title: "Install an app",
|
||||
content: "Add new apps by customizing your website.",
|
||||
template: render('website.tour_popover'),
|
||||
onShow: function () {
|
||||
editor.on('rte:customize_menu_ready', editor, function() {
|
||||
self.movetoStep('install-app');
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
stepId: 'install-app',
|
||||
element: '#customize-menu li:last a',
|
||||
placement: 'left',
|
||||
orphan: true,
|
||||
title: "Install an app",
|
||||
content: "Click 'Install Apps' to select and install the application you would like to manage from your website.",
|
||||
template: render('website.tour_popover'),
|
||||
},
|
||||
];
|
||||
return this._super();
|
||||
},
|
||||
});
|
||||
|
||||
website.EditorBar.include({
|
||||
start: function () {
|
||||
var menu = $('#help-menu');
|
||||
var installAppTour = new website.InstallAppTour(this);
|
||||
var $menuItem = $($.parseHTML('<li><a href="#">'+installAppTour.name+'</a></li>'));
|
||||
$menuItem.click(function () {
|
||||
installAppTour.reset();
|
||||
installAppTour.start();
|
||||
});
|
||||
menu.append($menuItem);
|
||||
return this._super();
|
||||
},
|
||||
});
|
||||
|
||||
}());
|
||||
@@ -100,6 +100,7 @@
|
||||
<script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
|
||||
<script type="text/javascript" src="/website/static/src/js/website.tour.banner.js"></script>
|
||||
<script type="text/javascript" src="/website/static/src/js/website.tour.menu-editor.js"></script>
|
||||
<script type="text/javascript" src="/website/static/src/js/website.tour.install-app.js"></script>
|
||||
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.snippets.editor.js"></script>
|
||||
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.ace.js"></script>
|
||||
<script t-if="translatable" type="text/javascript" src="/website/static/src/js/website.translator.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user