Merge branch 'master' into matterport

This commit is contained in:
David 2018-09-15 16:51:40 +02:00
commit a4c8152320
4 changed files with 76 additions and 36 deletions

View File

@ -480,6 +480,10 @@ h2#tarteaucitronCookiesNumberBis {
font-weight: 700; font-weight: 700;
} }
#tarteaucitronAlertBig #tarteaucitronPrivacyUrl {
cursor: pointer;
}
#tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitron #tarteaucitronPrivacyUrl { #tarteaucitronAlertBig #tarteaucitronCloseAlert, #tarteaucitronAlertBig #tarteaucitronPersonalize, #tarteaucitron #tarteaucitronPrivacyUrl {
background: #008300; background: #008300;
color: #fff; color: #fff;
@ -701,9 +705,16 @@ div.amazon_product {
width:120px; width:120px;
} }
.tarteaucitronIsAllowed .tarteaucitronDeny { .tarteaucitronIsAllowed .tarteaucitronDeny {
opacity: 0.5; opacity: 0.4!important;
}.tarteaucitronIsDenied .tarteaucitronAllow { }.tarteaucitronIsDenied .tarteaucitronAllow {
opacity: 0.5; opacity: 0.4!important;
}.tarteaucitronIsAllowed .tarteaucitronAllow {
opacity: 1!important;
}.tarteaucitronIsDenied .tarteaucitronDeny {
opacity: 1!important;
}
.tarteaucitronLine .tarteaucitronAllow, .tarteaucitronLine .tarteaucitronAllow {
opacity: 0.4;
} }
div#tarteaucitronInfo { div#tarteaucitronInfo {

View File

