From 9e16b593810c85fdc20c4db1e78912f0594a70d3 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Sat, 7 Mar 2015 01:34:41 +0100 Subject: [PATCH] Don't show the hashtag but continu to open the panel if he's present --- css/tarteaucitron.css | 2 +- tarteaucitron.js | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/css/tarteaucitron.css b/css/tarteaucitron.css index cd827d2..b09ba8b 100644 --- a/css/tarteaucitron.css +++ b/css/tarteaucitron.css @@ -330,7 +330,7 @@ right: 0; text-align: center; width: auto; - z-index: 2147483645; + z-index: 2147483646; } #tarteaucitronAlertSmall #tarteaucitronManager { diff --git a/tarteaucitron.js b/tarteaucitron.js index 5caee2e..e9b84e3 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -10,7 +10,7 @@ var scripts = document.getElementsByTagName('script'), tarteaucitronNoAdBlocker = false; var tarteaucitron = { - "version": 155, + "version": 156, "cdn": cdn, "user": {}, "lang": {}, @@ -529,17 +529,16 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); - - // setting hash tag - if (tarteaucitron.hashtag !== '') { - document.location.hash = tarteaucitron.hashtag; - } }, "closePanel": function () { "use strict"; tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); - document.location.hash = ''; + tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); + + if (document.location.hash === tarteaucitron.hashtag) { + document.location.hash = ''; + } }, "openAlert": function () { "use strict"; @@ -563,9 +562,14 @@ var tarteaucitron = { tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'bottom', (parseInt(document.getElementById('tarteaucitronAlertSmall').offsetHeight, 10) + 10) + 'px'); if (div.style.display !== 'block') { + tarteaucitron.cookie.number(); div.style.display = 'block'; + tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); + tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block'); } else { div.style.display = 'none'; + tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); + tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none'); } }, "order": function (id) {