projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
if we have javascript available, use that to toggle more/less links. This is
[squirrelmail.git]
/
templates
/
default
/
read_recipient_list.tpl
diff --git
a/templates/default/read_recipient_list.tpl
b/templates/default/read_recipient_list.tpl
index 99a1c52468883c65f71c9e19de7cd97bb45da745..a50b7f280339cc313e7aba50d871048e25875c08 100644
(file)
--- a/
templates/default/read_recipient_list.tpl
+++ b/
templates/default/read_recipient_list.tpl
@@
-31,25
+31,33
@@
extract($t);
/** Begin template **/
$count = 0;
/** Begin template **/
$count = 0;
+echo "<span class=\"recpt_head\">";
+
foreach ($recipients as $r) {
$count++;
foreach ($recipients as $r) {
$count++;
- if ($count > 3 && !$show_more)
- continue;
+
echo $r['Full'];
if ($count != count($recipients)) {
echo ", \n ";
}
echo $r['Full'];
if ($count != count($recipients)) {
echo ", \n ";
}
+ if (!$show_more && $count == 3) {
+ echo "</span><span id=\"recpt_tail_" . $which_field . "\">";
+ }
}
}
+echo "</span>\n";
+
if (count($recipients) > 3) {
if (count($recipients) > 3) {
- if ($show_more) {
- ?>
- <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("less"); ?></a>)</small>
- <?php
+ if ( checkForJavascript() ) {
+ $url = "javascript:void(0)";
+ $onclick = ' onclick="showhide(\'' . $which_field . "','" . _("more") . "','" . _("less") . "')\"";
} else {
} else {
- ?>
- <small>(<a href="<?php echo $more_less_toggle_href; ?>"><?php echo _("more"); ?></a>)</small>
- <?php
+ $url = $more_less_toggle_href;
+ $onlclick = '';
}
}
+
+ echo " (<a href=\"" . $url . "\"" . $onclick . " id=\"toggle_" . $which_field . "\">" .
+ ($show_more ? _("less") : _("more") ) .
+ "</a>)";
}
}