[FIX] Tour: modal bug fixes

bzr revid: ddm@openerp.com-20131125163844-qn6gxp59n094d6el
This commit is contained in:
ddm
2013-11-25 17:38:44 +01:00
parent b2ebae427c
commit 1dd3026cf6
@@ -39,18 +39,18 @@
title: "Create a new product",
content: "Select 'New Product' to create it and manage its properties to boost your sales.",
triggers: function () {
function stopIfModalClosed () {
var $doc = $(document);
function stopProductTour () {
self.stop();
}
$(document).one('hidden.bs.modal', stopIfModalClosed);
$(document).one('shown.bs.modal', function () {
$doc.on('hide.bs.modal', stopProductTour);
$doc.one('shown.bs.modal', function () {
$('.modal button.btn-primary').one('click', function () {
$(document).off('hidden.bs.modal', stopIfModalClosed);
$doc.off('hide.bs.modal', stopProductTour);
self.moveToStep('product-page');
});
self.moveToNextStep();
});
},
},
{