summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-22 13:32:44 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-22 13:32:44 +0000
commitc3d4577a3f29b77586e1b515e221f0d8e37757f4 (patch)
tree4d19930c97c8500d8e1ef662df14c00dbe3c875d /roundcubemail/program
parent035d1888fcf832d20ea26ca62b0a370624f0ba06 (diff)
- Fix action when toggling prefer_html option state
git-svn-id: https://svn.roundcube.net/trunk@5465 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/app.js2
-rw-r--r--roundcubemail/program/steps/settings/func.inc5
2 files changed, 4 insertions, 3 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 4b4187d91..1be200933 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/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/roundcubemail/program/steps/settings/func.inc b/roundcubemail/program/steps/settings/func.inc
index 6ba524724..28da87628 100644
--- a/roundcubemail/program/steps/settings/func.inc
+++ b/roundcubemail/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),
);
}