diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-09-15 13:43:13 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-09-15 13:47:01 +0200 |
commit | 7f1218caeacb5c3085047e61b9e3cf8e82198045 (patch) | |
tree | a2ad7354d2b1b0ef79a71584f1693ede13f80615 /program/steps/mail/show.inc | |
parent | 256d5b7216711e8c183222be1a0dc3850b623944 (diff) |
Display full attachment name using title attribute when name is too long to display (#1489320)
Conflicts:
CHANGELOG
program/steps/mail/show.inc
Diffstat (limited to 'program/steps/mail/show.inc')
-rw-r--r-- | 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 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))); |