New template for the cookies listing
This commit is contained in:
parent
5238456fb1
commit
b8649717fa
|
|
@ -324,7 +324,6 @@
|
||||||
#tarteaucitronAlertSmall {
|
#tarteaucitronAlertSmall {
|
||||||
background: #333;
|
background: #333;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
cursor: pointer;
|
|
||||||
display: none;
|
display: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
@ -336,6 +335,7 @@
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronManager {
|
#tarteaucitronAlertSmall #tarteaucitronManager {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 11px !important;
|
font-size: 11px !important;
|
||||||
padding: 10px 10px 5px 10px;
|
padding: 10px 10px 5px 10px;
|
||||||
|
|
@ -379,6 +379,7 @@
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesNumber {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesNumber {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background: rgba(255, 255, 255, 0.2);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 34px;
|
font-size: 34px;
|
||||||
padding: 5px 10px 0;
|
padding: 5px 10px 0;
|
||||||
|
|
@ -389,46 +390,66 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer {
|
||||||
background: #333;
|
background: #fff;
|
||||||
|
box-shadow: 0 0 15px #4a4a4a;
|
||||||
display: none;
|
display: none;
|
||||||
|
max-height: 80%;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
|
overflow: auto;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList {
|
||||||
background: rgba(255, 255, 255, 0.2);
|
background: rgba(51, 51, 51, 0.1);
|
||||||
color: #fff;
|
color: #333;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList b {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList b {
|
||||||
color: #fff;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList .tarteaucitronCookiesListMain {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList #tarteaucitronCookiesTitle {
|
||||||
padding: 4px;
|
background: #333;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList #tarteaucitronCookiesTitle b {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain {
|
||||||
|
border-bottom: 4px solid #fff;
|
||||||
|
padding: 7px 5px 10px;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList .tarteaucitronCookiesListMain:hover {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain:hover {
|
||||||
background: rgba(255, 255, 255, 0.1);
|
background: rgba(51, 51, 51, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList .tarteaucitronCookiesListLeft {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain a {
|
||||||
display: inline-block;
|
color: #333;
|
||||||
width: 40%;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tarteaucitronAlertSmall #tarteaucitronCookiesList .tarteaucitronCookiesListRight {
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListLeft {
|
||||||
color: #fff;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tarteaucitronAlertSmall #tarteaucitronCookiesListContainer #tarteaucitronCookiesList .tarteaucitronCookiesListMain .tarteaucitronCookiesListRight {
|
||||||
|
color: #333;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 11px;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 40%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ var scripts = document.getElementsByTagName('script'),
|
||||||
tarteaucitronNoAdBlocker = false;
|
tarteaucitronNoAdBlocker = false;
|
||||||
|
|
||||||
var tarteaucitron = {
|
var tarteaucitron = {
|
||||||
"version": 152,
|
"version": 155,
|
||||||
"cdn": cdn,
|
"cdn": cdn,
|
||||||
"user": {},
|
"user": {},
|
||||||
"lang": {},
|
"lang": {},
|
||||||
|
|
@ -561,7 +561,7 @@ var tarteaucitron = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (parseInt(document.getElementById('tarteaucitronAlertSmall').offsetHeight, 10) + 3) + 'px');
|
tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (parseInt(document.getElementById('tarteaucitronAlertSmall').offsetHeight, 10) + 10) + 'px');
|
||||||
if (div.style.display !== 'block') {
|
if (div.style.display !== 'block') {
|
||||||
div.style.display = 'block';
|
div.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -591,6 +591,7 @@ var tarteaucitron = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cookie": {
|
"cookie": {
|
||||||
|
"owner": {},
|
||||||
"create": function (key, status) {
|
"create": function (key, status) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var d = new Date(),
|
var d = new Date(),
|
||||||
|
|
@ -650,6 +651,12 @@ var tarteaucitron = {
|
||||||
for (i = 0; i < nb; i += 1) {
|
for (i = 0; i < nb; i += 1) {
|
||||||
if (document.cookie.indexOf(arr[i] + '=') !== -1) {
|
if (document.cookie.indexOf(arr[i] + '=') !== -1) {
|
||||||
nbCurrent += 1;
|
nbCurrent += 1;
|
||||||
|
if (tarteaucitron.cookie.owner[arr[i]] === undefined) {
|
||||||
|
tarteaucitron.cookie.owner[arr[i]] = [];
|
||||||
|
}
|
||||||
|
if (tarteaucitron.cookie.crossIndexOf(tarteaucitron.cookie.owner[arr[i]], tarteaucitron.services[key].name) === false) {
|
||||||
|
tarteaucitron.cookie.owner[arr[i]].push(tarteaucitron.services[key].name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -678,21 +685,43 @@ var tarteaucitron = {
|
||||||
|
|
||||||
tarteaucitron.cookie.number();
|
tarteaucitron.cookie.number();
|
||||||
},
|
},
|
||||||
|
"crossIndexOf": function (arr, match) {
|
||||||
|
"use strict";
|
||||||
|
var i;
|
||||||
|
for (i = 0; i < arr.length; i += 1) {
|
||||||
|
if (arr[i] === match) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
"number": function () {
|
"number": function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
var cookies = document.cookie.split(';'),
|
var cookies = document.cookie.split(';'),
|
||||||
nb = (document.cookie !== '') ? cookies.length : 0,
|
nb = (document.cookie !== '') ? cookies.length : 0,
|
||||||
html = '',
|
html = '',
|
||||||
i,
|
i,
|
||||||
s = (nb > 1) ? 's' : '';
|
s = (nb > 1) ? 's' : '',
|
||||||
|
name;
|
||||||
|
|
||||||
|
cookies = cookies.sort(function (a, b) {
|
||||||
|
if (a > b) { return 1; }
|
||||||
|
if (a < b) { return -1; }
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
html += '<div class="tarteaucitronCookiesListMain" style="background: none !important;cursor: text;margin-bottom:8px">';
|
html += '<div class="tarteaucitronCookiesListMain" id="tarteaucitronCookiesTitle">';
|
||||||
html += ' <b style="font-size:15px;">' + nb + ' cookie' + s + '</b>';
|
html += ' <b>' + nb + ' cookie' + s + '</b>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
if (document.cookie !== '') {
|
if (document.cookie !== '') {
|
||||||
for (i = 0; i < nb; i += 1) {
|
for (i = 0; i < nb; i += 1) {
|
||||||
|
name = cookies[i].split('=', 1).toString().replace(/ /g, '');
|
||||||
html += '<div class="tarteaucitronCookiesListMain">';
|
html += '<div class="tarteaucitronCookiesListMain">';
|
||||||
html += ' <div class="tarteaucitronCookiesListLeft"><a href="#" style="text-decoration:none" onclick="tarteaucitron.cookie.purge([\'' + cookies[i].split('=', 1) + '\']);tarteaucitron.cookie.number();return false">[x]</a> <b>' + cookies[i].split('=', 1) + '</b></div>';
|
html += ' <div class="tarteaucitronCookiesListLeft"><a href="#" onclick="tarteaucitron.cookie.purge([\'' + cookies[i].split('=', 1) + '\']);tarteaucitron.cookie.number();return false">[x]</a> <b>' + name + '</b>';
|
||||||
|
if (tarteaucitron.cookie.owner[name] !== undefined) {
|
||||||
|
html += ' <br/>' + tarteaucitron.cookie.owner[name].join('<br/>');
|
||||||
|
}
|
||||||
|
html += ' </div>';
|
||||||
html += ' <div class="tarteaucitronCookiesListRight">' + cookies[i].split('=').slice(1).join('=') + '</div>';
|
html += ' <div class="tarteaucitronCookiesListRight">' + cookies[i].split('=').slice(1).join('=') + '</div>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue