diff options
author | alecpl <alec@alec.pl> | 2008-05-16 11:33:19 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-05-16 11:33:19 +0000 |
commit | d9b29a21722705c38899609b4bcb40b49fb1e873 (patch) | |
tree | 2324c5f9f14dc7ec3fab3ae1ac8c7ecac33ee6d7 | |
parent | e5a83494d05d431b777cf354331767a070038693 (diff) |
- In Preferences added possibility to configure 'read_when_deleted', 'mdn_requests', 'message_sort_col' and 'message_sort_order' options
-rw-r--r-- | CHANGELOG | 5 | ||||
-rw-r--r-- | program/localization/en_US/labels.inc | 9 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 52 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 4 |
4 files changed, 70 insertions, 0 deletions
@@ -1,6 +1,11 @@ CHANGELOG RoundCube Webmail --------------------------- +2008/05/16 (alec) +---------- +- In Preferences added possibility to configure 'read_when_deleted', + 'mdn_requests', 'message_sort_col' and 'message_sort_order' options + 2008/05/15 (thomasb) ---------- - Make IMAP auth type configurable (#1483825) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 669da5aba..35115f016 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -254,6 +254,15 @@ $labels['logoutclear'] = 'Clear Trash on logout'; $labels['logoutcompact'] = 'Compact Inbox on logout'; $labels['uisettings'] = 'User Interface'; $labels['serversettings'] = 'Server Settings'; +$labels['mailboxview'] = 'Mailbox View'; +$labels['mdnrequests'] = 'Sender notifications'; +$labels['descending'] = 'descending'; +$labels['ascending'] = 'ascending'; +$labels['askuser'] = 'ask the user'; +$labels['autosend'] = 'send automatically'; +$labels['ignore'] = 'ignore'; +$labels['readwhendeleted'] = 'Mark the message as read on delete'; +$labels['messagesorder'] = 'Messages order'; $labels['autosavedraft'] = 'Automatically save draft'; $labels['everynminutes'] = 'every $n minutes'; diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index d0bd182bb..32e863e72 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -171,6 +171,48 @@ function rcmail_user_prefs_form($attrib) $input_htmleditor->show($config['htmleditor']?1:0)); } + + if (!isset($no_override['mdn_requests'])) + { + $field_id = 'rcmfd_mdn_requests'; + $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id)); + $select_mdn_requests->add(rcube_label('askuser'), 0); + $select_mdn_requests->add(rcube_label('autosend'), 1); + $select_mdn_requests->add(rcube_label('ignore'), 2); + + $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", + $field_id, + Q(rcube_label('mdnrequests')), + $select_mdn_requests->show($config['mdn_requests'])); + } + + $out .= "</table></fieldset>\n<fieldset><legend>" . Q(rcube_label('mailboxview')) . "</legend>\n<table" . $attrib_str . ">\n\n"; + + if (!isset($no_override['message_sort_col'])) + { + $field_id = 'rcmfd_sort_col'; + $select_sort_col = new html_select(array('name' => '_message_sort_col', 'id' => $field_id)); + $select_sort_col->add(rcube_label('subject'), 'subject'); + $select_sort_col->add(rcube_label('date'), 'date'); + $select_sort_col->add(rcube_label('from'), 'from'); + $select_sort_col->add(rcube_label('to'), 'to'); + $select_sort_col->add(rcube_label('size'), 'size'); + + if (!isset($no_override['message_sort_order'])) + { + $select_sort_order = new html_select(array('name' => '_message_sort_order', 'id' => 'rcmfd_sort_order')); + $select_sort_order->add(rcube_label('ascending'), 'ASC'); + $select_sort_order->add(rcube_label('descending'), 'DESC'); + } + + $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s %s</td></tr>\n", + $field_id, + Q(rcube_label('messagesorder')), + $select_sort_col->show($config['message_sort_col']), + (isset($select_sort_order) ? $select_sort_order->show($config['message_sort_order']) : '')); + } + + // show config parameter for preview pane if (!isset($no_override['preview_pane'])) { @@ -198,6 +240,16 @@ function rcmail_user_prefs_form($attrib) $select_autosave->show($config['draft_autosave'])); } + if (!isset($no_override['read_when_deleted'])) + { + $field_id = 'rcmfd_read_deleted'; + $input_readdeleted = new html_checkbox(array('name' => '_read_when_deleted', 'id' => $field_id, 'value' => 1)); + $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", + $field_id, + Q(rcube_label('readwhendeleted')), + $input_readdeleted->show($config['read_when_deleted']?1:0)); + } + // Trash purging on logout if (!isset($no_override['logout_purge'])) { diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 53408f57d..c9c2fd3bf 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -27,9 +27,13 @@ $a_user_prefs = array( 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, + 'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE, 'logout_purge' => isset($_POST['_logout_purge']) ? TRUE : FALSE, 'logout_expunge' => isset($_POST['_logout_expunge']) ? TRUE : FALSE, 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, + 'mdn_requests' => isset($_POST['_mdn_requests']) ? intval($_POST['_mdn_requests']) : 0, + 'message_sort_col' => isset($_POST['_message_sort_col']) ? get_input_value('_message_sort_col', RCUBE_INPUT_POST) : 'date', + 'message_sort_order' => isset($_POST['_message_sort_order']) ? get_input_value('_message_sort_order', RCUBE_INPUT_POST) : '', ); // don't override these parameters |