From bfa7f22209ecc36cb4c12bd2b0ab20b742645974 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 22 May 2019 11:53:36 +0200 Subject: [PATCH] FIX missing "dropdown-icon" replacement --- htdocs/main.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 5456e2ce1eb..4e1a6ecf01d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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.= '
'; // login infos - if (!empty($user->admin)) { + if (! empty($user->admin)) { $dropdownBody.= '
' . $langs->trans("Administrator").': '.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 = ' '.$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 } });