[IMP] website, website_forum: add a class modal_shown on modal once css animation is completed

Use this new class in website_forum to avoid that the tour click during
the animation and fail randomly.

https://getbootstrap.com/docs/4.0/components/modal/#events
This commit is contained in:
Jeremy Kersten
2018-08-23 13:49:01 +02:00
parent 2f4358b921
commit 5b0327f650
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -11,3 +11,13 @@ weContext.get = function (context) {
}, weGetContext(context), context);
};
});
odoo.define('website.website_modal', function (require) {
'use strict';
require('web.dom_ready');
$('body').on('shown.bs.modal', function (e) {
$(e.target).addClass('modal_shown');
});
});
@@ -51,6 +51,7 @@ odoo.define("website_forum.tour_forum", function (require) {
content: _t("Click to post your question."),
position: "bottom",
}, {
extra_trigger: 'div.modal.modal_shown',
trigger: ".modal-header button.close",
auto: true,
}, {
@@ -64,6 +65,7 @@ odoo.define("website_forum.tour_forum", function (require) {
content: _t("Click to post your answer."),
position: "bottom",
}, {
extra_trigger: 'div.modal.modal_shown',
trigger: ".modal-header button.close",
auto: true,
}, {