Fix taking wrong value for priority in compose dialog

This commit is contained in:
Hadi Nategh 2015-01-09 12:58:06 +00:00
parent bd56119d38
commit 9cac913e33
2 changed files with 3 additions and 11 deletions

View File

@ -187,9 +187,9 @@ class mail_compose
'hint' => 'Save the drafted message as eml file into VFS'
)
);
foreach (self::$priorities as $priority)
foreach (self::$priorities as $key => $priority)
{
$actions['prty']['children'][$priority] = array(
$actions['prty']['children'][$key] = array(
'caption' => $priority,
);
}

View File

@ -4241,15 +4241,7 @@ app.classes.mail = AppJS.extend(
}
else if (action_event && toolbar.options)
{
var regex = new RegExp(toolbar.options.actions[action_event.id]['value']||'normal','ig');
jQuery(widget.options.select_options).each(function(_i,_a){
if (_a.label.match(regex))
{
widget.set_value(_a.value);
}
})
widget.set_value(toolbar.options.actions[action_event.id]['value']||'3');
}
}
}