Skip to content

Commit 4442808

Browse files
committed
Fixed consent configuration. Closes #6
1 parent 4c39c5a commit 4442808

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

dist/script.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/script.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ function initCookies() {
3737

3838
function configureCookies(event) {
3939
event.preventDefault();
40-
var formData = new FormData(event.target)
41-
window.LaravelCookieConsent.configure(formData)
40+
window.LaravelCookieConsent.configure(new FormData(event.target));
4241
close();
4342
}
4443

@@ -93,7 +92,7 @@ function toggleExpand(event, el, hide = true) {
9392
hideNotice(hide, isOpen)
9493
}
9594

96-
function changeText(hide, isOpen, event) {
95+
function changeText(hide, isOpen, event) {
9796
if(hide) return;
9897

9998
event.target.textContent = isOpen

resources/scss/style.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
margin-top: -0.7em;
218218
background: #E7E8E9;
219219
z-index: 0;
220-
transition: background 200ms ease-out;
220+
transition: background 200ms ease-out, opacity 200ms ease-out;
221221
}
222222
&:before {
223223
right: 0.75em;
@@ -234,6 +234,10 @@
234234

235235
&__category input:checked + .cookies__box:after {
236236
background: #7959EF;
237+
opacity: 1;
238+
}
239+
240+
&__category input:disabled + .cookies__box:after {
237241
opacity: 0.6;
238242
}
239243

0 commit comments

Comments
 (0)