Happy 2014
[squirrelmail.git] / templates / default / js / default.js
index b3a3c096c2c8a950122e7f6e5083c43bc07a9057..69c711d0ee59fb6fbff30e6e5e3f207ca80f9f5b 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * This array is used to remember mark status of rows in browse mode
  *
- * @copyright © 2005-2006 The SquirrelMail Project Team
+ * @copyright 2005-2014 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  */
@@ -271,7 +271,7 @@ function checkForm(smaction) {
             var e = document.forms[i].elements.length;
             var j = 0;
             while( pos == -1 && j < e ) {
-                if ( document.forms[i].elements[j].type == 'text' || document.forms[i].elements[j].type == 'password' ) {
+                if ( document.forms[i].elements[j].type == 'text' || document.forms[i].elements[j].type == 'password' || document.forms[i].elements[j].type == 'textarea' ) {
                     pos = j;
                 }
                 j++;
@@ -283,3 +283,23 @@ function checkForm(smaction) {
         }
     }
 }
+
+function printThis()
+{
+    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;
+    }
+}