]> _ Git - cubeextranet.git/commitdiff
Fix problem with background image displaying on splash loading screen even when ...
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Aug 2021 14:51:09 +0000 (14:51 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Aug 2021 14:51:09 +0000 (14:51 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 8382f638f36d85dfc69ce10ffaa6ed4fbb089632..fa261c943e784368f956d623dad5b65d48845638 100644 (file)
@@ -2631,16 +2631,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
     protected function _cssBackground()
     {
-        $body = '';
-
-        if ($this->_themeBoolean($this->theme->parametres->displayBackgroundDuringLoading)) {
-            $body .= '#background,#splash{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->backgroundColor) . ' !important;}';
-        } else {
-            $body .= '#background{transition:500ms opacity;visibility:hidden;opacity:0;background-color:' . wsHTML5::colorToCSS($this->theme->parametres->backgroundColor) . ' !important;}';
-            $body .= '#splash{background-color:' . wsHTML5::colorToCSS($this->theme->parametres->loadingBackColor) . ' !important;}';
-        }
-
-        $body .= '#background,#splash{';
+        $body = '#background, #splash {';
 
         switch ($this->theme->parametres->repeat) {
             case wsTheme::REPEAT:
@@ -2658,6 +2649,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
                 $body .= 'background-size:100% 100%;';
                 break;
         }
+
         if ($bi = $this->checkThemeImage($this->theme->parametres->backgroundImage)) {
 
             $dbi = CubeIT_Image::getimagesize($bi);
@@ -2679,7 +2671,9 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
                     $body .= 'bottom';
                     break;
             }
+
             $body .= ' ';
+
             switch ($this->theme->parametres->backgroundHAlign) {
                 case wsTheme::LEFT:
                     $body .= 'left';
@@ -2696,6 +2690,25 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
 
         $body .= '}';
 
+
+        if ($this->_themeBoolean($this->theme->parametres->displayBackgroundDuringLoading)) {
+            $body .= '#background, #splash {
+                        background-color:' . wsHTML5::colorToCSS($this->theme->parametres->backgroundColor) . ' !important;
+                    }';
+        } else {
+            $body .= '#background {
+                        transition: 500ms opacity;
+                        visibility: hidden;
+                        opacity: 0;
+                        background-color:' . wsHTML5::colorToCSS($this->theme->parametres->backgroundColor) . ' !important;
+                    }';
+
+            $body .= '#splash {
+                        background-color:' . wsHTML5::colorToCSS($this->theme->parametres->loadingBackColor) . ' !important;
+                        background-image: none;
+                    }';
+        }
+
         return $body;
     }