diff options
author | thomascube <thomas@roundcube.net> | 2010-04-09 15:12:40 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-04-09 15:12:40 +0000 |
commit | bc4960108e78b8a571745f55f54c83ea34fd0336 (patch) | |
tree | 5d970061197870d1ac258466587c939771ec6d79 /program/steps/settings/func.inc | |
parent | 814905ca879d976792f33cf0fb45a4d3f8fedc32 (diff) |
Option not to mark messages as read when viewed in preview pane (#1485012)
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r-- | program/steps/settings/func.inc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 7ad2449b5..1516b9810 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -279,7 +279,8 @@ function rcmail_user_prefs($current=null) // show config parameter for preview pane if (!isset($no_override['preview_pane'])) { $field_id = 'rcmfd_preview'; - $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1)); + $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1, + 'onchange' => JS_OBJECT_NAME.'.toggle_preview_pane(this)')); $blocks['main']['options']['preview_pane'] = array( 'title' => html::label($field_id, Q(rcube_label('previewpane'))), @@ -287,6 +288,26 @@ function rcmail_user_prefs($current=null) ); } + // show config parameter for preview pane auto mark as read delay + if (!isset($no_override['preview_pane_mark_read'])) { + // apply default if config option is not set at all + $config['preview_pane_mark_read'] = $RCMAIL->config->get('preview_pane_mark_read', 0); + + $field_id = 'rcmfd_preview_pane_mark_read'; + $select_delay = new html_select(array('name' => '_preview_pane_mark_read', 'id' => $field_id, + 'disabled' => $config['preview_pane']?0:1)); + + $select_delay->add(rcube_label('never'), '-1'); + $select_delay->add(rcube_label('immediately'), 0); + foreach(array(5, 10, 20, 30) as $sec) + $select_delay->add(rcube_label(array('name' => 'afternseconds', 'vars' => array('n' => $sec))), $sec); + + $blocks['main']['options']['preview_pane_mark_read'] = array( + 'title' => html::label($field_id, Q(rcube_label('previewpanemarkread'))), + 'content' => $select_delay->show(intval($config['preview_pane_mark_read'])), + ); + } + if (!isset($no_override['mdn_requests'])) { $field_id = 'rcmfd_mdn_requests'; $select_mdn_requests = new html_select(array('name' => '_mdn_requests', 'id' => $field_id)); |