diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-09-04 10:34:58 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-09-04 10:34:58 +0200 |
commit | 06073ef2169631ea9c348cd19bd154957d7def07 (patch) | |
tree | 40cae26b48cc8c8d1ef3527700e5b017e38093b0 /program/steps/mail/func.inc | |
parent | 26fc0defe374734db81baa8177466639ed65c900 (diff) | |
parent | 406becc5fedd57201f6e39f997415cbd586916e7 (diff) |
Merge branch 'message_show_ui'
Conflicts:
CHANGELOG
Diffstat (limited to 'program/steps/mail/func.inc')
-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 45582d40d..8bf80a6ee 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1055,12 +1055,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; } |