From feb4477e3ef8981878babfb1471eabc41a09f146 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Tue, 5 Nov 2019 17:59:40 +0100 Subject: [PATCH] Fix the background with the middle banner --- tarteaucitron.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 605f12e..2f522a4 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -265,7 +265,7 @@ var tarteaucitron = { // css for new middle bar if (tarteaucitron.orientation === 'middle') { var customThemeMiddle = document.createElement('style'), - cssRuleMiddle = 'div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 50px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 50px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 50px 0;display: block;text-align: center;font-size: 21px;}'; + cssRuleMiddle = 'div#tarteaucitronRoot.tarteaucitronBeforeVisible:before {content: \'\';position: fixed;width: 100%;height: 100%;background: white;top: 0;left: 0;z-index: 999;opacity: 0.5;}div#tarteaucitronAlertBig:before {content: \'' + tarteaucitron.lang.middleBarHead + '\';font-size: 50px;}body #tarteaucitronRoot div#tarteaucitronAlertBig {width: 60%;min-width: 285px;height: auto;margin: auto;left: 50%;top: 50%;transform: translate(-50%, -50%);box-shadow: 0 0 9000px #000;border-radius: 20px;padding: 50px 0;}span#tarteaucitronDisclaimerAlert {padding: 0 30px;}#tarteaucitronRoot span#tarteaucitronDisclaimerAlert {margin: 50px 0;display: block;text-align: center;font-size: 21px;}'; customThemeMiddle.type = 'text/css'; if (customThemeMiddle.styleSheet) { @@ -926,7 +926,8 @@ var tarteaucitron = { tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'block'); - + tarteaucitron.userInterface.addClass(c + 'Root', 'tarteaucitronBeforeVisible'); + //ie compatibility var tacOpenAlertEvent; if(typeof(Event) === 'function') { @@ -945,6 +946,7 @@ var tarteaucitron = { tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none'); + tarteaucitron.userInterface.removeClass(c + 'Root', 'tarteaucitronBeforeVisible'); tarteaucitron.userInterface.jsSizing('box'); //ie compatibility @@ -1600,4 +1602,4 @@ var tarteaucitron = { "getElemHeight": function(elem) { return elem.getAttribute('height') || elem.clientHeight; } -}; \ No newline at end of file +};