More font awesome picto instead of img

This commit is contained in:
Laurent Destailleur
2018-04-16 19:56:53 +02:00
parent 106fb87d0a
commit 1e0a660d24
5 changed files with 33 additions and 18 deletions

View File

@@ -3089,7 +3089,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array('bank', 'delete', 'edit', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'switch_off', 'switch_on', 'unlink', 'uparrow'))) {
if (empty($srconly) && in_array($pictowithoutext, array(
'bank', 'close_title', 'delete', 'edit', 'filter', 'grip_title', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'switch_off', 'switch_on', 'unlink', 'uparrow')
)) {
$fakey = $pictowithoutext;
$facolor = '';
$fasize = '';
@@ -3115,6 +3118,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-bank';
$facolor = '#444';
}
elseif ($pictowithoutext == 'close_title') {
$fakey = 'fa-window-close';
}
elseif ($pictowithoutext == 'delete') {
$fakey = 'fa-trash';
$facolor = '#444';
@@ -3123,6 +3129,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-pencil';
$facolor = '#444';
}
elseif ($pictowithoutext == 'filter') {
$fakey = 'fa-'.$pictowithoutext;
}
elseif ($pictowithoutext == 'grip_title') {
$fakey = 'fa-arrows';
}
elseif ($pictowithoutext == 'printer') {
$fakey = 'fa-print';
$fasize = '1.2em';