forked from Wavyzz/dolibarr
Use font awesome for sort image
This commit is contained in:
@@ -3153,11 +3153,11 @@ 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', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'switch_off', 'switch_on', 'unlink', 'uparrow')
|
||||
'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow')
|
||||
)) {
|
||||
$fakey = $pictowithoutext;
|
||||
$facolor = '';
|
||||
$fasize = '';
|
||||
$facolor = ''; $fasize = '';
|
||||
$marginleftonlyshort = 0;
|
||||
if ($pictowithoutext == 'switch_off') {
|
||||
$fakey = 'fa-toggle-off';
|
||||
$facolor = '#999';
|
||||
@@ -3210,6 +3210,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$fakey = 'fa-mail-forward';
|
||||
$facolor = '#555';
|
||||
}
|
||||
elseif ($pictowithoutext == '1uparrow') {
|
||||
$fakey = 'fa-caret-up';
|
||||
$marginleftonlyshort = 1;
|
||||
}
|
||||
elseif ($pictowithoutext == '1downarrow') {
|
||||
$fakey = 'fa-caret-down';
|
||||
$marginleftonlyshort = 1;
|
||||
}
|
||||
elseif ($pictowithoutext == 'unlink') {
|
||||
$fakey = 'fa-chain-broken';
|
||||
$facolor = '#555';
|
||||
@@ -3226,7 +3234,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) {
|
||||
$morecss.= ($morecss?' ':'').$reg[1];
|
||||
}
|
||||
$enabledisablehtml = '<span class="fa '.$fakey.' marginleftonly valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'>';
|
||||
$enabledisablehtml = '<span class="fa '.$fakey.' '.($marginleftonlyshort?'marginleftonlyshort':'marginleftonly').' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'"'.($moreatt?' '.$moreatt:'').'>';
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$enabledisablehtml.= $titlealt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user