summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-09-16 18:05:25 +0000
committeralecpl <alec@alec.pl>2008-09-16 18:05:25 +0000
commitd734041f00e3d70d422004c2dc3948f3fdd17ab5 (patch)
treee9a4a5150036b744db0f1a83d7e006f6b4bb50e7
parent491a6e2901938f49c1e14907f9da615286c81719 (diff)
- Added icons for forwarded/forwarded+replied messages (#1485257)
-rw-r--r--CHANGELOG1
-rw-r--r--program/js/app.js45
-rw-r--r--program/steps/mail/func.inc18
-rw-r--r--skins/default/images/icons/forwarded_replied.pngbin0 -> 375 bytes
-rw-r--r--skins/default/templates/mail.html2
5 files changed, 56 insertions, 10 deletions
diff --git a/CHANGELOG b/CHANGELOG
index efe8760ce..c3af3f182 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ CHANGELOG RoundCube Webmail
- Reduced memory footprint when forwarding attachments (#1485345)
- Fix inline images handling when replying/forwarding html messages
- Allow and use spellcheck attribute for input/textarea fields (#1485060)
+- Added icons for forwarded/forwarded+replied messages (#1485257)
2008/09/15 (thomasb)
----------
diff --git a/program/js/app.js b/program/js/app.js
index 83b3972bf..4bae0e349 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -390,6 +390,7 @@ function rcube_webmail()
row.unread = this.env.messages[uid].unread ? true : false;
row.replied = this.env.messages[uid].replied ? true : false;
row.flagged = this.env.messages[uid].flagged ? true : false;
+ row.forwarded = this.env.messages[uid].forwarded ? true : false;
}
// set eventhandler to message icon
@@ -1748,6 +1749,7 @@ function rcube_webmail()
if (rows[uid].icon && icn_src
&& !(rows[uid].replied && this.env.repliedicon)
+ && !(rows[uid].forwarded && this.env.forwardedicon)
&& !(rows[uid].deleted && this.env.deletedicon))
rows[uid].icon.src = icn_src;
}
@@ -1767,10 +1769,17 @@ function rcube_webmail()
rows[uid].classname = rows[uid].classname.replace(/\s*unread/, '');
parent.rcmail.set_classname(rows[uid].obj, 'unread', false);
- if (rows[uid].replied && parent.rcmail.env.repliedicon)
- icn_src = parent.rcmail.env.repliedicon;
- else if (rows[uid].deleted && parent.rcmail.env.deletedicon)
+ if (rows[uid].deleted && parent.rcmail.env.deletedicon)
icn_src = parent.rcmail.env.deletedicon;
+ else if (rows[uid].replied && parent.rcmail.env.repliedicon)
+ {
+ if (rows[uid].forwarded && parent.rcmail.env.forwardedrepliedicon)
+ icn_src = parent.rcmail.env.forwardedrepliedicon;
+ else
+ icn_src = parent.rcmail.env.repliedicon;
+ }
+ else if (rows[uid].forwarded && parent.rcmail.env.forwardedicon)
+ icn_src = parent.rcmail.env.forwardedicon;
else if (parent.rcmail.env.messageicon)
icn_src = parent.rcmail.env.messageicon;
@@ -1859,10 +1868,18 @@ function rcube_webmail()
rows[uid].classname = rows[uid].classname.replace(/\s*deleted/, '');
this.set_classname(rows[uid].obj, 'deleted', false);
}
+
if (rows[uid].unread && this.env.unreadicon)
icn_src = this.env.unreadicon;
else if (rows[uid].replied && this.env.repliedicon)
- icn_src = this.env.repliedicon;
+ {
+ if (rows[uid].forwarded && this.env.forwardedrepliedicon)
+ icn_src = this.env.forwardedrepliedicon;
+ else
+ icn_src = this.env.repliedicon;
+ }
+ else if (rows[uid].forwarded && this.env.forwardedicon)
+ icn_src = this.env.forwardedicon;
else if (this.env.messageicon)
icn_src = this.env.messageicon;
@@ -3471,6 +3488,7 @@ function rcube_webmail()
this.env.messages[uid] = {deleted:flags.deleted?1:0,
replied:flags.replied?1:0,
unread:flags.unread?1:0,
+ forwarded:flags.forwarded?1:0,
flagged:flags.flagged?1:0};
var row = document.createElement('TR');
@@ -3480,10 +3498,21 @@ function rcube_webmail()
if (this.message_list.in_selection(uid))
row.className += ' selected';
- var icon = flags.deleted && this.env.deletedicon ? this.env.deletedicon:
- (flags.unread && this.env.unreadicon ? this.env.unreadicon :
- (flags.replied && this.env.repliedicon ? this.env.repliedicon : this.env.messageicon));
-
+ var icon = this.env.messageicon;
+ if (flags.deleted && this.env.deletedicon)
+ icon = this.env.deletedicon;
+ else if(flags.unread && this.env.unreadicon)
+ icon = this.env.unreadicon;
+ else if (flags.replied && this.env.repliedicon)
+ {
+ if (flags.forwarded && this.env.forwardedrepliedicon)
+ icon = this.env.forwardedrepliedicon;
+ else
+ icon = this.env.repliedicon;
+ }
+ else if (flags.forwarded && this.env.forwardedicon)
+ icon = this.env.forwardedicon;
+
var col = document.createElement('TD');
col.className = 'icon';
col.innerHTML = icon ? '<img src="'+icon+'" alt="" />' : '';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 02bc4dce2..7e9f0fec3 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -206,16 +206,25 @@ function rcmail_message_list($attrib)
$js_row_arr['unread'] = true;
if ($header->answered)
$js_row_arr['replied'] = true;
+ if ($header->forwarded)
+ $js_row_arr['forwarded'] = true;
if ($header->flagged)
$js_row_arr['flagged'] = true;
// set message icon
if ($attrib['deletedicon'] && $header->deleted)
$message_icon = $attrib['deletedicon'];
+ else if ($attrib['repliedicon'] && $header->answered)
+ {
+ if ($attrib['forwardedrepliedicon'] && $header->forwarded)
+ $message_icon = $attrib['forwardedrepliedicon'];
+ else
+ $message_icon = $attrib['repliedicon'];
+ }
+ else if ($attrib['forwardedicon'] && $header->forwarded)
+ $message_icon = $attrib['forwardedicon'];
else if ($attrib['unreadicon'] && !$header->seen)
$message_icon = $attrib['unreadicon'];
- else if ($attrib['repliedicon'] && $header->answered)
- $message_icon = $attrib['repliedicon'];
else if ($attrib['messageicon'])
$message_icon = $attrib['messageicon'];
@@ -296,6 +305,10 @@ function rcmail_message_list($attrib)
$OUTPUT->set_env('unreadicon', $skin_path . $attrib['unreadicon']);
if ($attrib['repliedicon'])
$OUTPUT->set_env('repliedicon', $skin_path . $attrib['repliedicon']);
+ if ($attrib['forwardedicon'])
+ $OUTPUT->set_env('forwardedicon', $skin_path . $attrib['forwardedicon']);
+ if ($attrib['forwardedrepliedicon'])
+ $OUTPUT->set_env('forwardedrepliedicon', $skin_path . $attrib['forwardedrepliedicon']);
if ($attrib['attachmenticon'])
$OUTPUT->set_env('attachmenticon', $skin_path . $attrib['attachmenticon']);
if ($attrib['flaggedicon'])
@@ -367,6 +380,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE)
$a_msg_flags['deleted'] = $header->deleted ? 1 : 0;
$a_msg_flags['unread'] = $header->seen ? 0 : 1;
$a_msg_flags['replied'] = $header->answered ? 1 : 0;
+ $a_msg_flags['forwarded'] = $header->forwarded ? 1 : 0;
$a_msg_flags['flagged'] = $header->flagged ? 1 : 0;
$OUTPUT->command('add_message_row',
diff --git a/skins/default/images/icons/forwarded_replied.png b/skins/default/images/icons/forwarded_replied.png
new file mode 100644
index 000000000..4830ecf40
--- /dev/null
+++ b/skins/default/images/icons/forwarded_replied.png
Binary files differ
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index 935a7af23..ff1fe9463 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -70,6 +70,8 @@ body_keypress: function(evt, p)
unreadIcon="/images/icons/unread.png"
deletedIcon="/images/icons/deleted.png"
repliedIcon="/images/icons/replied.png"
+ forwardedIcon="/images/icons/forwarded.png"
+ forwardedrepliedIcon="/images/icons/forwarded_replied.png"
attachmentIcon="/images/icons/attachment.png"
flaggedIcon="/images/icons/flagged.png"
unflaggedIcon="/images/icons/unflagged.png" />