From 2e377112b52ec1961298c30820809c46f21e6b23 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Feb 2020 19:24:38 +0100 Subject: [PATCH] Enhanc top bar of TakePOS (more similar than backoffice) --- htdocs/main.inc.php | 22 +++++++----- htdocs/takepos/css/pos.css.php | 58 ++++++++++++++++++++++++++---- htdocs/takepos/takepos.php | 15 +++++--- htdocs/theme/eldy/dropdown.inc.php | 11 +++--- 4 files changed, 84 insertions(+), 22 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8c1cdd829de..8765b73a53a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1757,9 +1757,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead /** * Build the tooltip on user login * - * @return string HTML content + * @param int $hideloginname Hide login name. Show only the image. + * @param string $urllogout URL for logout + * @return string HTML content */ -function top_menu_user() +function top_menu_user($hideloginname = 0, $urllogout = '') { global $langs, $conf, $db, $hookmanager, $user; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1830,9 +1832,10 @@ function top_menu_user() } } - - - $logoutLink = ' '.$langs->trans("Logout").''; + if (empty($urllogout)) { + $urllogout = DOL_URL_ROOT.'/user/logout.php'; + } + $logoutLink = ' '.$langs->trans("Logout").''; $profilLink = ' '.$langs->trans("Card").''; @@ -1857,9 +1860,12 @@ function top_menu_user() $btnUser = ' diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 69716ce5be3..d451308884f 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -122,7 +122,7 @@ button.dropdown-item.global-search-item { .tmenu .open.dropdown, .tmenu .open.dropdown { background: rgba(0, 0, 0, 0.1); } -.tmenu .dropdown-menu, .login_block .dropdown-menu { +.tmenu .dropdown-menu, .login_block .dropdown-menu, .topnav .dropdown-menu { position: absolute; right: 2px; : auto; @@ -135,20 +135,23 @@ button.dropdown-item.global-search-item { .user-body { color: #333; } -.side-nav-vert .user-menu .dropdown-menu { +.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu { border-top-right-radius: 0; border-top-left-radius: 0; padding: 1px 0 0 0; border-top-width: 0; width: 300px; } -.side-nav-vert .user-menu .dropdown-menu { +.topnav .user-menu .dropdown-menu { + top: 50px; +} +.side-nav-vert .user-menu .dropdown-menu, .topnav .user-menu .dropdown-menu { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; } -.side-nav-vert .user-menu .dropdown-menu > .user-header { +.side-nav-vert .user-menu .dropdown-menu > .user-header, .topnav .user-menu .dropdown-menu > .user-header { min-height: 100px; padding: 10px; text-align: center;