diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rwxr-xr-x | program/include/rcube_template.php | 11 | ||||
-rw-r--r-- | program/js/app.js | 9 | ||||
-rw-r--r-- | program/localization/de_CH/labels.inc | 1 | ||||
-rw-r--r-- | program/localization/de_DE/labels.inc | 1 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 1 | ||||
-rw-r--r-- | program/steps/mail/show.inc | 20 | ||||
-rw-r--r-- | skins/default/images/icons/extwin.png | bin | 0 -> 263 bytes | |||
-rw-r--r-- | skins/default/mail.css | 28 | ||||
-rw-r--r-- | skins/default/templates/messagepreview.html | 1 |
10 files changed, 54 insertions, 19 deletions
@@ -11,6 +11,7 @@ CHANGELOG RoundCube Webmail ---------- - Refactor drag & drop functionality. Don't rely on browser events anymore (#1484453) - Insert "virtual" folders in subscription list (#1484779) +- Added link to open message in new window 2008/09/05 (thomasb) ---------- diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index 1b61770c0..4441b0a41 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -752,10 +752,13 @@ class rcube_template extends rcube_html_page // make valid href to specific buttons if (in_array($attrib['command'], rcmail::$main_tasks)) { - $attrib['href'] = Q(rcmail_url(null, null, $attrib['command'])); + $attrib['href'] = rcmail_url(null, null, $attrib['command']); } else if (in_array($attrib['command'], $a_static_commands)) { - $attrib['href'] = Q(rcmail_url($attrib['command'])); + $attrib['href'] = rcmail_url($attrib['command']); + } + else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) { + $attrib['href'] = $this->env['permaurl']; } } @@ -817,11 +820,11 @@ class rcube_template extends rcube_html_page if ($attrib['label']) { $btn_content .= ' '.$attrib['label']; } - $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title'); + $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title', 'target'); } else if ($attrib['type']=='link') { $btn_content = $attrib['label'] ? $attrib['label'] : $attrib['command']; - $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex'); + $link_attrib = array('href', 'onclick', 'title', 'id', 'class', 'style', 'tabindex', 'target'); } else if ($attrib['type']=='input') { $attrib['type'] = 'button'; diff --git a/program/js/app.js b/program/js/app.js index b724287ef..a6d88aa85 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -122,6 +122,9 @@ function rcube_webmail() // enable general commands this.enable_command('logout', 'mail', 'addressbook', 'settings', true); + if (this.env.permaurl) + this.enable_command('permaurl', true); + switch (this.task) { case 'mail': @@ -529,6 +532,12 @@ function rcube_webmail() this.switch_task(command); break; + case 'permaurl': + if (obj && obj.href && obj.target) + return true; + else if (this.env.permaurl) + parent.location.href = this.env.permaurl; + break; // misc list commands case 'list': diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc index 31410a83f..761b6c02c 100644 --- a/program/localization/de_CH/labels.inc +++ b/program/localization/de_CH/labels.inc @@ -130,6 +130,7 @@ $labels['unknown'] = 'unbekannt'; $labels['unlimited'] = 'unlimitiert'; $labels['quicksearch'] = 'Schnellsuche'; $labels['resetsearch'] = 'Löschen'; +$labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['compose'] = 'Neue Nachricht verfassen'; $labels['savemessage'] = 'Nachricht speichern'; $labels['sendmessage'] = 'Nachricht jetzt senden'; diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc index 89c28d81b..5d202e3bc 100644 --- a/program/localization/de_DE/labels.inc +++ b/program/localization/de_DE/labels.inc @@ -129,6 +129,7 @@ $labels['unknown'] = 'unbekannt'; $labels['unlimited'] = 'unbegrenzt'; $labels['quicksearch'] = 'Schnellsuche'; $labels['resetsearch'] = 'Suche zurücksetzen'; +$labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['compose'] = 'Neue Nachricht verfassen'; $labels['savemessage'] = 'Nachricht speichern'; $labels['sendmessage'] = 'Nachricht jetzt senden'; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 6b503ff4c..7e538c2ed 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -160,6 +160,7 @@ $labels['unlimited'] = 'unlimited'; $labels['quicksearch'] = 'Quick search'; $labels['resetsearch'] = 'Reset search'; +$labels['openinextwin'] = 'Open in new window'; // message compose $labels['compose'] = 'Compose a message'; diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 256561e0e..0b15c98d9 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -80,6 +80,7 @@ if ($_GET['_uid']) { $OUTPUT->set_env('uid', $MESSAGE->uid); $OUTPUT->set_env('safemode', $MESSAGE->is_safe); $OUTPUT->set_env('sender', $MESSAGE->sender['string']); + $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); // check for unset disposition notification if ($MESSAGE->headers->mdn_to && @@ -152,14 +153,15 @@ function rcmail_message_attachments($attrib) $ol .= html::tag('li', null, sprintf("%s (%s)", Q($attach_prop->filename), Q(show_bytes($attach_prop->size)))); } else { - if (rc_strlen($attach_prop->filename) > 50) { - $filename = rc_substr($attach_prop->filename, 0, 25) . '...' . rc_substr($attach_prop->filename, strlen($attach_prop->filename)-20, 20); - $title = $attach_prop->filename; - } else { - $filename = $attach_prop->filename; - $title = ''; - } - + if (rc_strlen($attach_prop->filename) > 50) { + $filename = abbreviate_string($attach_prop->filename, 50); + $title = $attach_prop->filename; + } + else { + $filename = $attach_prop->filename; + $title = ''; + } + $ol .= html::tag('li', null, html::a(array( 'href' => $MESSAGE->get_part_url($attach_prop->mime_id), @@ -168,7 +170,7 @@ function rcmail_message_attachments($attrib) JS_OBJECT_NAME, $attach_prop->mime_id, $attach_prop->mimetype), - 'title' => Q($title), + 'title' => Q($title), ), Q($filename))); } diff --git a/skins/default/images/icons/extwin.png b/skins/default/images/icons/extwin.png Binary files differnew file mode 100644 index 000000000..1ab4d7703 --- /dev/null +++ b/skins/default/images/icons/extwin.png diff --git a/skins/default/mail.css b/skins/default/mail.css index 7f76ed85b..1502bd22d 100644 --- a/skins/default/mail.css +++ b/skins/default/mail.css @@ -632,6 +632,7 @@ html>body*#messagelist[id$="messagelist"]:not([class="none"]) { table-layout: au div.messageheaderbox { + position: relative; margin: 6px 8px 0px 8px; border: 1px solid #ccc; } @@ -651,6 +652,11 @@ table.headers-table border: 1px solid #ccc; } +#messageframe table.headers-table +{ + border-bottom: 1px solid #ccc; +} + table.headers-table tr td { font-size: 11px; @@ -813,6 +819,15 @@ div.message-htmlpart div.rcmBody color: #333333; } +#messageviewlink +{ + position: absolute; + top: 1px; + right: 1px; + width: 15px; + height: 15px; + border: 0; +} /** message compose styles */ @@ -978,19 +993,20 @@ div.message-htmlpart div.rcmBody margin-top: 4px; } -.more-headers +table.headers-table tr td.more-headers { cursor: pointer; width: 100%; - height: 6px; + height: 8px; + border-bottom: 0; } -.show-headers +td.show-headers { background: url(images/icons/down_small.gif) no-repeat center; } -.hide-headers +td.hide-headers { background: url(images/icons/up_small.gif) no-repeat center; } @@ -1004,7 +1020,7 @@ div.message-htmlpart div.rcmBody #headers-source { margin: 0 5px; - width: 100%; + padding: 0.5em; height: 145px; background: white; overflow: auto; @@ -1013,7 +1029,7 @@ div.message-htmlpart div.rcmBody border: 1px solid #999999; display: none; text-align: left; - color: #666666; + color: #333; } font.bold diff --git a/skins/default/templates/messagepreview.html b/skins/default/templates/messagepreview.html index e08f2c7ec..24848bbe7 100644 --- a/skins/default/templates/messagepreview.html +++ b/skins/default/templates/messagepreview.html @@ -8,6 +8,7 @@ <body class="iframe"> <div class="messageheaderbox"> +<roundcube:button command="permaurl" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="messageviewlink" target="_blank" /> <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/plus.gif" summary="Message headers" /> <roundcube:object name="messageAttachments" id="attachment-list" /> </div> |