Browse Source

[FIX][11.0] website_cookie_notice travis warning

pull/481/head
tbaden 3 months ago
parent
commit
d9d792b1e9
1 changed files with 8 additions and 7 deletions
  1. 8
    7
      website_cookie_notice/static/src/js/accept_cookies.js

+ 8
- 7
website_cookie_notice/static/src/js/accept_cookies.js View File

@@ -9,14 +9,15 @@ odoo.define('website_cookie_notice.cookie_notice', function (require) {
var ajax = require('web.ajax');
var base = require('web_editor.base');

base.ready().done(function() {
$(".cc-cookies .btn-primary").click(function(e) {
base.ready().done(function () {
$(".cc-cookies .btn-primary").click(function (e) {
e.preventDefault();
ajax.jsonRpc('/website_cookie_notice/ok', 'call').then(function (data) {
if (data.result == 'ok') {
$(e.target).closest(".cc-cookies").hide("fast");
}
});
ajax.jsonRpc('/website_cookie_notice/ok', 'call')
.then(function (data) {
if (data.result === 'ok') {
$(e.target).closest(".cc-cookies").hide("fast");
}
});
});
});
}

Loading…
Cancel
Save