summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-05-01 16:22:09 +0000
committersvncommit <devs@roundcube.net>2006-05-01 16:22:09 +0000
commit6ec0a8518be4aa8ea9e522bbc30fe6bacb1b9013 (patch)
treecb02532a4ee090fdae09116a063eae7ffe270a1c /program/steps
parent857a380c5b0dc27b04568f160cc0987b32ced759 (diff)
Added undelete functionalist and support for delete toggle icon
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 6a24c02d5..2747d5fc0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -390,13 +390,16 @@ function rcmail_message_list($attrib)
$zebra_class = $i%2 ? 'even' : 'odd';
// set messag attributes to javascript array
+ if ($header->deleted)
+ $js_row_arr['deleted'] = true;
if (!$header->seen)
$js_row_arr['unread'] = true;
if ($header->answered)
$js_row_arr['replied'] = true;
-
- // set message icon
- if ($attrib['unreadicon'] && !$header->seen)
+ // set message icon
+ if ($attrib['deletedicon'] && $header->deleted)
+ $message_icon = $attrib['deletedicon'];
+ else if ($attrib['unreadicon'] && !$header->seen)
$message_icon = $attrib['unreadicon'];
else if ($attrib['repliedicon'] && $header->answered)
$message_icon = $attrib['repliedicon'];
@@ -456,6 +459,8 @@ function rcmail_message_list($attrib)
if ($attrib['messageicon'])
$javascript .= sprintf("%s.set_env('messageicon', '%s%s');\n", $JS_OBJECT_NAME, $skin_path, $attrib['messageicon']);
+ if ($attrib['deletedicon'])
+ $javascript .= sprintf("%s.set_env('deletedicon', '%s%s');\n", $JS_OBJECT_NAME, $skin_path, $attrib['deletedicon']);
if ($attrib['unreadicon'])
$javascript .= sprintf("%s.set_env('unreadicon', '%s%s');\n", $JS_OBJECT_NAME, $skin_path, $attrib['unreadicon']);
if ($attrib['repliedicon'])
@@ -510,12 +515,9 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE)
$a_msg_cols[$col] = $cont;
}
+ $a_msg_flags['deleted'] = $header->deleted ? 1 : 0;
$a_msg_flags['unread'] = $header->seen ? 0 : 1;
$a_msg_flags['replied'] = $header->answered ? 1 : 0;
-
- if ($header->deleted)
- $a_msg_flags['deleted'] = 1;
-
$commands .= sprintf("this.add_message_row(%s, %s, %s, %b, %b);\n",
$header->uid,
array2js($a_msg_cols),