Skip to content

Commit

Permalink
Version 4.0.1
Browse files Browse the repository at this point in the history
* Beim Button **Alles ablehnen** die notwendigen Dienste setzen statt "leer", Ausgabe auch im Consent-Log
* Cookies mit www löschen, behebt evtl. #284 @alxndr-w
* Fragment `consent_manager_box.php`: Link **Details anzeigen** um `href=#` erweitert, Click-Ereignisse mit return false in `consent_manager_frontend.js`
* Fix #286 - Link Datenschutzerklärung nicht lokalisiert @clausbde
* removed .php-cs-fixer.dist.php
  • Loading branch information
aeberhard committed Feb 16, 2023
1 parent 96f0a07 commit 7317f06
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 73 deletions.
69 changes: 0 additions & 69 deletions .php-cs-fixer.dist.php

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# REDAXO consent_manager - Changelog

## Version 4.0.1 – 16.02.2023

### Bugfixes

* Beim Button **Alles ablehnen** die notwendigen Dienste setzen statt "leer", Ausgabe auch im Consent-Log
* Cookies mit www löschen, behebt evtl. #284 @alxndr-w
* Fragment `consent_manager_box.php`: Link **Details anzeigen** um `href=#` erweitert, Click-Ereignisse mit return false in `consent_manager_frontend.js`
* Fix #286 - Link Datenschutzerklärung nicht lokalisiert @clausbde
* removed .php-cs-fixer.dist.php

## Version 4.0.0 – 20.01.2023

### Breaking Changes
Expand Down
22 changes: 22 additions & 0 deletions assets/consent_manager_frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,30 @@
document.querySelector('body').style.overflow = 'auto';
}
document.getElementById('consent_manager-background').classList.add('consent_manager-hidden');
return false;
});
});

if (document.getElementById('consent_manager-toggle-details')) {
document.getElementById('consent_manager-toggle-details').addEventListener('click', function () {
document.getElementById('consent_manager-detail').classList.toggle('consent_manager-hidden');
return false;
});
}

if (document.getElementById('consent_manager-toggle-details')) {
document.getElementById('consent_manager-toggle-details').addEventListener('keydown', function (event) {
if (event.key == 'Enter') {
document.getElementById('consent_manager-detail').classList.toggle('consent_manager-hidden');
return false;
}
});
}

document.querySelectorAll('.consent_manager-show-box, .consent_manager-show-box-reload').forEach(function (el) {
el.addEventListener('click', function () {
showBox();
return false;
});
});

Expand Down Expand Up @@ -138,6 +142,22 @@
});
}
});
} else {
consent_managerBox.querySelectorAll('[data-cookie-uids]').forEach(function (el) {
// array mit cookie uids
var cookieUids = JSON.parse(el.getAttribute('data-cookie-uids'));
if (el.disabled) {
cookieUids.forEach(function (uid) {
consents.push(uid);
addScript(consent_managerBox.querySelector('[data-uid="script-' + uid + '"]'));
});
} else {
el.checked = false;
cookieUids.forEach(function (uid) {
removeScript(consent_managerBox.querySelector('[data-uid="script-' + uid + '"]'));
});
}
});
}
cookieData.consents = consents;
Cookies.set('consent_manager', JSON.stringify(cookieData), { expires: expires, path: '/', domain: consent_manager_parameters.domain, sameSite: 'Lax', secure: false });
Expand Down Expand Up @@ -165,6 +185,8 @@
Cookies.remove(encodeURIComponent(key), { 'domain': domain, 'path': '/' });
Cookies.remove(encodeURIComponent(key), { 'domain': ('.' + domain) });
Cookies.remove(encodeURIComponent(key), { 'domain': ('.' + domain), 'path': '/' });
Cookies.remove(encodeURIComponent(key), { 'domain': ('www.' + domain) });
Cookies.remove(encodeURIComponent(key), { 'domain': ('www.' + domain), 'path': '/' });
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/consent_manager_frontend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fragments/consent_manager_box.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
?>
</div>
<div class="consent_manager-show-details">
<a id="consent_manager-toggle-details" class="icon-info-circled" tabindex="0"><?= $consent_manager->texts['toggle_details'] ?></a>
<a href="#" id="consent_manager-toggle-details" class="icon-info-circled" tabindex="0"><?= $consent_manager->texts['toggle_details'] ?></a>
</div>
</div>
<div class="consent_manager-detail consent_manager-hidden" id="consent_manager-detail">
Expand Down
Loading

0 comments on commit 7317f06

Please sign in to comment.