diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-13 10:30:06 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-13 10:30:06 +0000 |
| commit | 81362097c7efdb81e24db57a195206279392dfc7 (patch) | |
| tree | d9b385ed2d360b76ca922d387995f56db9505d95 /roundcubemail/program/steps/mail/func.inc | |
| parent | 67366f85466780d82252f3bda57f9b16deea2cc8 (diff) | |
- Added message status filter + fixes for r2046 (searching with SORT)
git-svn-id: https://svn.roundcube.net/trunk@2049 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index ca7c4e727..d2bc6a9be 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -1292,6 +1292,36 @@ function rcmail_send_mdn($uid) } +function rcmail_search_filter($attrib) +{ + global $OUTPUT; + + if (!strlen($attrib['id'])) + $attrib['id'] = 'rcmlistfilter'; + + $attrib['onchange'] = JS_OBJECT_NAME.'.filter_mailbox(this.value)'; + + /* + RFC3501 (6.4.4): 'ALL', 'RECENT', + 'ANSWERED', 'DELETED', 'FLAGGED', 'SEEN', + 'UNANSWERED', 'UNDELETED', 'UNFLAGGED', 'UNSEEN', + 'NEW', // = (RECENT UNSEEN) + 'OLD' // = NOT RECENT + */ + + $select_filter = new html_select($attrib); + $select_filter->add(rcube_label('all'), 'ALL'); + $select_filter->add(rcube_label('unread'), 'UNSEEN'); + $select_filter->add(rcube_label('flagged'), 'FLAGGED'); + $select_filter->add(rcube_label('unanswered'), 'UNANSWERED'); + + $out = $select_filter->show($_SESSION['search_filter']); + + $OUTPUT->add_gui_object('search_filter', $attrib['id']); + + return $out; +} + // register UI objects $OUTPUT->add_handlers(array( 'mailboxlist' => 'rcmail_mailbox_list', @@ -1304,6 +1334,7 @@ $OUTPUT->add_handlers(array( 'messagecontentframe' => 'rcmail_messagecontent_frame', 'messagepartframe' => 'rcmail_message_part_frame', 'messagepartcontrols' => 'rcmail_message_part_controls', + 'searchfilter' => 'rcmail_search_filter', 'searchform' => array($OUTPUT, 'search_form'), )); |
