Add an option to show a message about mandatory cookies

This commit is contained in:
Amauri CHAMPEAUX 2020-05-21 15:37:31 +02:00
parent 605dd68565
commit e88aa28701
26 changed files with 121 additions and 29 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -51,7 +51,9 @@ tarteaucitron.init({
//"cookieDomain": ".my-multisite-domaine.fr", /* Shared cookie for subdomain website */
"readmoreLink": "/cookiespolicy" /* Change the default readmore link pointing to tarteaucitron.io */
"readmoreLink": "/cookiespolicy", /* Change the default readmore link pointing to tarteaucitron.io */
"mandatory": false /* Show a message about mandatory cookies */
});
</script>
```

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Други",
"details": "Services to display web content."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -70,5 +70,8 @@ tarteaucitron.lang = {
"other": {
"title": "其他",
"details": "旨在显示网页内容的服务。"
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Jiný",
"details": "Služby pro zobrazení webového obsahu."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Andet",
"details": "Tjenester til visning af webindhold."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Andere",
"details": "Dienste zum Anzeigen von Web-Inhalten."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Λοιπές υπηρεσίες",
"details": "Υπηρεσίες που παρουσιάζουν άλλο περιεχόμενο."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Other",
"details": "Services to display web content."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Otro",
"details": "Servicios para mostrar contenido web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -76,5 +76,8 @@ tarteaucitron.lang = {
"other": {
"title": "Muut",
"details": "Palvelut web-sisältöjen näyttämiseen."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -74,5 +74,8 @@ tarteaucitron.lang = {
"other": {
"title": "Autre",
"details": "Services visant à afficher du contenu web."
}
},
"mandatoryTitle": "Cookies obligatoires",
"mandatoryText": "Ce site utilise des cookies nécessaires à son bon fonctionnement qui ne peuvent pas être désactivés."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Ostatné",
"details": "Služby na zobrazovanie webového obsahu."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Altro",
"details": "Servizi per visualizzare contenuti web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Other",
"details": "Services to display web content."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Overig",
"details": "Diensten om webinhoud weer te geven."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -74,5 +74,8 @@ tarteaucitron.lang = {
"other": {
"title": "Autre",
"details": "Servicis que cèrcan a afichar de contengut web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Inne",
"details": "Usługi do wyświetlania treści internetowych."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -70,5 +70,8 @@ tarteaucitron.lang = {
"other": {
"title": "De outros",
"details": "Serviços para exibir conteúdo da web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Alte",
"details": "Servicii pentru afișarea conținutului web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -72,5 +72,8 @@ tarteaucitron.lang = {
"other": {
"title": "Другие",
"details": "Службы для отображения веб-контента."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Övrig",
"details": "Tjänster för att visa webbinnehåll."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -148,6 +148,9 @@ tarteaucitron.lang = {
"details": "Služby na zobrazovanie webového obsahu."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -76,5 +76,8 @@ tarteaucitron.lang = {
"other": {
"title": "diğer\n",
"details": "Web içeriğini görüntüleme hizmetleri."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -73,5 +73,8 @@ tarteaucitron.lang = {
"other": {
"title": "Dịch vụ khác",
"details": "Dịch vụ hiển thị nội dung web."
}
},
"mandatoryTitle": "Mandatory cookies",
"mandatoryText": "This site uses cookies necessary for its proper functioning which cannot be deactivated."
};

View File

@ -17,7 +17,7 @@ var scripts = document.getElementsByTagName('script'),
var tarteaucitron = {
"version": 20200501,
"version": 20200521,
"cdn": cdn,
"user": {},
"lang": {},
@ -214,7 +214,8 @@ var tarteaucitron = {
"moreInfoLink": true,
"privacyUrl": "",
"useExternalCss": false,
"useExternalJs": false
"useExternalJs": false,
"mandatory": false
},
params = tarteaucitron.parameters;
@ -321,6 +322,28 @@ var tarteaucitron = {
html += ' </div>';
html += ' <div class="tarteaucitronBorder">';
html += ' <div class="clear"></div><ul>';
if (tarteaucitron.parameters.mandatory == true) {
html += '<li id="tarteaucitronServicesTitle_mandatory">';
html += '<div class="tarteaucitronTitle">';
html += ' <button type="button">&nbsp; ' + tarteaucitron.lang.mandatoryTitle + '</button>';
html += '</div>';
html += '<ul id="tarteaucitronServices_mandatory">';
html += '<li class="tarteaucitronLine">';
html += ' <div class="tarteaucitronName">';
html += ' <span class="tarteaucitronH3" role="heading" aria-level="3">' + tarteaucitron.lang.mandatoryText + '</span>';
html += ' <span class="tarteaucitronListCookies"></span><br/>';
html += ' </div>';
html += ' <div class="tarteaucitronAsk">';
html += ' <button type="button" class="tarteaucitronAllow">';
html += ' &#10003; ' + tarteaucitron.lang.allow;
html += ' </button> ';
html += ' </div>';
html += '</li>';
html += '</ul></li>';
}
for (i = 0; i < cat.length; i += 1) {
html += ' <li id="tarteaucitronServicesTitle_' + cat[i] + '" class="tarteaucitronHidden">';
html += ' <div class="tarteaucitronTitle">';
@ -1412,8 +1435,6 @@ var tarteaucitron = {
return 'es_ES';
} else if (userLanguage === 'it') {
return 'it_IT';
} else if (userLanguage === 'oc') {
return 'oc_FR';
} else if (userLanguage === 'pt') {
return 'pt_PT';
} else if (userLanguage === 'nl') {