File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
app/code/Magento/Cookie/view/frontend/web/js Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 8
8
"jquery/ui" ,
9
9
"mage/cookies"
10
10
] , function ( $ ) {
11
+ "use strict" ;
11
12
12
13
$ . widget ( 'mage.cookieNotices' , {
13
14
_create : function ( ) {
@@ -18,6 +19,7 @@ define([
18
19
}
19
20
$ ( this . options . cookieAllowButtonSelector ) . on ( 'click' , $ . proxy ( function ( ) {
20
21
var cookieExpires = new Date ( new Date ( ) . getTime ( ) + this . options . cookieLifetime * 1000 ) ;
22
+
21
23
$ . mage . cookies . set ( this . options . cookieName , this . options . cookieValue , { expires : cookieExpires } ) ;
22
24
if ( $ . mage . cookies . get ( this . options . cookieName ) ) {
23
25
window . location . reload ( ) ;
@@ -29,4 +31,4 @@ define([
29
31
} ) ;
30
32
31
33
return $ . mage . cookieNotices ;
32
- } ) ;
34
+ } ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ define([
30
30
*/
31
31
_bind : function ( ) {
32
32
var events = { } ;
33
+
33
34
$ . each ( this . options . triggers , function ( index , value ) {
34
35
events [ 'click ' + value ] = '_checkCookie' ;
35
36
} ) ;
@@ -50,4 +51,4 @@ define([
50
51
} ) ;
51
52
52
53
return $ . mage . requireCookie ;
53
- } ) ;
54
+ } ) ;
You can’t perform that action at this time.
0 commit comments