Add link to open message in new window + tweaked some header styles

release-0.6
thomascube 18 years ago
parent e5686f4a01
commit 203ee44470

@ -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)
----------

@ -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';

@ -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':

@ -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';

@ -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';

@ -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';

@ -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)));
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

@ -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

@ -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>

Loading…
Cancel
Save