Set view_range for toolbar in mail display popup, and set the actions from the client-side

This commit is contained in:
Hadi Nategh 2014-02-05 16:17:37 +00:00
parent d78bd208cb
commit 37c6013619
3 changed files with 7 additions and 3 deletions

View File

@ -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("<br>",$error_msg):$error_msg);
// Send mail ID so we can use it for actions

View File

@ -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);
}
},

View File

@ -3,10 +3,12 @@
<overlay>
<template id="mail.display" template="" lang="" group="0" version="1.9.001">
<html id="msg"/>
<vbox class="mailDisplay">
<vbox class="mailDisplayToolbar">
<hbox>
<toolbar id="toolbar"/>
<toolbar id="displayToolbar" view_range="12"/>
</hbox>
</vbox>
<vbox class="mailDisplay">
<hbox class="mailDisplayHeaders" id="mailDisplayHeadersFrom" disabled="!@FROM" width="100%">
<description value="From"/>
<url-email id="FROM" readonly="true"/>