@ -1,14 +1,14 @@
/*global tarteaucitron */ /*global tarteaucitron */
tarteaucitron.lang = { tarteaucitron.lang = {
"adblock": "Hola! Este sitio web es transparente y le da la opción de activar los servicios de terceros.", "adblock": "¡Hola! Este sitio web es transparente y te da la opción de activar los servicios de terceros.",
"adblock_call": "Por favor deshabilite su AdBlocker para empezar a personalizar los servicios.", "adblock_call": "Por favor deshabilita tu AdBlocker para empezar a personalizar los servicios.",
"reload": "Actualizar esta página", "reload": "Actualizar esta página",
"alertBigScroll": "Al continuar para desplazarse,", "alertBigScroll": "Al continuar desplazándote,",
"alertBigClick": "Si continuas navegando por este sitio web,", "alertBigClick": "Si continuas navegando por este sitio web,",
"alertBig": "estar permitiendo servicios terceros", "alertBig": "estás permitiendo servicios terceros",
"alertBigPrivacy": "Este sitio web usa cookies y te permite controlar lo que deseas activar", "alertBigPrivacy": "Este sitio web usa cookies y te permite controlar las que deseas activar",
"alertSmall": "Gestionar servicios", "alertSmall": "Gestionar servicios",
"personalize": "Personalizar", "personalize": "Personalizar",
"acceptAll": "OK, aceptar todas", "acceptAll": "OK, aceptar todas",
@ -19,10 +19,10 @@ tarteaucitron.lang = {
"all": "Ajustes para todos los servicios", "all": "Ajustes para todos los servicios",
"info": "Protegiendo tu privacidad", "info": "Protegiendo tu privacidad",
"disclaimer": "Aceptando estos servicios terceros, estas aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.", "disclaimer": "Aceptando estos servicios de terceros, estás aceptando sus cookies y el uso de tecnologías de rastreo necesarias para su correcto funcionamiento.",
"allow": "Permitir", "allow": "Permitir",
"deny": "Denegar", "deny": "Denegar",
"noCookie": "Este servicio no usa cookie.", "noCookie": "Este servicio no usa cookies.",
"useCookie": "Este servicio puede instalar", "useCookie": "Este servicio puede instalar",
"useCookieCurrent": "Este servicio ha instalado", "useCookieCurrent": "Este servicio ha instalado",
"useNoCookie": "Este servicio no ha instalado ninguna cookie.", "useNoCookie": "Este servicio no ha instalado ninguna cookie.",
@ -30,13 +30,13 @@ tarteaucitron.lang = {
"source": "Ver sitio web oficial", "source": "Ver sitio web oficial",
"credit": "Gestor de cookies realizada por tarteaucitron.js", "credit": "Gestor de cookies realizada por tarteaucitron.js",
"toggleInfoBox": "Show/hide informations about cookie storage", "toggleInfoBox": "Mostrar/ocultar información sobre almacenamiento de cookies",
"title": "Cookies management panel", "title": "Panel de gestión de cookies",
"cookieDetail": "Cookie detail for", "cookieDetail": "Detalles de las cookies para",
"ourSite": "on our site", "ourSite": "en nuestra web",
"newWindow": "(new window)", "newWindow": "(ventana nueva)",
"allowAll": "Allow all cookies", "allowAll": "Permitir todas las cookies",
"denyAll": "Deny all cookies", "denyAll": "Denegar todas las cookies",
"fallback": "está deshabilitado.", "fallback": "está deshabilitado.",
@ -45,8 +45,8 @@ tarteaucitron.lang = {
"details": "Las redes publicitarias pueden generar ingresos mediante la venta de espacios publicitarios en el sitio." "details": "Las redes publicitarias pueden generar ingresos mediante la venta de espacios publicitarios en el sitio."
}, },
"analytic": { "analytic": {
"title": "Mediciión de audiencia", "title": "Medición de audiencia",
"details": "Los servicios de medición de audiencia se usan para generar asistencia estadísticas útiles para mejorar el sitio." "details": "Los servicios de medición de audiencia se usan para generar estadísticas útiles para mejorar el sitio."
}, },
"social": { "social": {
"title": "Redes sociales", "title": "Redes sociales",

View File

@ -16,7 +16,7 @@ var scripts = document.getElementsByTagName('script'),
var tarteaucitron = { var tarteaucitron = {
"version": 20180911002, "version": 20180914,
"cdn": cdn, "cdn": cdn,
"user": {}, "user": {},
"lang": {}, "lang": {},
@ -28,6 +28,10 @@ var tarteaucitron = {
"parameters": {}, "parameters": {},
"isAjax": false, "isAjax": false,
"reloadThePage": false, "reloadThePage": false,
"events": {
"init": function () {},
"load": function () {},
},
"init": function (params) { "init": function (params) {
"use strict"; "use strict";
var origOpen; var origOpen;
@ -190,6 +194,10 @@ var tarteaucitron = {
}; };
} }
} }
if(tarteaucitron.events.init) {
tarteaucitron.events.init();
}
}, },
"load": function () { "load": function () {
"use strict"; "use strict";
@ -333,7 +341,13 @@ var tarteaucitron = {
} else { } else {
html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">'; html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
html += ' <span id="tarteaucitronDisclaimerAlert">'; html += ' <span id="tarteaucitronDisclaimerAlert">';
html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
if (tarteaucitron.parameters.highPrivacy) {
html += ' ' + tarteaucitron.lang.alertBigPrivacy;
} else {
html += ' ' + tarteaucitron.lang.alertBigClick + ' ' + tarteaucitron.lang.alertBig;
}
html += ' </span>'; html += ' </span>';
html += ' <button id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">'; html += ' <button id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
html += ' &#10003; ' + tarteaucitron.lang.acceptAll; html += ' &#10003; ' + tarteaucitron.lang.acceptAll;
@ -385,7 +399,7 @@ var tarteaucitron = {
// create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened // create a wrapper container at the same level than tarteaucitron so we can add an aria-hidden when tarteaucitron is opened
var wrapper = document.createElement('div'); var wrapper = document.createElement('div');
wrapper.id = "contentWrapper"; wrapper.id = "contentWrapper";
while (document.body.firstChild) while (document.body.firstChild)
{ {
wrapper.appendChild(document.body.firstChild); wrapper.appendChild(document.body.firstChild);
@ -456,7 +470,7 @@ var tarteaucitron = {
// create wrapper container // create wrapper container
var wrapper = document.createElement('div'); var wrapper = document.createElement('div');
wrapper.id = "contentWrapper"; wrapper.id = "contentWrapper";
while (document.body.firstChild) while (document.body.firstChild)
{ {
wrapper.appendChild(document.body.firstChild); wrapper.appendChild(document.body.firstChild);
@ -475,6 +489,10 @@ var tarteaucitron = {
} }
}); });
}); });
if(tarteaucitron.events.load) {
tarteaucitron.events.load();
}
}, },
"addService": function (serviceId) { "addService": function (serviceId) {
"use strict"; "use strict";
@ -703,8 +721,8 @@ var tarteaucitron = {
tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1');
tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark); tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark);
} else { } else {
tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '1'); tarteaucitron.userInterface.css(c + 'AllAllowed', 'opacity', '0.4');
tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '1'); tarteaucitron.userInterface.css(c + 'AllDenied', 'opacity', '0.4');
} }
// close the alert if all service have been reviewed // close the alert if all service have been reviewed
@ -763,7 +781,7 @@ var tarteaucitron = {
} }
document.getElementById('contentWrapper').setAttribute("aria-hidden", "false"); document.getElementById('contentWrapper').setAttribute("aria-hidden", "false");
document.getElementsByTagName('body')[0].classList.remove('modal-open'); document.getElementsByTagName('body')[0].classList.remove('modal-open');
}, },
"focusTrap": function() { "focusTrap": function() {
"use strict"; "use strict";
@ -781,23 +799,23 @@ var tarteaucitron = {
if (focusableEls[i].offsetHeight > 0) { if (focusableEls[i].offsetHeight > 0) {
filtered.push(focusableEls[i]); filtered.push(focusableEls[i]);
} }
} }
firstFocusableEl = filtered[0]; firstFocusableEl = filtered[0];
lastFocusableEl = filtered[filtered.length - 1]; lastFocusableEl = filtered[filtered.length - 1];
//loop focus inside tarteaucitron //loop focus inside tarteaucitron
document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) { document.getElementById('tarteaucitron').addEventListener("keydown", function (evt) {
if ( evt.key === 'Tab' || evt.keyCode === 9 ) { if ( evt.key === 'Tab' || evt.keyCode === 9 ) {
if ( evt.shiftKey ) /* shift + tab */ { if ( evt.shiftKey ) /* shift + tab */ {
if (document.activeElement === firstFocusableEl) { if (document.activeElement === firstFocusableEl) {
lastFocusableEl.focus(); lastFocusableEl.focus();
evt.preventDefault(); evt.preventDefault();
} }
} else /* tab */ { } else /* tab */ {
if (document.activeElement === lastFocusableEl) { if (document.activeElement === lastFocusableEl) {
firstFocusableEl.focus(); firstFocusableEl.focus();
evt.preventDefault(); evt.preventDefault();
} }
@ -879,11 +897,9 @@ var tarteaucitron = {
allDivs = main.childNodes; allDivs = main.childNodes;
if (typeof Array.prototype.map === 'function') { if (typeof Array.prototype.map === 'function') {
Array.prototype.map.call(main.children, Object).sort(function (a, b) {
Array.prototype.map.call(main.children, Object).sort(function (a, b) { //var mainChildren = Array.from(main.children);
//var mainChildren = Array.from(main.children); //mainChildren.sort(function (a, b) {
//mainChildren.sort(function (a, b) {
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name > tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return 1; }
if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; } if (tarteaucitron.services[a.id.replace(/Line/g, '')].name < tarteaucitron.services[b.id.replace(/Line/g, '')].name) { return -1; }
return 0; return 0;

View File

@ -2279,7 +2279,7 @@ tarteaucitron.services.matomo = {
"type": "analytic", "type": "analytic",
"name": "Matomo (formerly known as Piwik)", "name": "Matomo (formerly known as Piwik)",
"uri": "https://matomo.org/faq/general/faq_146/", "uri": "https://matomo.org/faq/general/faq_146/",
"needConsent": true, "needConsent": false,
"cookies": ['_pk_ref', '_pk_cvar', '_pk_id', '_pk_ses', '_pk_hsr', 'piwik_ignore', '_pk_uid'], "cookies": ['_pk_ref', '_pk_cvar', '_pk_id', '_pk_ses', '_pk_hsr', 'piwik_ignore', '_pk_uid'],
"js": function () { "js": function () {
"use strict"; "use strict";
@ -2294,6 +2294,19 @@ tarteaucitron.services.matomo = {
window._paq.push(["trackPageView"]); window._paq.push(["trackPageView"]);
window._paq.push(["setIgnoreClasses", ["no-tracking", "colorbox"]]); window._paq.push(["setIgnoreClasses", ["no-tracking", "colorbox"]]);
window._paq.push(["enableLinkTracking"]); window._paq.push(["enableLinkTracking"]);
window._paq.push([function() {
var self = this;
function getOriginalVisitorCookieTimeout() {
var now = new Date(),
nowTs = Math.round(now.getTime() / 1000),
visitorInfo = self.getVisitorInfo();
var createTs = parseInt(visitorInfo[2]);
var cookieTimeout = 33696000; // 13 mois en secondes
var originalTimeout = createTs + cookieTimeout - nowTs;
return originalTimeout;
}
this.setVisitorCookieTimeout( getOriginalVisitorCookieTimeout() );
}]);
tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true); tarteaucitron.addScript(tarteaucitron.user.matomoHost + 'piwik.js', '', '', true, 'defer', true);
} }