Skip to content

Commit 7316201

Browse files
#13865 move options to wiget's options
1 parent 0c7ac0c commit 7316201

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

app/code/Magento/Theme/view/frontend/web/js/cookie-status.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ define([
66
'use strict';
77

88
$.widget('mage.cookieStatus', {
9+
options: {
10+
type: 'popup',
11+
responsive: true,
12+
innerScroll: true,
13+
autoOpen: true,
14+
buttons: [{
15+
text: $.mage.__('Close'),
16+
class: 'cookie-status',
17+
click: function () {
18+
this.closeModal();
19+
}
20+
}]
21+
},
22+
923
/**
1024
* Init object
1125
* @private
1226
*/
1327
_init: function () {
1428

1529
if(!navigator.cookieEnabled) {
16-
const options = {
17-
type: 'popup',
18-
responsive: true,
19-
innerScroll: true,
20-
autoOpen: true,
21-
buttons: [{
22-
text: $.mage.__('Close'),
23-
class: 'cookie-status',
24-
click: function () {
25-
this.closeModal();
26-
}
27-
}]
28-
};
29-
30-
modal(options, $('#cookie-status'));
30+
modal(this.options, $('#cookie-status'));
3131
}
3232
}
3333
});

0 commit comments

Comments
 (0)