CSS preview picto visible even when filename is long

This commit is contained in:
Laurent Destailleur 2022-10-17 13:58:34 +02:00
parent 3b3c55ae4d
commit 304cb6d04c
3 changed files with 14 additions and 1 deletions

View File

@ -838,6 +838,7 @@ class FormFile
// Show file name with link to download
$out .= '<td class="minwidth200 tdoverflowmax300">';
$out .= '<span class="spanoverflow widthcentpercentminusxx">';
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
$mime = dol_mimetype($relativepath, '', 0);
@ -847,7 +848,8 @@ class FormFile
$out .= '>';
$out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
$out .= dol_trunc($file["name"], 150);
$out .= '</a>'."\n";
$out .= '</a>';
$out .= '</span>'."\n";
$out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param);
$out .= '</td>';

View File

@ -1295,6 +1295,10 @@ select.flat.selectlimit {
text-overflow: ellipsis;
white-space: nowrap;
}
.spanoverflow {
overflow-x: clip;
text-overflow: ellipsis;
}
.tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 50px;
overflow: hidden;

View File

@ -1405,12 +1405,19 @@ select.flat.selectlimit {
width: 130px;
}
/* using a tdoverflowxxx make the min-width not working */
.tdnooverflowimp {
text-overflow: none;
}
.tdoverflow {
max-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.spanoverflow {
overflow-x: clip;
text-overflow: ellipsis;
}
.tdoverflowmax50 { /* For tdoverflow, the max-midth become a minimum ! */
max-width: 50px;
overflow: hidden;