forked from Wavyzz/dolibarr
bad limittoshow usage
the value selected in MAIN_MAXTABS_IN_CARD is not well used (particulary when the active tab is present on tabcollector
This commit is contained in:
@@ -738,6 +738,15 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
|
|||||||
$displaytab=0;
|
$displaytab=0;
|
||||||
$nbintab=0;
|
$nbintab=0;
|
||||||
$popuptab=0;
|
$popuptab=0;
|
||||||
|
for ($i = 0 ; $i <= $maxkey ; $i++)
|
||||||
|
{
|
||||||
|
if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2]))
|
||||||
|
{
|
||||||
|
// si l'active est présent dans la box
|
||||||
|
if ($i >= $limittoshow)
|
||||||
|
$limittoshow--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for ($i = 0 ; $i <= $maxkey ; $i++)
|
for ($i = 0 ; $i <= $maxkey ; $i++)
|
||||||
{
|
{
|
||||||
@@ -745,13 +754,11 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
|
|||||||
{
|
{
|
||||||
$isactive=true;
|
$isactive=true;
|
||||||
$bactive=true;
|
$bactive=true;
|
||||||
if ($i <=$limittoshow)
|
|
||||||
$limittoshow++;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$isactive=false;
|
$isactive=false;
|
||||||
|
|
||||||
if ($i <= $limittoshow || $isactive)
|
if ($i < $limittoshow || $isactive)
|
||||||
{
|
{
|
||||||
$out.='<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((! $isactive && ! empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT))?' hideonprint':'').'"><!-- id tab = '.(empty($links[$i][2])?'':$links[$i][2]).' -->';
|
$out.='<div class="inline-block tabsElem'.($isactive ? ' tabsElemActive' : '').((! $isactive && ! empty($conf->global->MAIN_HIDE_INACTIVETAB_ON_PRINT))?' hideonprint':'').'"><!-- id tab = '.(empty($links[$i][2])?'':$links[$i][2]).' -->';
|
||||||
if (isset($links[$i][2]) && $links[$i][2] == 'image')
|
if (isset($links[$i][2]) && $links[$i][2] == 'image')
|
||||||
|
|||||||
Reference in New Issue
Block a user