From 712a6d34f6fab3644e49759d27192b28204b8688 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 24 May 2016 15:25:55 +0200 Subject: [PATCH] Put additional to addresses in details widget and create an indicator + a link for the number of extra addresses --- mail/js/app.js | 16 +++++++++------- mail/templates/mobile/app.css | 3 +++ mail/templates/mobile/app.less | 3 +++ mail/templates/mobile/view.xet | 19 ++++++++++++++++--- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index d7eae67553..10f3fa49dc 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -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})); diff --git a/mail/templates/mobile/app.css b/mail/templates/mobile/app.css index 8d0f44d55f..4cab665344 100644 --- a/mail/templates/mobile/app.css +++ b/mail/templates/mobile/app.css @@ -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; } diff --git a/mail/templates/mobile/app.less b/mail/templates/mobile/app.less index f477445a19..770af0ad04 100644 --- a/mail/templates/mobile/app.less +++ b/mail/templates/mobile/app.less @@ -140,6 +140,9 @@ div#mail-view { height: 100%; } + #mail-view_toaddressdetails { + color: #26537c; + } #tempPrintDiv { display:block; div:first-child { diff --git a/mail/templates/mobile/view.xet b/mail/templates/mobile/view.xet index c6ccfb345d..18ca6ccf96 100644 --- a/mail/templates/mobile/view.xet +++ b/mail/templates/mobile/view.xet @@ -19,13 +19,26 @@ - + - - + +
+ + + + + + + + + + + + +