Message/rfc822 previewer compatibility with Enigma
| | |
| | | } |
| | | else if (this.env.action == 'get') { |
| | | this.enable_command('download', 'print', true); |
| | | if (this.env.mimetype == 'message/rfc822') { |
| | | if (this.env.is_message) { |
| | | this.enable_command('reply', 'reply-all', 'forward', 'forward-inline', 'forward-attachment', true); |
| | | if (this.env.list_post) |
| | | this.enable_command('reply-list', true); |
| | |
| | | this.open_window(this.env.comm_path + url, true, true); |
| | | } |
| | | } |
| | | else if (this.env.action == 'get' && this.env.mimetype != 'message/rfc822') { |
| | | else if (this.env.action == 'get' && !this.env.is_message) { |
| | | this.gui_objects.messagepartframe.contentWindow.print(); |
| | | } |
| | | else if (uid = this.get_single_uid()) { |
| | |
| | | )); |
| | | |
| | | $mimetype = $part ? rcmail_fix_mimetype($part->mimetype) : ''; |
| | | if ($part_id && $mimetype == 'message/rfc822') { |
| | | |
| | | // message/rfc822 preview (Note: handle also multipart/ parts, they can |
| | | // come from Enigma, which replaces message/rfc822 with real mimetype) |
| | | if ($part_id && ($mimetype == 'message/rfc822' || strpos($mimetype, 'multipart/') === 0)) { |
| | | $uid = preg_replace('/\.[0-9.]+/', '', $uid); |
| | | $uid .= '.' . $part_id; |
| | | |
| | | $OUTPUT->set_env('is_message', true); |
| | | } |
| | | |
| | | $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); |
| | |
| | | { |
| | | global $RCMAIL; |
| | | |
| | | $mimetype = $RCMAIL->output->get_env('mimetype'); |
| | | |
| | | if ($mimetype == 'message/rfc822') { |
| | | if ($RCMAIL->output->get_env('is_message')) { |
| | | $attrib['src'] = $RCMAIL->url(array( |
| | | 'task' => 'mail', |
| | | 'action' => 'preview', |
| | |
| | | )); |
| | | } |
| | | else { |
| | | $mimetype = $RCMAIL->output->get_env('mimetype'); |
| | | $frame_replace = strpos($mimetype, 'text/') === 0 ? '_embed=' : '_preload='; |
| | | $attrib['src'] = './?' . str_replace('_frame=', $frame_replace, $_SERVER['QUERY_STRING']); |
| | | } |
| | |
| | | <roundcube:button command="download" type="link" class="button download" classAct="button download" classSel="button downloadSel" title="download" content=" " /> |
| | | <roundcube:button command="print" type="link" class="button print" classAct="button print" classSel="button printSel" title="print" content=" " /> |
| | | <roundcube:container name="toolbar" id="messagetoolbar" /> |
| | | <roundcube:if condition="env:mimetype == 'message/rfc822'" /> |
| | | <roundcube:if condition="env:is_message" /> |
| | | <span class="toolbarseparator"> </span> |
| | | <roundcube:button command="reply" type="link" class="buttonPas reply" classAct="button reply" classSel="button replySel" title="replytomessage" content=" " /> |
| | | <span class="dropbutton"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <roundcube:if condition="env:mimetype == 'message/rfc822'" /> |
| | | <roundcube:if condition="env:is_message" /> |
| | | <div id="forwardmenu" class="popupmenu"> |
| | | <ul id="forwardmenumenu"> |
| | | <roundcube:button type="link-menuitem" command="forward-inline" label="forwardinline" prop="sub" classAct="forwardlink active" class="forwardlink" /> |
| | |
| | | <roundcube:button command="download" type="link" class="button download disabled" classAct="button download" classSel="button download pressed" label="download" title="download" /> |
| | | <roundcube:button command="print" type="link" class="button print disabled" classAct="button print" classSel="button print pressed" label="print" title="print" /> |
| | | <roundcube:container name="toolbar" id="messagetoolbar" /> |
| | | <roundcube:if condition="env:mimetype == 'message/rfc822'" /> |
| | | <roundcube:if condition="env:is_message" /> |
| | | <span class="spacer"></span> |
| | | <roundcube:button command="reply" type="link" class="button reply disabled" classAct="button reply" classSel="button reply pressed" label="reply" title="replytomessage" /> |
| | | <span class="dropbutton"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <roundcube:if condition="env:mimetype == 'message/rfc822'" /> |
| | | <roundcube:if condition="env:is_message" /> |
| | | <div id="forwardmenu" class="popupmenu" aria-hidden="true"> |
| | | <h3 id="aria-label-forwardmenu" class="voice"><roundcube:label name="arialabelforwardingoptions" /></h3> |
| | | <ul id="forwardmenu-menu" class="toolbarmenu" role="menu" aria-labelledby="aria-label-forwardmenu"> |