Skip to content

Commit ec5c054

Browse files
committed
Merge branch 'sw-24691/5.6/fix-issue-with-overlay' into '5.6'
SW-24691 - Fix issue with off-canvas menu being visible for a second, added... See merge request shopware/5/product/shopware!184
2 parents f4a6f48 + 2682d8c commit ec5c054

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

_sql/migrations/1649-add-cookie-consent-manager-site.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function up($modus)
1212

1313
$sql = <<<SQL
1414
INSERT INTO `s_cms_static` (`active`, `tpl1variable`, `tpl1path`, `tpl2variable`, `tpl2path`, `tpl3variable`, `tpl3path`, `description`, `html`, `grouping`, `position`, `link`, `target`, `parentID`, `page_title`, `meta_keywords`, `meta_description`, `changed`, `shop_ids`) VALUES
15-
(1, '', '', '', '', '', '', 'Cookie Einstellungen', '', 'bottom2|left', 0, 'javascript:openCookieConsentManager()', '', 0, '', '', '', '2019-11-01 00:00:00', NULL);
15+
(1, '', '', '', '', '', '', 'Cookie-Einstellungen', '', 'bottom2|left', 0, 'javascript:openCookieConsentManager()', '', 0, '', '', '', '2019-11-01 00:00:00', NULL);
1616
SQL;
1717
$this->addSql($sql);
1818

snippets/frontend/cookie_consent/cookies.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ no_cache = "Customer-specific caching"
1717
session = "Session"
1818
csrf = "CSRF-Token"
1919
shop = "Ausgewählter Shop"
20-
preferences = "Cookie Einstellungen"
20+
preferences = "Cookie-Einstellungen"
2121
slt = "Kunden-Wiedererkennung"
2222
decline = "Alle Cookies ablehnen"
2323
allow = "Alle Cookies annehmen"

themes/Frontend/Responsive/frontend/_public/src/js/jquery.cookie-consent-manager.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@
120120
* @type {string}
121121
*/
122122
openConsentManagerButton: '*[data-openConsentManager=true]',
123+
124+
/**
125+
* Selector of the element which can be clicked as well to toggle a cookies state.
126+
*
127+
* @property cookieLabelSelector
128+
* @type {string}
129+
*/
130+
cookieLabelSelector: '.cookie--label'
123131
},
124132

125133
/**
@@ -166,6 +174,7 @@
166174
this.$el.find(this.opts.cookieGroupToggleInputSelector).on('change', $.proxy(this.onGroupToggleChanged, this));
167175
this.$el.find(this.opts.cookieActiveInputSelector).on('change', $.proxy(this.onCookieToggleChanged, this));
168176
this.$el.find(this.opts.saveButtonSelector).on('click', $.proxy(this.onSave, this));
177+
this.$el.find(this.opts.cookieLabelSelector).on('click', $.proxy(this.onClickCookieName, this));
169178

170179
this._on(this.opts.openConsentManagerButton, 'click', $.proxy(this.openConsentManager, this));
171180
},
@@ -271,6 +280,14 @@
271280
$.publish('plugin/swCookieConsentManager/onBuildCookiePreferences', [ this, preferences ]);
272281
},
273282

283+
onClickCookieName: function (event) {
284+
var cookieNameEl = $(event.currentTarget),
285+
cookieCt = cookieNameEl.parent(this.opts.cookieContainerSelector),
286+
inputEl = cookieCt.find(this.opts.cookieActiveInputSelector);
287+
288+
inputEl.click();
289+
},
290+
274291
toggleAllCookiesFromGroup: function (cookies, active) {
275292
var me = this;
276293

themes/Frontend/Responsive/frontend/_public/src/less/_components/cookie-consent-manager.less

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#cookie-consent:extend(.sidebar-main.off-canvas) {
22
.unitize-width(280);
3-
.transition(all 0.45s cubic-bezier(.3,0,.15,1));
3+
.transition(transform 0.45s cubic-bezier(.3,0,.15,1));
44

55
&.off-canvas {
66
position: fixed;
@@ -62,6 +62,10 @@
6262
.unitize-padding(15, 0);
6363

6464
position: relative;
65+
66+
.cookie--label {
67+
cursor: pointer;
68+
}
6569
}
6670

6771
.cookie-consent--group-container {

0 commit comments

Comments
 (0)