Fix js error on operator change

pull/81/head
Aleksander Machniak 12 years ago
parent f41708ced0
commit 5c6e74b176

@ -603,10 +603,12 @@ function rule_header_select(id)
function rule_op_select(obj, id, header)
{
var target = document.getElementById('rule_target' + id + '_list'),
style = obj.value == 'exists' || obj.value == 'notexists' || header == 'size' ? 'none' : 'inline-block';
var target = document.getElementById('rule_target' + id + '_list');
target.style.display = style;
if (!header)
header = document.getElementById('header' + id).value;
target.style.display = obj.value == 'exists' || obj.value == 'notexists' || header == 'size' ? 'none' : 'inline-block';
};
function rule_trans_select(id)

@ -1353,7 +1353,7 @@ class managesieve extends rcube_plugin
$select_op = new html_select(array('name' => "_rule_op[]", 'id' => 'rule_op'.$id,
'style' => 'display:' .($rule['test']!='size' ? 'inline' : 'none'),
'class' => 'operator_selector',
'onchange' => 'rule_op_select('.$id.')'));
'onchange' => 'rule_op_select(this, '.$id.')'));
$select_op->add(rcube::Q($this->gettext('filtercontains')), 'contains');
$select_op->add(rcube::Q($this->gettext('filternotcontains')), 'notcontains');
$select_op->add(rcube::Q($this->gettext('filteris')), 'is');

Loading…
Cancel
Save