Fix the background with the middle banner

This commit is contained in:
Amauri CHAMPEAUX 2019-11-05 17:59:40 +01:00
parent 8d86ad84e4
commit feb4477e3e
1 changed files with 5 additions and 3 deletions

View File

@ -265,7 +265,7 @@ var tarteaucitron = {
// css for new middle bar // css for new middle bar
if (tarteaucitron.orientation === 'middle') { if (tarteaucitron.orientation === 'middle') {
var customThemeMiddle = document.createElement('style'), 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'; customThemeMiddle.type = 'text/css';
if (customThemeMiddle.styleSheet) { if (customThemeMiddle.styleSheet) {
@ -926,7 +926,8 @@ var tarteaucitron = {
tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block'); tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'block');
tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'block');
tarteaucitron.userInterface.addClass(c + 'Root', 'tarteaucitronBeforeVisible');
//ie compatibility //ie compatibility
var tacOpenAlertEvent; var tacOpenAlertEvent;
if(typeof(Event) === 'function') { if(typeof(Event) === 'function') {
@ -945,6 +946,7 @@ var tarteaucitron = {
tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none'); tarteaucitron.userInterface.css(c + 'Percentage', 'display', 'none');
tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block'); tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none'); tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none');
tarteaucitron.userInterface.removeClass(c + 'Root', 'tarteaucitronBeforeVisible');
tarteaucitron.userInterface.jsSizing('box'); tarteaucitron.userInterface.jsSizing('box');
//ie compatibility //ie compatibility
@ -1600,4 +1602,4 @@ var tarteaucitron = {
"getElemHeight": function(elem) { "getElemHeight": function(elem) {
return elem.getAttribute('height') || elem.clientHeight; return elem.getAttribute('height') || elem.clientHeight;
} }
}; };