Skip to content

Commit 74f6561

Browse files
authored
Merge pull request #29 from peckadesign/0-cookieConsent-zobecneni
Použití obecnější class a CSS proměnných pro cookie consent
2 parents 3f8eae9 + 0189035 commit 74f6561

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎extensions/pd/cookieConsent.ajax.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@
6868
script.remove();
6969
},
7070
closeCookieConsent: function (settings) {
71-
var $modal = settings.nette.form.closest('.js-cookie-modal');
72-
var closingDuration = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--pdbox-closing-duration') || 0);
71+
var $consentEl = settings.nette.form.closest('.js-cookie-consent');
72+
var closingDuration = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cookie-consent-closing-duration') || 0);
7373

74-
$modal.addClass('cookie-modal--close');
74+
$consentEl.addClass('js-cookie-consent--close');
7575

7676
setTimeout(function() {
77-
$modal.remove();
77+
$consentEl.remove();
7878
}, closingDuration);
7979
}
8080
});

0 commit comments

Comments
 (0)