From 444e977d4f48712a05fee4fa43bb7d543dc7191d Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Mon, 30 Sep 2013 10:00:21 -0400 Subject: [PATCH] Also truncate the list of addresses in print view + add link to show them all --- skins/larry/templates/messageprint.html | 2 +- program/steps/mail/func.inc | 14 +++++++++++--- skins/classic/templates/messageprint.html | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index a7d9ca2..340292a 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1470,9 +1470,7 @@ $mailto = rcube_idn_to_utf8($mailto); if ($PRINT_MODE) { - $out .= ($out ? ', ' : '') . sprintf('%s <%s>', Q($name), $mailto); - // for printing we display all addresses - continue; + $address = sprintf('%s <%s>', Q($name), Q($mailto)); } else if ($valid) { if ($linked) { @@ -1536,6 +1534,15 @@ } if ($moreadrs) { + if ($PRINT_MODE) { + $out .= ' ' . html::a(array( + 'href' => '#more', + 'class' => 'morelink', + 'onclick' => '$(this).hide().next().show()', + ), Q(rcube_label(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))) . + html::span(array('style' => 'display:none'), join(', ', $allvalues)); + } + else { $out .= ' ' . html::a(array( 'href' => '#more', 'class' => 'morelink', @@ -1545,6 +1552,7 @@ JQ($title)) ), Q(rcube_label(array('name' => 'andnmore', 'vars' => array('nr' => $moreadrs))))); + } } return $out; diff --git a/skins/classic/templates/messageprint.html b/skins/classic/templates/messageprint.html index fa7822a..173e8f6 100644 --- a/skins/classic/templates/messageprint.html +++ b/skins/classic/templates/messageprint.html @@ -10,7 +10,7 @@ <roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" /> <div id="printmessageframe"> -<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" /> +<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" max="10" /> <roundcube:object name="messageAttachments" id="attachment-list" /> <roundcube:object name="messageBody" id="messagebody" showImages="false" /> </div> diff --git a/skins/larry/templates/messageprint.html b/skins/larry/templates/messageprint.html index d01c70b..d2a0f63 100644 --- a/skins/larry/templates/messageprint.html +++ b/skins/larry/templates/messageprint.html @@ -10,7 +10,7 @@ <div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" /></div> <div id="printmessageframe"> -<roundcube:object name="messageHeaders" class="headers-table" /> +<roundcube:object name="messageHeaders" class="headers-table" max="10" /> <roundcube:object name="messageAttachments" id="attachment-list" /> <roundcube:object name="messageBody" id="messagebody" showImages="false" /> </div> -- Gitblit v1.9.1