From: stephen@cubedesigners.com Date: Thu, 5 Aug 2021 14:51:09 +0000 (+0000) Subject: Fix problem with background image displaying on splash loading screen even when ... X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8363bb6bdfd9fc686df71a50d509b045c32b63a3;p=cubeextranet.git Fix problem with background image displaying on splash loading screen even when `displayBackgroundDuringLoading` was false. Done #4640 @0.5 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 8382f638f..fa261c943 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -2631,16 +2631,7 @@ height="0" width="0" style="display:none;visibility:hidden"> 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"> $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"> $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"> $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; }