diff options
| author | chm@openerp.com <> | 2014-03-13 15:22:58 +0100 |
|---|---|---|
| committer | chm@openerp.com <> | 2014-03-13 15:22:58 +0100 |
| commit | aa412d99ec8dcbd5f49a45c051adcd483da83e2c (patch) | |
| tree | 521a3af5af9147598c66e28ead22e0ccf3032aa2 /addons/website/static/src/js | |
| parent | ba63094b9b4cf8436b0a69944285ec94431da14b (diff) | |
[FIX] website tour: create a stub for bootstrap tour in automatic/test mode
bzr revid: chm@openerp.com-20140313142258-wblpqpwp9oubboc9
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/website.tour.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js index a17115d2184..61b8f851339 100644 --- a/addons/website/static/src/js/website.tour.js +++ b/addons/website/static/src/js/website.tour.js @@ -3,9 +3,22 @@ var website = openerp.website; +// don't need template to use bootstrap Tour in automatic mode if (typeof QWeb2 !== "undefined") website.add_template_file('/website/static/src/xml/website.tour.xml'); +// don't need to use bootstrap Tour to launch an automatic tour +function bootstrap_tour_stub () { + if (typeof Tour === "undefined") { + window.Tour = function Tour() {}; + Tour.prototype.addSteps = function () {}; + Tour.prototype.end = function () {}; + Tour.prototype.goto = function () {}; + } +} + + + if (website.EditorBar) website.EditorBar.include({ tours: [], @@ -175,6 +188,9 @@ website.Tour = openerp.Class.extend({ }, registerTour: function () { + if (this.automatic) { + bootstrap_tour_stub(); + } this.tour = new Tour({ name: this.id, storage: this.tourStorage, |
