Refactoring JavaScript, reduces bandwidth usage on message list when fancy highlighti...
[squirrelmail.git] / functions / page_header.php
index df2ca0d0accc475f4f087c3157f7f80750d46a18..424d420a7f563a3c23ab8e740118363fae10ac86 100644 (file)
@@ -273,7 +273,22 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
 var marked_row = new Array;
 
 
-/**
+/* 
+ * (un)Checks checkbox for the row that the current table cell is in
+ * when it gets clicked.
+ *
+ * @param   string   the name of the checkbox that should be (un)checked
+ */
+function row_click(chkboxName) {
+    chkbox = document.getElementById(chkboxName);
+    if (chkbox) { 
+        chkbox.checked = (chkbox.checked ? false : true); 
+    }
+}
+
+
+
+/*
  * Sets/unsets the pointer and marker in browse mode
  *
  * @param   object    the table row
@@ -529,9 +544,12 @@ EOS;
     if (!$hide_sm_attributions)
     {
         echo html_tag( 'td', '', 'right' ) ."\n";
-        if (!isset($provider_uri)) $provider_uri= 'http://www.squirrelmail.org/';
-        if (!isset($provider_name)) $provider_name= 'SquirrelMail';
-        echo '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>';
+        if (empty($provider_uri)) {
+            echo '<a href="about.php">SquirrelMail</a>';
+        } else {
+            if (empty($provider_name)) $provider_name= 'SquirrelMail';
+            echo '<a href="'.$provider_uri.'" target="_blank">'.$provider_name.'</a>';
+        }
         echo "</td>\n";
     }
     echo "   </tr>\n".