Truncate label different for small or big screen
This commit is contained in:
parent
0ea7d51b22
commit
34b42ba798
@ -1720,11 +1720,13 @@ class Form
|
||||
else if ($objp->stock <= 0) $opt.= ' class="product_line_stock_too_low"';
|
||||
}
|
||||
$opt.= '>';
|
||||
$opt.= $objp->ref.' - '.dol_trunc($label,32).' - ';
|
||||
// Truncate label for small or big screen
|
||||
$trunclabel = (($conf->dol_optimize_smallscreen==1)?32:92);
|
||||
$opt.= $objp->ref.' - '.dol_trunc($label, $trunclabel).' - ';
|
||||
|
||||
$objRef = $objp->ref;
|
||||
if (! empty($filterkey) && $filterkey != '') $objRef=preg_replace('/('.preg_quote($filterkey).')/i','<strong>$1</strong>',$objRef,1);
|
||||
$outval.=$objRef.' - '.dol_trunc($label,32).' - ';
|
||||
$outval.=$objRef.' - '.dol_trunc($label, $trunclabel).' - ';
|
||||
|
||||
$found=0;
|
||||
|
||||
@ -2004,8 +2006,10 @@ class Form
|
||||
$outval.=$objRef;
|
||||
if (! empty($objp->idprodfournprice)) $outval.=' ('.$objRefFourn.')';
|
||||
$outval.=' - ';
|
||||
$opt.=dol_trunc($objp->label,18).' - ';
|
||||
$outval.=dol_trunc($label,18).' - ';
|
||||
// Truncate label for small or big screen
|
||||
$trunclabel = (($conf->dol_optimize_smallscreen==1)?18:78);
|
||||
$opt.=dol_trunc($label,$trunclabel).' - ';
|
||||
$outval.=dol_trunc($label,$trunclabel).' - ';
|
||||
|
||||
if (! empty($objp->idprodfournprice))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user