Fix the notes must not be into the tooltip of ref.

This commit is contained in:
Laurent Destailleur 2016-11-23 20:30:43 +01:00
parent 2b944728fd
commit 60b1591f0e
3 changed files with 22 additions and 11 deletions

View File

@ -999,11 +999,12 @@ class Facture extends CommonInvoice
* @param int $short 1=Return just URL
* @param string $moretitle Add more text to title tooltip
* @param int $notooltip 1=Disable tooltip
* @param int $addlinktonote 1=Add link to notes
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip=0)
function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip=0,$addlinktonotes=0)
{
global $langs, $conf, $user;
global $langs, $conf, $user, $form;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
@ -1058,6 +1059,21 @@ class Facture extends CommonInvoice
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$linkstart.($max?dol_trunc($this->ref,$max):$this->ref).$linkend;
if ($addlinktonotes)
{
$txttoshow=($user->societe_id>0?$this->note_public:$this->note_private);
if ($txttoshow)
{
$notetoshow=$langs->trans("ViewPrivateNote").':<br>'.dol_string_nohtmltag($txttoshow,1);
$result.=' <span class="note inline-block">';
$result.='<a href="'.DOL_URL_ROOT.'/compta/facture/note.php?id='.$this->id.'" class="classfortooltip" title="'.dol_escape_htmltag($notetoshow).'">'.img_picto('','object_generic').'</a>';
//$result.=img_picto($langs->trans("ViewNote"),'object_generic');
//$result.='</a>';
$result.='</span>';
}
}
return $result;
}

View File

@ -866,30 +866,25 @@ if ($resql)
$facturestatic->statut=$obj->fk_statut;
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
$facturestatic->type=$obj->type;
$facturestatic->note_public=$obj->note_public;
$facturestatic->note_private=$obj->note_private;
print '<tr '.$bc[$var].'>';
if (! empty($arrayfields['f.facnumber']['checked']))
{
print '<td class="nowrap">';
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1);
$paiement = $facturestatic->getSommePaiement();
$remaintopay = $obj->total_ttc - $paiement;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding nowrap">';
print $facturestatic->getNomUrl(1,'',200,0,$notetoshow);
print $facturestatic->getNomUrl(1,'',200,0,'',0,1);
print $obj->increment;
print '</td>';
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
if (! empty($obj->note_private))
{
print ' <span class="note">';
print '<a href="'.DOL_URL_ROOT.'/compta/facture/note.php?id='.$obj->facid.'">'.img_picto($langs->trans("ViewPrivateNote"),'object_generic').'</a>';
print '</span>';
}
$filename=dol_sanitizeFileName($obj->facnumber);
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->facid;

View File

@ -802,7 +802,7 @@ class FormFile
$out.= '<!-- html.formfile::getDocumentsLink -->'."\n";
if (! empty($file_list))
{
$out='<dl class="dropdown">
$out='<dl class="dropdown inline-block">
<dt><a data-ajax="false" href="#" onClick="return false;">'.img_picto('', 'listlight').'</a></dt>
<dd><div class="multichoicedoc"><ul class="ulselectedfields" style="display: none;">';
$tmpout='';