Better autosize of extrafields

This commit is contained in:
Laurent Destailleur 2017-09-11 00:19:42 +02:00
parent c315ad7801
commit d13c4b7b84

View File

@ -770,24 +770,24 @@ class ExtraFields
if (empty($showsize))
{
if ($type == 'date')
if ($type == 'date')
{
//$showsize=10;
$showsize = 'minwidth100imp';
}
elseif ($type == 'datetime')
elseif ($type == 'datetime')
{
//$showsize=19;
$showsize = 'minwidth200imp';
}
elseif (in_array($type,array('int','double')))
elseif (in_array($type,array('int','double','price')))
{
//$showsize=10;
$showsize = 'minwidth100imp';
$showsize = 'maxwidth75';
}
elseif ($type == 'url')
{
$showsize='minwidth400imp';
$showsize='minwidth400';
}
elseif ($type == 'boolean')
{
@ -797,16 +797,16 @@ class ExtraFields
{
if (round($size) < 12)
{
$showsize = 'minwidth100imp';
$showsize = 'minwidth100';
}
else if (round($size) <= 48)
{
$showsize = 'minwidth200imp';
$showsize = 'minwidth200';
}
else
{
//$showsize=48;
$showsize = 'minwidth400imp';
$showsize = 'minwidth400';
}
}
}