Display attachment size in compose (#1484774)

pull/299/merge
Aleksander Machniak 9 years ago
parent d560916065
commit bb1ed2740d

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Display attachment size in compose (#1484774)
- Added possibility to drag-n-drop attachments from mail preview to compose window - Added possibility to drag-n-drop attachments from mail preview to compose window
- Implemented mail messages searching with predefined date interval - Implemented mail messages searching with predefined date interval
- PGP encryption support via Mailvelope integration - PGP encryption support via Mailvelope integration

@ -203,7 +203,8 @@ function rcmail_attachment_success($attachment, $uploadid)
'aria-label' => $RCMAIL->gettext('delete') . ' ' . $attachment['name'], 'aria-label' => $RCMAIL->gettext('delete') . ' ' . $attachment['name'],
), $button); ), $button);
$content .= rcube::Q($attachment['name']); $content .= sprintf('%s <span class="attachment-size">(%s)</span>',
rcube::Q($attachment['name']), $RCMAIL->show_bytes($attachment['size']));
$RCMAIL->output->command('add2attachment_list', "rcmfile$id", array( $RCMAIL->output->command('add2attachment_list', "rcmfile$id", array(
'html' => $content, 'html' => $content,

@ -385,6 +385,7 @@ function rcmail_process_compose_params(&$COMPOSE)
'group' => $COMPOSE_ID, 'group' => $COMPOSE_ID,
'name' => $filename, 'name' => $filename,
'mimetype' => rcube_mime::file_content_type($attach, $filename), 'mimetype' => rcube_mime::file_content_type($attach, $filename),
'size' => filesize($attach),
'path' => $attach, 'path' => $attach,
); );
} }
@ -1557,6 +1558,9 @@ function rcmail_compose_attachment_list($attrib)
continue; continue;
} }
$content = sprintf('%s <span class="attachment-size">(%s)</span>',
rcube::Q($a_prop['name']), $RCMAIL->show_bytes($a_prop['size']));
$out .= html::tag('li', array( $out .= html::tag('li', array(
'id' => 'rcmfile'.$id, 'id' => 'rcmfile'.$id,
'class' => rcube_utils::file2class($a_prop['mimetype'], $a_prop['name']), 'class' => rcube_utils::file2class($a_prop['mimetype'], $a_prop['name']),
@ -1571,7 +1575,7 @@ function rcmail_compose_attachment_list($attrib)
'aria-label' => $RCMAIL->gettext('delete') . ' ' . $a_prop['name'], 'aria-label' => $RCMAIL->gettext('delete') . ' ' . $a_prop['name'],
), ),
$button $button
) . rcube::Q($a_prop['name']) ) . $content
); );
$jslist['rcmfile'.$id] = array( $jslist['rcmfile'.$id] = array(

@ -1366,6 +1366,10 @@ div.message-partheaders .headers-table td.header {
-webkit-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9); -webkit-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9);
} }
#compose-attachments .attachment-size {
color: #888;
}
#composeview-bottom .formbuttons.floating { #composeview-bottom .formbuttons.floating {
position: absolute; position: absolute;
width: auto; width: auto;

Loading…
Cancel
Save