diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 56f5e613f4..205ef761d9 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1856,7 +1856,7 @@ unset($query['actions']); $actionsenabled = array_reverse($actionsenabled,true); $actionsenabled['composeasnew']=$cAN; $actionsenabled = array_reverse($actionsenabled,true); - $etpl->setElementAttribute('toolbar','actions', $actionsenabled); + $content['displayToolbaractions'] = json_encode($actionsenabled); if (empty($subject)) $subject = lang('no subject'); $content['msg'] = (is_array($error_msg)?implode("
",$error_msg):$error_msg); // Send mail ID so we can use it for actions diff --git a/mail/js/app.js b/mail/js/app.js index 70be155f03..86c2c35ddc 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -603,6 +603,8 @@ app.classes.mail = AppJS.extend( dataElem.data = jQuery.extend(dataElem.data, content); this.url_email_expandOnClick(expand_content, dataElem); + var toolbaractions = ((typeof dataElem != 'undefined' && typeof dataElem.data != 'undefined' && typeof dataElem.data.displayToolbaractions != 'undefined')?JSON.parse(dataElem.data.displayToolbaractions):undefined); + if (toolbaractions) this.et2.getWidgetById('displayToolbar').set_actions(toolbaractions); } }, diff --git a/mail/templates/default/display.xet b/mail/templates/default/display.xet index 0d6010cc39..9661a23561 100644 --- a/mail/templates/default/display.xet +++ b/mail/templates/default/display.xet @@ -3,10 +3,12 @@