FIX missing "dropdown-icon" replacement

This commit is contained in:
Regis Houssin 2019-05-22 11:53:36 +02:00 committed by Laurent Destailleur
parent 512b832c77
commit bfa7f22209

View File

@ -1741,7 +1741,7 @@ function top_menu_user(User $user, Translate $langs)
$userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1);
$userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1);
}
else{
else {
$nophoto='/public/theme/common/user_anonymous.png';
if ($user->gender == 'man') $nophoto='/public/theme/common/user_man.png';
if ($user->gender == 'woman') $nophoto='/public/theme/common/user_woman.png';
@ -1755,7 +1755,7 @@ function top_menu_user(User $user, Translate $langs)
$dropdownBody.= '<div id="topmenuloginmoreinfo" >';
// login infos
if (!empty($user->admin)) {
if (! empty($user->admin)) {
$dropdownBody.= '<br><b>' . $langs->trans("Administrator").'</b>: '.yn($user->admin);
}
if (! empty($user->socid)) // Add thirdparty for external users
@ -1808,7 +1808,7 @@ function top_menu_user(User $user, Translate $langs)
$profilName = $user->getFullName($langs).' ('.$user->login.')';
if($user->admin){
if (! empty($user->admin)) {
$profilName = '<i class="far fa-star classfortooltip" title="'.$langs->trans("Administrator").'" ></i> '.$profilName;
}
@ -1868,6 +1868,8 @@ function top_menu_user(User $user, Translate $langs)
if (!$(event.target).closest("#topmenu-login-dropdown").length) {
// Hide the menus.
$("#topmenu-login-dropdown").removeClass("open");
$("#dropdown-icon-down").show(); // use show/hide instead toggle for avoid conflict
$("#dropdown-icon-up").hide(); // use show/hide instead toggle for avoid conflict
}
});