diff options
| author | ddm <ddm@openerp.com> | 2013-11-15 17:40:26 +0100 |
|---|---|---|
| committer | ddm <ddm@openerp.com> | 2013-11-15 17:40:26 +0100 |
| commit | 2853a60afeedd7828afc616b2a14bea76e6c031a (patch) | |
| tree | 9f5c8a306cb8dbd2de75dc9f2d8bd700ae410b41 /addons/website/static/src | |
| parent | e61ec3f1cd36bc5fa85c30e626e7a6648550f3a5 (diff) | |
[IMP] Install app tour v1
bzr revid: ddm@openerp.com-20131115164026-6i284uve1i2yh3f7
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/website.tour.install-app.js | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.tour.install-app.js b/addons/website/static/src/js/website.tour.install-app.js new file mode 100644 index 00000000000..98946314368 --- /dev/null +++ b/addons/website/static/src/js/website.tour.install-app.js @@ -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(); + }, + }); + +}()); |
