2
0
forked from Wavyzz/dolibarr

Fix size of cells make page too large even for large screen

This commit is contained in:
Laurent Destailleur
2016-01-21 14:55:08 +01:00
parent de19e12833
commit 19bcdb6910
3 changed files with 16 additions and 12 deletions

View File

@@ -1118,7 +1118,9 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
if (! is_object($outputlangs)) $outputlangs=$langs;
if (! $format) $format='daytextshort';
$reduceformat=(! empty($conf->dol_optimize_smallscreen) && in_array($format,array('day','dayhour')))?1:0;
$formatwithoutreduce = preg_replace('/reduceformat/','',$format);
if ($formatwithoutreduce != $format) { $format = $formatwithoutreduce; $reduceformat=1; } // so format 'dayreduceformat' is processed like day
// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short);