From 7f1218caeacb5c3085047e61b9e3cf8e82198045 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 15 Sep 2013 07:47:01 -0400 Subject: [PATCH] Display full attachment name using title attribute when name is too long to display (#1489320) --- program/steps/mail/show.inc | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index dbb6d21..c1726bb 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -157,9 +157,9 @@ $ol .= html::tag('li', null, Q(sprintf("%s (%s)", $filename, $size))); } else { - if (mb_strlen($filename) > 50) { + if ($attrib['maxlength'] && mb_strlen($filename) > $attrib['maxlength']) { $title = $filename; - $filename = abbreviate_string($filename, 50); + $filename = abbreviate_string($filename, $attrib['maxlength']); } else { $title = ''; @@ -173,6 +173,7 @@ JS_OBJECT_NAME, $attach_prop->mime_id, rcmail_fix_mimetype($attach_prop->mimetype)), + 'onmouseover' => $title ? '' : 'rcube_webmail.long_subject_title_ex(this, 0)', 'title' => Q($title), ), Q($filename))); -- Gitblit v1.9.1