Display a message when no services are enabled (fixes #368)

This commit is contained in:
Pierre Rudloff 2019-10-21 17:26:40 +02:00
parent 1e3c61d901
commit 3c3654750c
3 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,7 @@ tarteaucitron.lang = {
"more": "Read more",
"source": "View the official website",
"credit": "Cookies manager by tarteaucitron.js",
"noServices": "This website does not use any cookie requiring your consent.",
"toggleInfoBox": "Show/hide informations about cookie storage",
"title": "Cookies management panel",

View File

@ -29,6 +29,7 @@ tarteaucitron.lang = {
"more": "En savoir plus",
"source": "Voir le site officiel",
"credit": "Gestion des cookies par tarteaucitron.js",
"noServices": "Ce site n'utilise aucun cookie nécessitant votre consentement.",
"toggleInfoBox": "Afficher/masquer les informations sur le stockage des cookies",
"title": "Panneau de gestion des cookies",

View File

@ -314,6 +314,7 @@ var tarteaucitron = {
html += ' </div>';
html += ' <ul id="tarteaucitronServices_' + cat[i] + '"></ul></li>';
}
html += ' <li id="tarteaucitronNoServicesTitle" class="tarteaucitronLine">' + tarteaucitron.lang.noServices + '</li>';
html += ' </ul>';
html += ' <div class="tarteaucitronHidden" id="tarteaucitronScrollbarChild" style="height:20px;display:block"></div>';
if (tarteaucitron.parameters.removeCredit === false) {
@ -576,6 +577,8 @@ var tarteaucitron = {
document.getElementById('tarteaucitronServices_' + service.type).innerHTML += html;
}
tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
tarteaucitron.userInterface.order(service.type);
}