[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/functions mailbox_display.php,1.432,1.433
From:       Paul Lesneiwski <pdontthink () users ! sourceforge ! net>
Date:       2005-03-30 0:47:26
Message-ID: E1DGRMk-00033P-1f () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11641

Modified Files:
	mailbox_display.php 
Log Message:
Area around checkboxes is now also responsive to the fancy row highlighting and \
auto-checkbox clicks; also toggle all functionality now corresponds with the fancy \
row highlighting when in use.

Index: mailbox_display.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v
retrieving revision 1.432
retrieving revision 1.433
diff -u -w -r1.432 -r1.433
--- mailbox_display.php	17 Mar 2005 04:03:36 -0000	1.432
+++ mailbox_display.php	30 Mar 2005 00:47:21 -0000	1.433
@@ -300,6 +300,7 @@
     if (!isset($hlt_color)) {
         $hlt_color = $color_string;
     }
+
     $col = 0;
     $sSubject = str_replace('&nbsp;', ' ', decodeHeader($sSubject));
     $subject = processSubject($sSubject, $iIndent);
@@ -328,6 +329,9 @@
     }
 
 
+    if ($javascript_on && $fancy_index_highlite)
+        echo "<script language='javascript' type='text/javascript'>\n<!--\n"
+           . "orig_row_colors[" . $t . "] = '" . $hlt_color . \
"';\n//-->\n</script>";  echo html_tag( 'tr','','','',$row_extra) . "\n";
 
 
@@ -335,8 +339,11 @@
     // where on the row you click
     //
     $javascript_auto_click = '';
-    if ($javascript_on && $fancy_index_highlite)
+    $checkbox_javascript = '';
+    if ($javascript_on && $fancy_index_highlite) {
         $javascript_auto_click = ' onMouseDown="row_click(\'msg[' . $t . ']\')"';
+        $checkbox_javascript = ' onClick="this.checked = !this.checked;"';
+    }
 
 
     if (sizeof($index_order)) {
@@ -386,9 +393,9 @@
             switch ($index_order_part) {
             case 1: /* checkbox */
                 echo html_tag( 'td',
-                    addCheckBox("msg[$t]", $checkall, $iId),
+                    addCheckBox("msg[$t]", $checkall, $iId, $checkbox_javascript),
                             'center',
-                            $hlt_color );
+                            $hlt_color, $javascript_auto_click);
                 break;
             case 2: /* from */
                 if ($senderAddress != $senderName) {
@@ -1511,9 +1518,18 @@
  * @param array $aMailbox
  */
 function get_selectall_link($aMailbox) {
-    global $checkall, $javascript_on;
+    global $checkall, $javascript_on, $fancy_index_highlite, $color;
     global $PHP_SELF;
 
+    // set this to an empty string to turn off extra 
+    // highlighting of checked rows
+    //
+    //$clickedColor = '';
+    if (!empty($color[16]))
+       $clickedColor = $color[16];
+    else
+       $clickedColor = $color[2];
+
     $result = '';
     if ($javascript_on) {
         $safe_name = preg_replace("/[^0-9A-Za-z_]/", '_', $aMailbox['NAME']);
@@ -1521,12 +1537,14 @@
         $form_name = "FormMsgs" . $safe_name;
         $result = '<script language="JavaScript" type="text/javascript">'
                 . "\n<!-- \n"
+                . "var orig_row_colors = new Array();\n"
                 . "function " . $func_name . "() {\n"
                 . "  for (var i = 0; i < document." . $form_name . \
                ".elements.length; i++) {\n"
                 . "    if(document." . $form_name . ".elements[i].type == 'checkbox' \
                && "
                 . "       document." . $form_name . \
                ".elements[i].name.substring(0,3) == 'msg'){\n"
                 . "      document." . $form_name . ".elements[i].checked = "
                 . "        !(document." . $form_name . ".elements[i].checked);\n"
+                . ($fancy_index_highlite ? "      setPointer(document." . $form_name \
. ".elements[i].parentNode.parentNode, document." . $form_name . \
".elements[i].name.substring(4, document." . $form_name . ".elements[i].name.length - \
1), 'click', orig_row_colors[document." . $form_name . \
".elements[i].name.substring(4, document." . $form_name . ".elements[i].name.length - \
1)], orig_row_colors[document." . $form_name . ".elements[i].name.substring(4, \
document." . $form_name . ".elements[i].name.length - 1)], '" . $clickedColor . \
                "');\n" : '')
                 . "    }\n"
                 . "  }\n"
                 . "}\n"



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic