diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-09-04 09:32:24 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-09-04 09:32:24 +0200 |
commit | af276f21e5364eb65a56b64c3455bc284ff1e2f2 (patch) | |
tree | daa76e264e4615b50236cf27def73fbe317930c2 /program/steps | |
parent | 5f8097b9eba09302be561d67ce035275494043e3 (diff) |
Add full headers view in message preview window (#1488538)
Fix message display page issues - unified with message preview (#1488590, #1488642)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/func.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 7f0b4db5b..6f451e14f 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1053,12 +1053,17 @@ function rcmail_message_full_headers($attrib, $headers=NULL) global $OUTPUT; $html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), '')); - $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), ''); + + if (!get_boolean($attrib['no-switch'])) { + $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), ''); + } + + unset($attrib['no-switch']); $OUTPUT->add_gui_object('all_headers_row', 'all-headers'); $OUTPUT->add_gui_object('all_headers_box', 'headers-source'); - return html::div($attrib, $html); + return count($attrib) > 1 ? html::div($attrib, $html) : $html; } |