diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-04 09:51:39 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-04 09:51:39 +0000 |
| commit | 746d335f89336cdfa8b4e54d48f7627945ce0403 (patch) | |
| tree | be611c885b796dcd2dea8a562746e3c15b3f1bae /roundcubemail/program/steps/mail | |
| parent | a6451924db3aa84fd59b7a4856dba3fa5118b933 (diff) | |
Distinguish html and plaintext parts in messagy body display
git-svn-id: https://svn.roundcube.net/trunk@1471 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 85b04319f..ac4eb6b01 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -680,7 +680,10 @@ function rcmail_message_headers($attrib, $headers=NULL) /** + * Handler for the 'messagebody' GUI object * + * @param array Named parameters + * @return string HTML content showing the message body */ function rcmail_message_body($attrib) { @@ -693,8 +696,7 @@ function rcmail_message_body($attrib) $attrib['id'] = 'rcmailMsgBody'; $safe_mode = $MESSAGE->is_safe || intval($_GET['_safe']); - $attrib_str = create_attrib_string($attrib, array('style', 'class', 'id')); - $out = '<div '. $attrib_str . ">\n"; + $out = ''; $header_attrib = array(); foreach ($attrib as $attr => $value) @@ -717,14 +719,11 @@ function rcmail_message_body($attrib) $part->body = $MESSAGE->get_part_content($part->mime_id); $body = rcmail_print_body($part, $safe_mode, !$CONFIG['prefer_html']); - $out .= '<div class="message-part">'; if ($part->ctype_secondary != 'plain') - $out .= rcmail_html4inline($body, $attrib['id']); + $out .= html::div('message-htmlpart', rcmail_html4inline($body, $attrib['id'])); else - $out .= $body; - - $out .= "</div>\n"; + $out .= html::div('message-part', $body); } } } @@ -754,8 +753,7 @@ function rcmail_message_body($attrib) if ($REMOTE_OBJECTS && !$safe_mode) $OUTPUT->set_env('blockedobjects', true); - $out .= "\n</div>"; - return $out; + return html::div($attrib, $out); } |
