Fix mail mobile view does not show additional TO addresses

This commit is contained in:
Hadi Nategh 2016-05-24 12:39:06 +02:00
parent 53406b9f85
commit 630eeb6be7
2 changed files with 14 additions and 5 deletions

View File

@ -723,12 +723,14 @@ app.classes.mail = AppJS.extend(
* {build_children, data_one, data, widget, line}
*
* @param {object} _dataElem includes data of the widget which need to be expand
* @param {object} widget container of relevant template, default is this.et2
*
* @return _dataElem content of widgets
*/
url_email_expandOnClick: function (_expContent, _dataElem)
url_email_expandOnClick: function (_expContent, _dataElem, _et2)
{
var et2 = _et2 || this.et2;
for(var j = 0; j < _expContent.length; j++)
{
var field = _expContent[j] || [];
@ -748,10 +750,10 @@ app.classes.mail = AppJS.extend(
}
// Disable whole box if there are none
var line = this.et2.getWidgetById(field.line);
var line = et2.getWidgetById(field.line);
if(line != null) line.set_disabled(content.length == 0);
var widget = this.et2.getWidgetById(field.widget);
var widget = et2.getWidgetById(field.widget);
if(widget == null) continue;
$j(widget.getDOMNode()).removeClass('visible');
@ -5302,6 +5304,12 @@ app.classes.mail = AppJS.extend(
toolbar.set_actions(content.toolbar);
// Build expanded series of addresses
var expand_content = [
{build_children: true, data_one: 'toaddress', data: 'additionaltoaddress', widget: 'tohbox', line: 'headerTo'},
];
self.url_email_expandOnClick(expand_content, {data:content}, self.et2_view.widgetContainer);
// Request email body from server
iframe.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:id}));
jQuery(iframe.getDOMNode()).on('load',function(){

View File

@ -19,9 +19,10 @@
<hbox class="mail-d-h2" align="right" width="100%">
<date-time id="date" readonly="true"/>
</hbox>
<hbox class="mail-d-h2" disabled="!@toaddress" width="100%">
<hbox class="mail-d-h2" disabled="!@toaddress" width="100%" id="headerTo">
<description value="To"/>
<url-email id="toaddress" readonly="true"/>
<hbox id="tohbox" readonly="true" class="mail_extraEmails"/>
<buttononly class="et2_button ui-button" label="Show all Addresses" image="foldertree_nolines_plus" onclick="app.mail.showAllHeader"/>
</hbox>
<hbox>
<details class="details" title="show details" toggle_align="left">