Browse Source

[FIX][11.0] website_cookie_notice travis warning

pull/481/head
tbaden 1 month 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) {
9 9
     var ajax = require('web.ajax');
10 10
     var base = require('web_editor.base');
11 11
 
12
-    base.ready().done(function() {
13
-        $(".cc-cookies .btn-primary").click(function(e) {
12
+    base.ready().done(function () {
13
+        $(".cc-cookies .btn-primary").click(function (e) {
14 14
             e.preventDefault();
15
-            ajax.jsonRpc('/website_cookie_notice/ok', 'call').then(function (data) {
16
-                if (data.result == 'ok') {
17
-                    $(e.target).closest(".cc-cookies").hide("fast");
18
-                }
19
-            });
15
+            ajax.jsonRpc('/website_cookie_notice/ok', 'call')
16
+                .then(function (data) {
17
+                    if (data.result === 'ok') {
18
+                        $(e.target).closest(".cc-cookies").hide("fast");
19
+                    }
20
+                });
20 21
         });
21 22
     });
22 23
 }

Loading…
Cancel
Save