From 9cac913e337c467de5606b110fc484802e3405f1 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 9 Jan 2015 12:58:06 +0000 Subject: [PATCH] Fix taking wrong value for priority in compose dialog --- mail/inc/class.mail_compose.inc.php | 4 ++-- mail/js/app.js | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index a7f1e8f8ed..1e5d9cc56a 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -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, ); } diff --git a/mail/js/app.js b/mail/js/app.js index 3b1e516062..09bf7c38b5 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -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'); } } }