Skip to content

Commit

Permalink
Tabs collector better identification
Browse files Browse the repository at this point in the history
Tabs collector goes wrong with 2 tabs in the same page (like projet and task), so we use picto name to identify the 2 tabscollect
We need to substract the @ if the tabs is from a module... eg : factory@factory
  • Loading branch information
defrance committed May 25, 2015
1 parent 5ddcfce commit a30d4d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -789,14 +789,15 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p

if ($displaytab > $limittoshow)
{
$out.='<div id="moretabs" class="inline-block tabsElem">';
$tabsname=str_replace ("@", "", $picto);
$out.='<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
$out.='<a href="" data-role="button" style="background-color: #f0f0f0;" class="tab inline-block">'.$langs->trans("More").'...</a>';
$out.='<div id="moretabsList" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
$out.='<div id="moretabsList'.$tabsname.'" style="position: absolute; left: -999em;text-align: left;margin:0px;padding:2px">'.$outmore.'</div>';
$out.="</div>\n";

$out.="<script>";
$out.="$('#moretabs').mouseenter( function() { $('#moretabsList').css('left','auto');});";
$out.="$('#moretabs').mouseleave( function() { $('#moretabsList').css('left','-999em');});";
$out.="$('#moretabs".$tabsname.").mouseenter( function() { $('#moretabsList".$tabsname.").css('left','auto');});";
$out.="$('#moretabs".$tabsname.").mouseleave( function() { $('#moretabsList".$tabsname.").css('left','-999em');});";
$out.="</script>";
}

Expand Down

0 comments on commit a30d4d4

Please sign in to comment.