summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorchm@openerp.com <>2014-03-20 09:56:06 +0100
committerchm@openerp.com <>2014-03-20 09:56:06 +0100
commit0b75d4ea043e35c9c523b9ec24324eae8d149e8f (patch)
tree98d1a94b191eea70471ef051d3a8891cb7bf00c7 /addons/website/static/src
parent60bdd78706336fa0221264f1675a8645bc2a99e9 (diff)
[IMP] website: remove bootstrap_tour_stub
bzr revid: chm@openerp.com-20140320085606-qrghlkev6i9pu9bw
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/website.tour.js20
1 files changed, 6 insertions, 14 deletions
diff --git a/addons/website/static/src/js/website.tour.js b/addons/website/static/src/js/website.tour.js
index c5ccd1f42c9..fc0dd513cf2 100644
--- a/addons/website/static/src/js/website.tour.js
+++ b/addons/website/static/src/js/website.tour.js
@@ -23,17 +23,6 @@ if (typeof website.Tour !== "undefined") {
// 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) {
@@ -150,7 +139,7 @@ website.Tour.registerSteps = function (tour) {
}
// rendering bootstrap tour and popover
- if (tour.mode != "test") {
+ if (tour.mode != "test" || typeof Tour !== "undefined") {
tour.tour = new Tour({
name: this.id,
storage: localStorage,
@@ -206,6 +195,7 @@ website.Tour.error = function (tour, step, message) {
+ '\nelement: ' + Boolean(!step.element || ($(step.element).size() && $(step.element).is(":visible") && !$(step.element).is(":hidden")))
+ '\nwaitNot: ' + Boolean(!step.waitNot || !$(step.waitNot).size())
+ '\nwaitFor: ' + Boolean(!step.waitFor || $(step.waitFor).size())
+ + "\nlocalStorage: " + localStorage.getItem("tour")
+ '\n\n' + $("body").html()
);
};
@@ -302,7 +292,9 @@ website.Tour.nextStep = function (tour, step, overlaps) {
// clear popover (fix for boostrap tour if the element is removed before destroy popover)
$(".popover.tour").remove();
// go to step in bootstrap tour
- tour.tour.goto(step.id);
+ if (tour.tour) {
+ tour.tour.goto(step.id);
+ }
step.onload();
var next = tour.steps[step.id+1];
@@ -349,7 +341,7 @@ website.Tour.autoNextStep = function (tour, step) {
if (!$element.size()) return;
if (step.snippet) {
-
+
website.Tour.autoDragAndDropSnippet($element);
} else if (step.sampleText) {