parent.frames['right'].focus();
parent.frames['right'].print();
}
+
+/* JS implementation of more/less links in To/CC. Could later be extended
+ * show/hide other interface items */
+function showhide (item, txtmore, txtless) {
+ var oTemp=document.getElementById("recpt_tail_" + item);
+ var oClick=document.getElementById("toggle_" + item);
+ if (oTemp.style.display=="inline") {
+ oTemp.style.display="none";
+ oClick.innerHTML=txtmore;
+ } else {
+ oTemp.style.display="inline";
+ oClick.innerHTML=txtless;
+ }
+}
/** Begin template **/
$count = 0;
+echo "<span class=\"recpt_head\">";
+
foreach ($recipients as $r) {
$count++;
- if ($count > 3 && !$show_more)
- continue;
+
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 ($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 {
- ?>
- <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>)";
}