Change framework user avatar to et2-avatar

This commit is contained in:
Hadi Nategh 2022-09-07 11:53:29 +02:00
parent 2eebd56811
commit e0b98b7c4c
3 changed files with 47 additions and 68 deletions

View File

@ -639,10 +639,10 @@ abstract class Framework extends Framework\Extra
$stats = Hooks::process('framework_avatar_stat');
$stat = array_pop($stats);
return '<span title="'.Accounts::format_username().'" class="avatar"><img src="'.Egw::link('/api/avatar.php', array(
return '<et2-avatar shape="squared" title="'.Accounts::format_username().'" src="'.Egw::link('/api/avatar.php', array(
'account_id' => $GLOBALS['egw_info']['user']['account_id'],
)).'"/>'.(!empty($stat) ?
'<span class="fw_avatar_stat '.$stat['class'].'" title="'.$stat['title'].'">'.$stat['body'].'</span>' : '').'</span>';
)).'"></et2-avatar>'.(empty($stat) ?
'<span class="fw_avatar_stat '.$stat['class'].'" title="'.$stat['title'].'">'.$stat['body'].'</span>' : '');
}
/**

View File

@ -5312,21 +5312,10 @@ span.overlayContainer img.overlay {
#egw_fw_topmenu_info_items .topmenu_info_item:hover {
background-color: rgba(153, 204, 255, 0.4);
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span {
height: 40px;
width: 40px;
display: inline-block;
border: none;
margin-top: 2px;
margin-left: 1px;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span img {
width: 40px;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.fw_avatar_stat {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.fw_avatar_stat {
position: absolute;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.stat1 {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.stat1 {
width: 14px;
height: 14px;
position: absolute;
@ -5343,22 +5332,22 @@ span.overlayContainer img.overlay {
line-height: 14px;
border: 2px solid #fbfbfb;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.online {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.online {
background-color: #2de0a5;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.offline {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.offline {
background-color: #cbced1;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.away {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.away {
background-color: #ffd21f;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.busy {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.busy {
background-color: #f5455c;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.noconnection {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.noconnection {
background-color: #E1E16D;
}
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span span.noconnection:before {
#egw_fw_topmenu_info_items #topmenu_info_user_avatar span.noconnection:before {
content: "!";
}
#egw_fw_topmenu_info_items #topmenu_info_logout {

View File

@ -42,52 +42,42 @@
}
}
#topmenu_info_user_avatar {
span {
height: 40px;
width: 40px;
display: inline-block;
border: none;
margin-top: 2px;
margin-left: 1px;
img {
width: 40px;
}
span.fw_avatar_stat {
position: absolute;
}
span.stat1 {
width: 14px;
height: 14px;
position: absolute;
right: 30px;
bottom: 0px;
border-radius: 50%;
z-index: 100000;
background-size: 14px;
background-repeat: no-repeat;
color: #2d2b2b;
font-weight: bold;
text-align: center;
font-size: 10px;
line-height: 14px;
border: 2px solid #fbfbfb;
}
span.online {
background-color: #2de0a5;
}
span.offline {
background-color: #cbced1;
}
span.away {
background-color: #ffd21f;
}
span.busy {
background-color: #f5455c;
}
span.noconnection {
background-color: #E1E16D;
&:before {content:"!"}
}
span.fw_avatar_stat {
position: absolute;
}
span.stat1 {
width: 14px;
height: 14px;
position: absolute;
right: 30px;
bottom: 0px;
border-radius: 50%;
z-index: 100000;
background-size: 14px;
background-repeat: no-repeat;
color: #2d2b2b;
font-weight: bold;
text-align: center;
font-size: 10px;
line-height: 14px;
border: 2px solid #fbfbfb;
}
span.online {
background-color: #2de0a5;
}
span.offline {
background-color: #cbced1;
}
span.away {
background-color: #ffd21f;
}
span.busy {
background-color: #f5455c;
}
span.noconnection {
background-color: #E1E16D;
&:before {content:"!"}
}
}