summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js58
-rw-r--r--program/localization/en_US/labels.inc1
-rw-r--r--program/localization/pl_PL/labels.inc1
-rw-r--r--program/steps/mail/func.inc38
4 files changed, 53 insertions, 45 deletions
diff --git a/program/js/app.js b/program/js/app.js
index cb94d9597..558a8b8a7 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1550,8 +1550,10 @@ function rcube_webmail()
if (uid && this.env.messages[uid])
$.extend(row, this.env.messages[uid]);
- // set eventhandler to message icon
- if (this.env.subject_col != null && (row.icon = document.getElementById('msgicn'+row.uid))) {
+ row.msgicon = document.getElementById('msgicn'+row.uid);
+
+ // set eventhandler to message status icon
+ if (row.icon = document.getElementById('statusicn'+row.uid)) {
row.icon._row = row.obj;
row.icon.onmousedown = function(e) { self.command('toggle_status', this); rcube_event.cancel(e); };
}
@@ -1618,20 +1620,14 @@ function rcube_webmail()
row.id = 'rcmrow'+uid;
row.className = css_class;
- // message status icon
+ // message status icons
css_class = 'msgicon';
if (!flags.unread && flags.unread_children > 0)
css_class += ' unreadchildren';
- if (flags.deleted)
- css_class += ' deleted';
- else if (flags.replied || flags.forwarded) {
- if (flags.replied)
- css_class += ' replied';
- if (flags.forwarded)
- css_class += ' forwarded';
- }
- else if (flags.unread)
- css_class += ' unread';
+ if (flags.replied)
+ css_class += ' replied';
+ if (flags.forwarded)
+ css_class += ' forwarded';
// update selection
if (message.selected && !list.in_selection(uid))
@@ -1693,6 +1689,15 @@ function rcube_webmail()
else
html = ' ';
}
+ else if (c == 'status') {
+ if (flags.deleted)
+ css_class = 'deleted';
+ else if (flags.unread)
+ css_class = 'unread';
+ else
+ css_class = 'msgicon';
+ html = '<span id="statusicn'+uid+'" class="'+css_class+'">&nbsp;</span>';
+ }
else if (c == 'threads')
html = expando;
else if (c == 'subject')
@@ -2221,23 +2226,28 @@ function rcube_webmail()
return false;
if (rows[uid].icon) {
- css_class = 'msgicon';
- if (!rows[uid].unread && rows[uid].unread_children)
- css_class += ' unreadchildren';
if (rows[uid].deleted)
- css_class += ' deleted';
- else if (rows[uid].replied || rows[uid].forwarded) {
- if (rows[uid].replied)
- css_class += ' replied';
- if (rows[uid].forwarded)
- css_class += ' forwarded';
- }
+ css_class = 'deleted';
else if (rows[uid].unread)
- css_class += ' unread';
+ css_class = 'unread';
+ else
+ css_class = 'msgicon';
rows[uid].icon.className = css_class;
}
+ if (rows[uid].msgicon) {
+ css_class = 'msgicon';
+ if (!rows[uid].unread && rows[uid].unread_children)
+ css_class += ' unreadchildren';
+ if (rows[uid].replied)
+ css_class += ' replied';
+ if (rows[uid].forwarded)
+ css_class += ' forwarded';
+
+ rows[uid].msgicon.className = css_class;
+ }
+
if (rows[uid].flagged_icon) {
css_class = (rows[uid].flagged ? 'flagged' : 'unflagged');
rows[uid].flagged_icon.className = css_class;
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index aace461f5..9a06096e6 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -52,6 +52,7 @@ $labels['date'] = 'Date';
$labels['size'] = 'Size';
$labels['priority'] = 'Priority';
$labels['organization'] = 'Organization';
+$labels['readstatus'] = 'Read status';
// aliases
$labels['reply-to'] = $labels['replyto'];
diff --git a/program/localization/pl_PL/labels.inc b/program/localization/pl_PL/labels.inc
index 804b3d130..534681c65 100644
--- a/program/localization/pl_PL/labels.inc
+++ b/program/localization/pl_PL/labels.inc
@@ -45,6 +45,7 @@ $labels['bcc'] = 'Ukryta kopia';
$labels['replyto'] = 'Odp. do';
$labels['date'] = 'Data';
$labels['size'] = 'Rozmiar';
+$labels['readstatus'] = 'Przeczytano';
$labels['priority'] = 'Priorytet';
$labels['organization'] = 'Organizacja';
$labels['reply-to'] = 'Odpowiedz do';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 678dc0494..668d8c7e5 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -255,17 +255,14 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
if (empty($a_headers))
return;
- // remove 'threads', 'attachment', 'flag' columns, we don't need them here
- if (($key = array_search('attachment', $a_show_cols)) !== FALSE)
- unset($a_show_cols[$key]);
- if (($key = array_search('flag', $a_show_cols)) !== FALSE)
- unset($a_show_cols[$key]);
- if (($key = array_search('threads', $a_show_cols)) !== FALSE)
- unset($a_show_cols[$key]);
- // loop through message headers
+ // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here
+ foreach (array('threads', 'attachment', 'flag', 'status') as $col) {
+ if (($key = array_search($col, $a_show_cols)) !== FALSE)
+ unset($a_show_cols[$key]);
+ }
- foreach ($a_headers as $n => $header)
- {
+ // loop through message headers
+ foreach ($a_headers as $n => $header) {
if (empty($header))
continue;
@@ -275,16 +272,14 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$IMAP->set_charset(!empty($header->charset) ? $header->charset : $CONFIG['default_charset']);
// format each col; similar as in rcmail_message_list()
- foreach ($a_show_cols as $col)
- {
+ foreach ($a_show_cols as $col) {
if (in_array($col, array('from', 'to', 'cc', 'replyto')))
$cont = Q(rcmail_address_string($header->$col, 3), 'show');
- else if ($col=='subject')
- {
+ else if ($col=='subject') {
$cont = abbreviate_string(trim($IMAP->decode_header($header->$col)), 160);
if (!$cont) $cont = rcube_label('nosubject');
$cont = Q($cont);
- }
+ }
else if ($col=='size')
$cont = show_bytes($header->$col);
else if ($col=='date')
@@ -293,7 +288,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$cont = Q($header->$col);
$a_msg_cols[$col] = $cont;
- }
+ }
if ($header->depth)
$a_msg_flags['depth'] = $header->depth;
@@ -332,11 +327,11 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$a_msg_cols,
$a_msg_flags,
$insert_top);
- }
+ }
- if ($IMAP->threading) {
- $OUTPUT->command('init_threads', (array) $roots);
- }
+ if ($IMAP->threading) {
+ $OUTPUT->command('init_threads', (array) $roots);
+ }
}
@@ -380,7 +375,8 @@ function rcmail_message_list_head($attrib, $a_show_cols)
$col_name = '<span class="flagged">&nbsp;</span>';
break;
case 'attachment':
- $col_name = '<span class="attachment">&nbsp;</span>';
+ case 'status':
+ $col_name = '<span class="' . $col .'">&nbsp;</span>';
break;
case 'threads':
$col_name = $list_menu;