[FIX] Regression in shop tour

bzr revid: ddm@openerp.com-20131206140940-v0rerf362fuj2tqz
This commit is contained in:
ddm
2013-12-06 15:09:40 +01:00
parent 74ed3d2e5f
commit 9be1dbfe9e
2 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -31,7 +31,7 @@
if (step.trigger === 'click') {
step.triggers = function (callback) {
$(step.element).one('click', function () {
(callback || self.moveToNextStep).call(self);
(callback || self.moveToNextStep).apply(self);
});
};
} else if (step.trigger === 'drag') {
@@ -68,7 +68,7 @@
$doc.off('hide.bs.modal', onStop);
self.moveToStep(step.trigger.modal.afterSubmit);
});
(callback || self.moveToNextStep).call(self);
(callback || self.moveToNextStep).apply(self);
});
};
}
@@ -37,9 +37,11 @@
placement: 'left',
title: "Create a new product",
content: "Select 'New Product' to create it and manage its properties to boost your sales.",
modal: {
stopOnClose: true,
afterSubmit: 'product-page',
trigger: {
modal: {
stopOnClose: true,
afterSubmit: 'product-page',
},
},
},
{
@@ -48,7 +50,6 @@
placement: 'right',
title: "Choose name",
content: "Enter a name for your new product then click 'Continue'.",
},
{
stepId: 'product-page',
@@ -73,7 +74,7 @@
content: "Click here to set an image describing your product.",
triggers: function () {
function registerClick () {
$('button.image-edit-button').one('click', function () {
$('button.hover-edition-button').one('click', function () {
$('#wrap img.img:first').off('hover', registerClick);
self.moveToNextStep();
});