forked from Wavyzz/dolibarr
Fix picto logout with fontawesome 5
This commit is contained in:
@@ -2976,7 +2976,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'note', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
|
||||
'note', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
|
||||
'jabber','skype','twitter','facebook'
|
||||
)
|
||||
)) {
|
||||
@@ -3055,6 +3055,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$fakey = 'fa-caret-down';
|
||||
$marginleftonlyshort = 1;
|
||||
}
|
||||
elseif ($pictowithoutext == 'sign-out') {
|
||||
$marginleftonlyshort=0;
|
||||
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-sign-out-alt';
|
||||
}
|
||||
elseif ($pictowithoutext == 'unlink') {
|
||||
$fakey = 'fa-chain-broken';
|
||||
$facolor = '#555';
|
||||
@@ -3093,7 +3097,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
|
||||
$fa='fa';
|
||||
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
|
||||
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ' ' . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? 'marginleftonlyshort' : 'marginleftonly') : '');
|
||||
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? ' marginleftonlyshort' : ' marginleftonly') : '');
|
||||
$enabledisablehtml .= ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$enabledisablehtml.= $titlealt;
|
||||
|
||||
@@ -1561,14 +1561,13 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
$logouthtmltext.=$langs->trans("Logout").'<br>';
|
||||
|
||||
$logouttext .='<a accesskey="l" href="'.DOL_URL_ROOT.'/user/logout.php">';
|
||||
//$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
|
||||
$logouttext .='<span class="fa fa-sign-out atoplogin"></span>';
|
||||
$logouttext .=img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin');
|
||||
$logouttext .='</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$logouthtmltext.=$langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]);
|
||||
$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1);
|
||||
$logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin opacitymedium');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1607,7 +1606,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
{
|
||||
$text ='<a href="'.DOL_URL_ROOT.'/modulebuilder/index.php?mainmenu=home&leftmenu=admintools" target="_modulebuilder">';
|
||||
//$text.= img_picto(":".$langs->trans("ModuleBuilder"), 'printer_top.png', 'class="printer"');
|
||||
$text.='<span class="fa fa-bug atoplogin"></span>';
|
||||
$text.='<span class="fa fa-bug atoplogin valignmiddle"></span>';
|
||||
$text.='</a>';
|
||||
$toprightmenu.=@Form::textwithtooltip('', $langs->trans("ModuleBuilder"), 2, 1, $text, 'login_block_elem', 2);
|
||||
}
|
||||
@@ -1626,7 +1625,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
$qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
|
||||
$text ='<a href="'.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
|
||||
//$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"');
|
||||
$text.='<span class="fa fa-print atoplogin"></span>';
|
||||
$text.='<span class="fa fa-print atoplogin valignmiddle"></span>';
|
||||
$text.='</a>';
|
||||
$toprightmenu.=@Form::textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2);
|
||||
}
|
||||
@@ -1664,7 +1663,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
|
||||
else $text.=sprintf($helpbaseurl, $helppage);
|
||||
$text.='">';
|
||||
//$text.=img_picto('', 'helpdoc_top').' ';
|
||||
$text.='<span class="fa fa-question-circle atoplogin"></span>';
|
||||
$text.='<span class="fa fa-question-circle atoplogin valignmiddle"></span>';
|
||||
//$toprightmenu.=$langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help');
|
||||
//if ($mode == 'wiki') $text.=' ('.dol_trunc(strtr($helppage,'_',' '),8).')';
|
||||
$text.='</a>';
|
||||
|
||||
Reference in New Issue
Block a user