summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_popup/options.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-11-22 13:20:23 +0000
committerqsm-odoo <qsm@odoo.com>2020-01-29 14:53:38 +0000
commit3028e9a8649ae5d9b23a1bdb989b903645ede5fe (patch)
treecf54e7c116cee0cb0cea3f06d65f897e8531596e /addons/website/static/src/snippets/s_popup/options.js
parent3bce5277e378fd499bf2d0fed8c62929165b7871 (diff)
[IMP] website: introduce cookies bar on website
With this commit, it is now possible to activate a cookies bar on a website through the res.settings. The cookies bar can be edited in the frontend by entering edit mode. The cookies bar will appear until the user clicks on 'I agree'. Part of https://github.com/odoo/odoo/pull/41294 task-2087003 closes odoo/odoo#41294 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/snippets/s_popup/options.js')
-rw-r--r--addons/website/static/src/snippets/s_popup/options.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/static/src/snippets/s_popup/options.js b/addons/website/static/src/snippets/s_popup/options.js
index 4c43041c614..842cc284c83 100644
--- a/addons/website/static/src/snippets/s_popup/options.js
+++ b/addons/website/static/src/snippets/s_popup/options.js
@@ -8,7 +8,10 @@ options.registry.SnippetPopup = options.Class.extend({
* @override
*/
start: function () {
- this.$target.find('.s_popup_close').on('click', () => {
+ // Note: the link are excluded here so that internal modal buttons do
+ // not close the popup as we want to allow edition of those buttons.
+ this.$target.find('.js_close_popup:not(a, .btn)').on('click', ev => {
+ ev.stopPropagation();
this.onTargetHide();
this.trigger_up('snippet_option_visibility_update', {show: false});
});