2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'upstream/develop' into socialnetworks

This commit is contained in:
Frédéric FRANCE
2019-10-10 23:24:50 +02:00
97 changed files with 434 additions and 325 deletions

View File

@@ -3055,30 +3055,35 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithouttext, array(
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note',
'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'dolly', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note',
'object_list','object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench',
'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g','whatsapp',
'chevron-left','chevron-right','chevron-down','chevron-top',
'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'project', 'hrm', 'members', 'ticket', 'generic',
'error','warning',
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
)
)) {
$fa='fas';
$fakey = $pictowithouttext;
$facolor = ''; $fasize = '';
$arrayconvpictotofa = array(
'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap',
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open',
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'bookmark'=>'star',
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork',
'object_list'=>'list-alt','object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table',
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt'
);
if ($pictowithouttext == 'switch_off') {
if ($pictowithouttext == 'error' || $pictowithouttext == 'warning') {
$facolor = '';
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
$marginleftonlyshort = 0;
$morecss .= ($morecss ? ' ' : '').('picto'.$pictowithouttext);
} elseif ($pictowithouttext == 'switch_off') {
$facolor = '#999';
$fasize = '2em';
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
@@ -3178,12 +3183,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
elseif (! empty($arrayconvpictotofa[$pictowithouttext]))
{
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
$facolor = '#444';
//$facolor = '#444';
$marginleftonlyshort=0;
}
else {
$fakey = 'fa-'.$pictowithouttext;
$facolor = '#444';
//$facolor = '#444';
$marginleftonlyshort=0;
}
//this snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only.
@@ -3200,7 +3205,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$moreatt=trim($moreatt);
$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 : '') . '>';
$enabledisablehtml .= ($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;
}
@@ -3536,7 +3541,7 @@ function img_warning($titlealt = 'default', $moreatt = '', $morecss = 'pictowarn
if ($titlealt == 'default') $titlealt = $langs->trans('Warning');
//return '<div class="imglatecoin">'.img_picto($titlealt, 'warning_white.png', 'class="pictowarning valignmiddle"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): '')).'</div>';
return img_picto($titlealt, 'warning.png', 'class="valignmiddle'.($morecss?' '.$morecss:'').'"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): ''));
return img_picto($titlealt, 'warning.png', 'class="'.$morecss.'"'.($moreatt ? ($moreatt == '1' ? ' style="float: right"' : ' '.$moreatt): ''));
}
/**