Merge pull request #166 from r-baudot/display-cta-accept-all-with-highPrivacy

Add a feature to display the 'Accept All' CTA when 'hightPrivacy : true'
This commit is contained in:
Amauri CHAMPEAUX 2018-08-28 10:51:33 +02:00 committed by GitHub
commit b648c04c1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -120,6 +120,7 @@ tarteaucitron.init({
"hashtag": "#tarteaucitron", /* Ouverture automatique du panel avec le hashtag */
"cookieName": "tartaucitron", /* Nom du cookie */
"highPrivacy": false, /* désactiver le consentement implicite (en naviguant) ? */
"AcceptAllCta" : false, /* Afficher le CTA "Tout accepter" si "hightPrivacy : true" */
"orientation": "top", /* le bandeau doit être en haut (top) ou en bas (bottom) ? */
"adblocker": false, /* Afficher un message si un adblocker est détecté */
"showAlertSmall": true, /* afficher le petit bandeau en bas à droite ? */

View File

@ -208,6 +208,7 @@ var tarteaucitron = {
"showAlertSmall": true,
"cookieslist": true,
"handleBrowserDNTRequest": false,
"AcceptAllCta" : false,
"moreInfoLink": true
},
params = tarteaucitron.parameters;
@ -305,7 +306,7 @@ var tarteaucitron = {
orientation = 'Bottom';
}
if (tarteaucitron.parameters.highPrivacy) {
if (tarteaucitron.parameters.highPrivacy && !defaults.AcceptAllCta) {
html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
html += ' <span id="tarteaucitronDisclaimerAlert">';
html += ' ' + tarteaucitron.lang.alertBigPrivacy;