Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Miroslav Kratochvil
jekyll-theme-lcsb-default
Commits
a5e812da
Verified
Commit
a5e812da
authored
Apr 20, 2020
by
Laurent Heirendt
✈
Browse files
WIP add ids of checkboxes
parent
037a8d9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/gdpr.js
View file @
a5e812da
...
...
@@ -118,16 +118,21 @@ function accept() {
// style
$
(
'
.lap-cookies-accept
'
).
addClass
(
'
selected
'
);
$
(
'
.lap-cookies-refuse
'
).
removeClass
(
'
selected
'
);
$
(
'
input#checkbox-2
'
)[
0
].
checked
=
true
;
}
var
boxID
=
2
;
$
(
'
input#checkbox-
'
+
boxID
)[
0
].
checked
=
true
;
}
function
select_accept
()
{
if
(
$
(
'
input#checkbox-2
'
)[
0
].
checked
===
true
)
{
/*
* toggleBox: refuse/accept based on checkbox with boxID
*/
function
toggleBox
(
boxID
)
{
if
(
$
(
'
input#checkbox-
'
+
boxID
)[
0
].
checked
===
true
)
{
refuse
(
false
);
}
else
{
accept
();
}
hideBanner
();
}
/*
...
...
@@ -149,7 +154,9 @@ function refuse(doNotTrack) {
// style
$
(
'
.lap-cookies-refuse
'
).
addClass
(
'
selected
'
);
$
(
'
.lap-cookies-accept
'
).
removeClass
(
'
selected
'
);
$
(
'
input#checkbox-2
'
)[
0
].
checked
=
false
;
var
boxID
=
2
;
$
(
'
input#checkbox-
'
+
boxID
)[
0
].
checked
=
false
;
}
/*
...
...
@@ -172,8 +179,7 @@ $(document).ready(function() {
$
(
'
.analytics
'
).
click
(
function
(
e
)
{
e
.
preventDefault
(
true
);
select_accept
();
hideBanner
();
toggleBox
(
2
);
});
// detect if the visitor is a bot or not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment