Put additional to addresses in details widget and create an indicator + a link for the number of extra addresses

This commit is contained in:
Hadi Nategh 2016-05-24 15:25:55 +02:00
parent 630eeb6be7
commit 712a6d34f6
4 changed files with 31 additions and 10 deletions

View File

@ -5300,15 +5300,17 @@ app.classes.mail = AppJS.extend(
$attachment.parent().hide();
}
// disable the detials if there's no details
if (!content.ccaddress) $details.hide();
if (!content.ccaddress && !content.additionaltoaddress) $details.hide();
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);
var toaddressdetails = self.et2_view.widgetContainer.getWidgetById('toaddressdetails');
if (toaddressdetails && content.additionaltoaddress)
{
toaddressdetails.set_value('... ' +content.additionaltoaddress.length + egw.lang(' more'));
jQuery(toaddressdetails.getDOMNode()).off().on('click', function(){
$details.find('.et2_details_toggle').click();
});
}
// Request email body from server
iframe.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:id}));

View File

@ -2572,6 +2572,9 @@ div.mailComposeHeaderSection > table {
body #popupMainDiv div#mail-view {
height: 100%;
}
body #popupMainDiv #mail-view_toaddressdetails {
color: #26537c;
}
body #popupMainDiv #tempPrintDiv {
display: block;
}

View File

@ -140,6 +140,9 @@
div#mail-view {
height: 100%;
}
#mail-view_toaddressdetails {
color: #26537c;
}
#tempPrintDiv {
display:block;
div:first-child {

View File

@ -19,13 +19,26 @@
<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%" id="headerTo">
<hbox class="mail-d-h2" disabled="!@toaddress" width="100%">
<description value="To"/>
<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"/>
<url-email id="toaddress" readonly="true"/>
<description id = "toaddressdetails"/>
</hbox>
<hbox>
<details class="details" title="show details" toggle_align="left">
<hbox class="mail-d-h2" disabled="!@toaddress" width="100%">
<description value="To"/>
<grid id="additionaltoaddress">
<columns>
<column/>
</columns>
<rows>
<row>
<url-email id="${row}"/>
</row>
</rows>
</grid>
</hbox>
<hbox class="mail-d-h2" disabled="!@ccaddress" width="100%">
<description value="Cc"/>
<grid id="ccaddress">