From af276f21e5364eb65a56b64c3455bc284ff1e2f2 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 4 Sep 2012 09:32:24 +0200 Subject: Add full headers view in message preview window (#1488538) Fix message display page issues - unified with message preview (#1488590, #1488642) --- program/steps/mail/func.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'program/steps/mail') 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; } -- cgit v1.2.3