Explorar el Código

Remove the Wrapper, it break a lot of custom css

Amauri CHAMPEAUX hace 5 años
padre
commit
da584fe5b6
Se han modificado 1 ficheros con 8 adiciones y 22 borrados
  1. 8 22
      tarteaucitron.js

+ 8 - 22
tarteaucitron.js

@@ -335,11 +335,11 @@ var tarteaucitron = {
 
 
                 if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
                 if (tarteaucitron.parameters.highPrivacy && !tarteaucitron.parameters.AcceptAllCta) {
                     html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
                     html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
-                    html += '<div class="tarteaucitronAlertBigWrapper">';
+                    //html += '<div class="tarteaucitronAlertBigWrapper">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
                     html += '       ' + tarteaucitron.lang.alertBigPrivacy;
                     html += '       ' + tarteaucitron.lang.alertBigPrivacy;
                     html += '   </span>';
                     html += '   </span>';
-                    html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
+                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
                     html += '   <button type="button" id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.openPanel();">';
                     html += '   <button type="button" id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.openPanel();">';
                     html += '       ' + tarteaucitron.lang.personalize;
                     html += '       ' + tarteaucitron.lang.personalize;
                     html += '   </button>';
                     html += '   </button>';
@@ -350,12 +350,12 @@ var tarteaucitron = {
                         html += '   </button>';
                         html += '   </button>';
                     }
                     }
                     
                     
-                    html += '   </span>';
-                    html += '</div>';
+                    //html += '   </span>';
+                    //html += '</div>';
                     html += '</div>';
                     html += '</div>';
                 } else {
                 } else {
                     html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
                     html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
-                    html += '<div class="tarteaucitronAlertBigWrapper">';
+                    //html += '<div class="tarteaucitronAlertBigWrapper">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
                     html += '   <span id="tarteaucitronDisclaimerAlert">';
 
 
                     if (tarteaucitron.parameters.highPrivacy) {
                     if (tarteaucitron.parameters.highPrivacy) {
@@ -365,7 +365,7 @@ var tarteaucitron = {
                     }
                     }
 
 
                     html += '   </span>';
                     html += '   </span>';
-                    html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
+                    //html += '   <span class="tarteaucitronAlertBigBtnWrapper">';
                     html += '   <button type="button" id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
                     html += '   <button type="button" id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
                     html += '       &#10003; ' + tarteaucitron.lang.acceptAll;
                     html += '       &#10003; ' + tarteaucitron.lang.acceptAll;
                     html += '   </button>';
                     html += '   </button>';
@@ -379,8 +379,8 @@ var tarteaucitron = {
                         html += '   </button>';
                         html += '   </button>';
                     }
                     }
 
 
-                    html += '   </span>';
-                    html += '</div>';
+                    //html += '   </span>';
+                    //html += '</div>';
                     html += '</div>';
                     html += '</div>';
                     html += '<div id="tarteaucitronPercentage"></div>';
                     html += '<div id="tarteaucitronPercentage"></div>';
                 }
                 }
@@ -498,18 +498,6 @@ var tarteaucitron = {
                             html += '</div>';
                             html += '</div>';
                             html += '<div id="tarteaucitronPremium"></div>';
                             html += '<div id="tarteaucitronPremium"></div>';
 
 
-                            // create wrapper container
-                            /*var wrapper = document.createElement('div');
-                            wrapper.id = "contentWrapper";
-
-                            while (document.body.firstChild)
-                            {
-                                wrapper.appendChild(document.body.firstChild);
-                            }
-
-                            // Append the wrapper to the body
-                            document.body.appendChild(wrapper);*/
-
                             div.id = 'tarteaucitronRoot';
                             div.id = 'tarteaucitronRoot';
                             body.appendChild(div, body);
                             body.appendChild(div, body);
                             div.innerHTML = html;
                             div.innerHTML = html;
@@ -823,7 +811,6 @@ var tarteaucitron = {
             tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
             tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');
 
 
             document.getElementById('tarteaucitronClosePanel').focus();
             document.getElementById('tarteaucitronClosePanel').focus();
-            //document.getElementById('contentWrapper').setAttribute("aria-hidden", "true");
             document.getElementsByTagName('body')[0].classList.add('modal-open');
             document.getElementsByTagName('body')[0].classList.add('modal-open');
             tarteaucitron.userInterface.focusTrap();
             tarteaucitron.userInterface.focusTrap();
             tarteaucitron.userInterface.jsSizing('main');
             tarteaucitron.userInterface.jsSizing('main');
@@ -865,7 +852,6 @@ var tarteaucitron = {
             if (document.getElementById('tarteaucitronCloseAlert') !== null) {
             if (document.getElementById('tarteaucitronCloseAlert') !== null) {
                 document.getElementById('tarteaucitronCloseAlert').focus();
                 document.getElementById('tarteaucitronCloseAlert').focus();
             }
             }
-            //document.getElementById('contentWrapper').setAttribute("aria-hidden", "false");
             document.getElementsByTagName('body')[0].classList.remove('modal-open');
             document.getElementsByTagName('body')[0].classList.remove('modal-open');
             
             
             //ie compatibility
             //ie compatibility