Better autosize of extrafields

This commit is contained in:
Laurent Destailleur 2017-09-11 00:19:42 +02:00
parent cb0c7d6594
commit 25ec124411

View File

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