diff options
author | alecpl <alec@alec.pl> | 2011-11-22 13:32:44 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-11-22 13:32:44 +0000 |
commit | e01e7985176867c0fe7dae2853c44aff53a56db7 (patch) | |
tree | 9bceb6ce687fab4a96f4f7f4cba8cdd1239a4ea0 /program | |
parent | 2498155abec3bca663b9f30c8548fd322c4e3a13 (diff) |
- Fix action when toggling prefer_html option state
Diffstat (limited to 'program')
-rw-r--r-- | program/js/app.js | 2 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index 4b4187d91..1be200933 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -5587,7 +5587,7 @@ function rcube_webmail() this.toggle_prefer_html = function(checkbox) { - $('#rcmfd_addrbook_show_images').prop('disabled', !checkbox.checked); + $('#rcmfd_show_images').prop('disabled', !checkbox.checked).val(0); }; this.toggle_preview_pane = function(checkbox) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 6ba524724..28da87628 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -437,14 +437,15 @@ function rcmail_user_prefs($current=null) if (!isset($no_override['show_images'])) { $field_id = 'rcmfd_show_images'; - $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id)); + $input_show_images = new html_select(array('name' => '_show_images', 'id' => $field_id, + 'disabled' => !$config['prefer_html'])); $input_show_images->add(rcube_label('never'), 0); $input_show_images->add(rcube_label('fromknownsenders'), 1); $input_show_images->add(rcube_label('always'), 2); $blocks['main']['options']['show_images'] = array( 'title' => html::label($field_id, Q(rcube_label('showremoteimages'))), - 'content' => $input_show_images->show($config['show_images']), + 'content' => $input_show_images->show($config['prefer_html'] ? $config['show_images'] : 0), ); } |