[FIX] Tour: modal bug fixes
bzr revid: ddm@openerp.com-20131125163622-4e6o0gzr2gocrcej
This commit is contained in:
@@ -39,8 +39,14 @@
|
||||
title: "New blog post",
|
||||
content: "Click here to create a blog post.",
|
||||
triggers: function () {
|
||||
$(document).one('shown.bs.modal', function () {
|
||||
var $doc = $(document);
|
||||
function stopNewBlog () {
|
||||
self.stop();
|
||||
}
|
||||
$doc.on('hide.bs.modal', stopNewBlog);
|
||||
$doc.one('shown.bs.modal', function () {
|
||||
$('.modal button.btn-primary').one('click', function () {
|
||||
$doc.off('hide.bs.modal', stopNewBlog);
|
||||
self.moveToStep('post-page');
|
||||
});
|
||||
self.moveToNextStep();
|
||||
|
||||
@@ -39,8 +39,14 @@
|
||||
title: "New event",
|
||||
content: "Click here to create an event.",
|
||||
triggers: function () {
|
||||
$(document).one('shown.bs.modal', function () {
|
||||
var $doc = $(document);
|
||||
function stopNewEvent () {
|
||||
self.stop();
|
||||
}
|
||||
$doc.on('hide.bs.modal', stopNewEvent);
|
||||
$doc.one('shown.bs.modal', function () {
|
||||
$('.modal button.btn-primary').one('click', function () {
|
||||
$doc.off('hide.bs.modal', stopNewEvent);
|
||||
self.moveToStep('event-page');
|
||||
});
|
||||
self.moveToNextStep();
|
||||
|
||||
@@ -39,12 +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 () {
|
||||
self.stop();
|
||||
}
|
||||
$(document).one('hidden.bs.modal', stopIfModalClosed);
|
||||
$(document).one('shown.bs.modal', function () {
|
||||
$('.modal button.btn-primary').one('click', function () {
|
||||
$(document).off('hidden.bs.modal', stopIfModalClosed);
|
||||
self.moveToStep('product-page');
|
||||
});
|
||||
self.moveToNextStep();
|
||||
});
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user