6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#3028] Hiding addresses of multiple recipients
*
Your Email Address
*
Spam protection
Enter the letters below:
.___.. ..___ ..__ _/ | |[__ |[__) ./__.|__|| \__||
Comment
> When viewing one message with multiple recipients in the TO or CC > field, the user may have to scroll down to see the body of the > message, the recipient addresses taking too much space. > > > > I propose to make it possible to hide the recipient addresses with > CSS as it is currently possible for quoted text. > > > > Here's a patch for "imp/lib/MIME/Headers.php" that will replace the > addresses by a link if there are more than 20 recipients: > > > > --- Headers.php.orig 2005-11-22 16:59:40.549264024 -0500 > > +++ Headers.php 2005-11-23 15:28:19.416656176 -0500 > > @@ -212,9 +212,19 @@ > > $ret = _("Undisclosed Recipients"); > > } else { > > /* Build the address line. */ > > - $ret = '<span class="nowrap">' . implode(',</span> <span > class="nowrap">', $addr_array) . '</span>'; > > + if (count($addr_array) > 20) { > > + Horde::addScriptFile('hideable.js', 'horde', true); > > + Horde::addScriptFile('addressesBlocks.js', 'imp'); > > + > > + $ret = '<div id="at_' . $field . '">' . > > + Horde::link('#', '', 'widget', '', > 'toggleAddressesBlock(\'' . $field . '\', \'' . count($addr_array) . > '\'); return false;', '', '') . > > + sprintf(_('[Show addresses - %s recipients]'), > count($addr_array)) . '</a></div>' . > > + '<div id="ab_' . $field . '" style="display: > none;"><span class="nowrap">' . implode(',</span> <span > class="nowrap">', $addr_array) . '</span></div>'; > > + } else { > > + $ret = '<span class="nowrap">' . implode(',</span> > <span class="nowrap">', $addr_array) . '</span>'; > > + } > > } > > > > The javascript file "imp/templates/javascript/addressesBlocks.js" > must be created with the following content: > > > > function toggleAddressesBlock(field, count) > > { > > var block = new Horde_Hideable('ab_' + field); > > > > block.toggle(); > > text = document.createTextNode(block.shown() ? > > '<?php echo _("[Hide Addresses]") ?>' : > > '<?php echo _("[Show Addresses -") > ?> ' + count + ' <?php echo _("recipients]") ?>'); > > link = document.createElement('A'); > > link.href = ''; > > link.className = 'widget'; > > link.onclick = function() { > > toggleAddressesBlock(field, count); > > return false; > > } > > link.appendChild(text); > > > > var toggle = document.getElementById('at_' + field); > > if (toggle.firstChild) { > > toggle.removeChild(toggle.firstChild); > > } > > toggle.appendChild(link); > > } > > > > Finally, the following strings will have to be localized: > > > > "[Show Addresses -" > > "recipients]" > > "[Hide Addresses]" > > "[Show addresses - %s recipients]"
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers