Fix custom icon not being set if there's no custom color.

This commit is contained in:
Hadi Nategh 2020-03-26 13:01:59 +01:00
parent 726755619e
commit 3f4adaa33f
3 changed files with 37 additions and 9 deletions

View File

@ -83,8 +83,6 @@ div#filemanager-index_buttons div.et2_file {
div#popupMainDiv:before {
content: ' ';
width: 100%;
background-image: url(../../../api/templates/default/images/logo64x64.png);
background-repeat: no-repeat;
background-position: 15px;
background-size: 40px;
height: 45px;
@ -95,6 +93,19 @@ div#popupMainDiv:before {
left: 0;
border-bottom: 1px solid silver;
}
div#popupMainDiv:after {
content: ' ';
width: 180px;
height: 45px;
display: block;
background-size: contain;
background-image: url(../../../api/templates/default/images/logo.svg);
position: absolute;
top: 0;
left: 0;
background-repeat: no-repeat;
background-position: center;
}
form#filemanager-index {
margin-left: 200px !important;
margin-right: 200px !important;

View File

@ -19,8 +19,6 @@ div#popupMainDiv {
&:before {
content: ' ';
width: 100%;
background-image: url(../../../api/templates/default/images/logo64x64.png);
background-repeat: no-repeat;
background-position: 15px;
background-size: 40px;
height: 45px;
@ -31,6 +29,19 @@ div#popupMainDiv {
left: 0;
border-bottom: 1px solid silver;
}
&:after {
content: ' ';
width:180px;
height: 45px;
display: block;
background-size: contain;
background-image: url(../../../api/templates/default/images/logo.svg);
position: absolute;
top: 0;
left: 0;
background-repeat: no-repeat;
background-position: center;
}
}
form#filemanager-index {
&:after {

View File

@ -128,15 +128,22 @@ class pixelegg_framework extends Api\Framework\Ajax
{
$loginbox_color = $color_darker;
}
//alway set header logo used in sharing regardless of custom color being set
$header = $GLOBALS['egw_info']['server']['login_logo_header'] ? Api\Framework::get_login_logo_or_bg_url('login_logo_header', 'logo')
: Api\Framework::get_login_logo_or_bg_url('login_logo_file', 'logo');
$ret['app_css'] .= "
/*
sharing
*/
div#popupMainDiv:after {
background-image: url($header);
}
";
if (preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i',$color) || preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i',$loginbox_color)) // a little xss check
{
if (!Api\Header\UserAgent::mobile())
{
if ($GLOBALS['egw_info']['server']['login_logo_header'])
{
$header = Api\Framework::get_login_logo_or_bg_url('login_logo_header', 'logo');
}
$ret['app_css'] .= "
/**
* theme changes to color pixelegg for color: $color
@ -146,7 +153,6 @@ sharing
*/
div#popupMainDiv:before {
background-color: $color;
background-image: url($header);
}
/*
-Top window framework header