From 7f1218caeacb5c3085047e61b9e3cf8e82198045 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 15 Sep 2013 13:43:13 +0200 Subject: Display full attachment name using title attribute when name is too long to display (#1489320) Conflicts: CHANGELOG program/steps/mail/show.inc --- program/steps/mail/show.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/steps/mail/show.inc') diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index dbb6d217f..c1726bbdf 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -157,9 +157,9 @@ function rcmail_message_attachments($attrib) $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 @@ function rcmail_message_attachments($attrib) 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))); -- cgit v1.2.3