[prev in list] [next in list] [prev in thread] [next in thread]
List: squirrelmail-cvs
Subject: [SM-CVS] SF.net SVN: squirrelmail: [13157]
From: kink () users ! sourceforge ! net
Date: 2008-05-19 18:35:21
Message-ID: E1JyACf-0007h4-IV () sc8-pr-svn2 ! sourceforge ! net
[Download RAW message or body]
Revision: 13157
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13157&view=rev
Author: kink
Date: 2008-05-19 11:35:21 -0700 (Mon, 19 May 2008)
Log Message:
-----------
if we have javascript available, use that to toggle more/less links. This is
faster (instantaneous) and saves a full reload of the page on the server. If
no JS keep old behaviour.
Modified Paths:
--------------
trunk/squirrelmail/templates/default/css/default.css
trunk/squirrelmail/templates/default/js/default.js
trunk/squirrelmail/templates/default/read_recipient_list.tpl
Modified: trunk/squirrelmail/templates/default/css/default.css
===================================================================
--- trunk/squirrelmail/templates/default/css/default.css 2008-05-18 21:51:46 UTC (rev \
13156)
+++ trunk/squirrelmail/templates/default/css/default.css 2008-05-19 18:35:21 UTC (rev \
13157) @@ -1078,3 +1078,10 @@
padding: 1em;
font-size: x-large;
}
+
+#recpt_tail_to, #recpt_tail_cc {
+ display: none;
+}
+#toggle_to, #toggle_cc {
+ font-size: smaller;
+}
Modified: trunk/squirrelmail/templates/default/js/default.js
===================================================================
--- trunk/squirrelmail/templates/default/js/default.js 2008-05-18 21:51:46 UTC (rev \
13156)
+++ trunk/squirrelmail/templates/default/js/default.js 2008-05-19 18:35:21 UTC (rev \
13157) @@ -289,3 +289,17 @@
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;
+ }
+}
Modified: trunk/squirrelmail/templates/default/read_recipient_list.tpl
===================================================================
--- trunk/squirrelmail/templates/default/read_recipient_list.tpl 2008-05-18 21:51:46 \
UTC (rev 13156)
+++ trunk/squirrelmail/templates/default/read_recipient_list.tpl 2008-05-19 18:35:21 \
UTC (rev 13157) @@ -31,25 +31,33 @@
/** 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>)";
}
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic