From 304cb6d04cebb133555c283a55b8d6525b43c76a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Oct 2022 13:58:34 +0200 Subject: [PATCH] CSS preview picto visible even when filename is long --- htdocs/core/class/html.formfile.class.php | 4 +++- htdocs/theme/eldy/global.inc.php | 4 ++++ htdocs/theme/md/style.css.php | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 010e03e6b3b..b862e691509 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -838,6 +838,7 @@ class FormFile // Show file name with link to download $out .= ''; + $out .= ''; $out .= 'trans("File").': '.$file["name"]); $out .= dol_trunc($file["name"], 150); - $out .= ''."\n"; + $out .= ''; + $out .= ''."\n"; $out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param); $out .= ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index fe31593efbf..9c0ac895a55 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -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; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 41950369dc2..346b683f83c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -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;