[FIX] Tour should not start when testing

bzr revid: ddm@openerp.com-20131216075516-o70h4ydhgqj4i3kh
This commit is contained in:
ddm
2013-12-16 08:55:16 +01:00
parent 38df46190a
commit 8f7db60fd6
+13 -4
View File
@@ -69,7 +69,7 @@
$doc.one('shown.bs.modal', function () {
$('.modal button.btn-primary').one('click', function () {
$doc.off('hide.bs.modal', onStop);
self.moveToStep(step.trigger.modal.afterSubmit);
(callback || self.moveToNextStep).apply(self, [step.trigger.modal.afterSubmit]);
});
(callback || self.moveToNextStep).apply(self);
});
@@ -290,6 +290,7 @@
return this._super();
},
registerTour: function (tour) {
var self = this;
var testId = 'test_'+tour.id+'_tour';
this.tours.push(tour);
var test = {
@@ -343,9 +344,17 @@
currentStep = actionSteps.shift();
}
}
setTimeout(function () {
executeStep(currentStep);
}, 0);
if (currentStep.snippet && $(currentStep.element).length === 0) {
self.on('rte:ready', this, function () {
executeStep(currentStep);
});
} else {
setTimeout(function () {
setTimeout(function () {
executeStep(currentStep);
}, 0);
}, 0);
}
}
},
reset: function () {