summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-09-30 16:00:21 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-09-30 16:00:21 +0200
commit444e977d4f48712a05fee4fa43bb7d543dc7191d (patch)
treec1c0c4537c49786b25b8a032cb853e0ab6af291c
parent34a5ae756251d72e147bc6a2ed7a322e562c825b (diff)
Also truncate the list of addresses in print view + add link to show them all
-rw-r--r--program/steps/mail/func.inc14
-rw-r--r--skins/classic/templates/messageprint.html2
-rw-r--r--skins/larry/templates/messageprint.html2
3 files changed, 13 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index a7d9ca240..340292aa0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1470,9 +1470,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
$mailto = rcube_idn_to_utf8($mailto);
if ($PRINT_MODE) {
- $out .= ($out ? ', ' : '') . sprintf('%s &lt;%s&gt;', Q($name), $mailto);
- // for printing we display all addresses
- continue;
+ $address = sprintf('%s &lt;%s&gt;', Q($name), Q($mailto));
}
else if ($valid) {
if ($linked) {
@@ -1536,6 +1534,15 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
}
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 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
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 fa7822ad5..173e8f69f 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 d01c70bcd..d2a0f6353 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>