Reinserting support for the "iframe_height" option. This might be done in a better...
[squirrelmail.git] / templates / default / message_list.tpl
index 0e7f547335979286fee4a8615967b0d0ae8478e3..0752f1e2623f7abd053b51a33eda61e1197bf45c 100644 (file)
@@ -63,6 +63,7 @@
  *    $compact_paginator
  *    $aErrors
  *    $checkall
+ *    $preselected
  *
  * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -191,7 +192,7 @@ if ($pageOffset < $end_msg) {
           case SQM_COL_CHECK:
               if ($javascript_on) {
                   $checked = ($checkall ? ' checked="checked" ' : '');
-                  echo '<input type="checkbox" name="toggleAll" title="'._("Toggle All").'" onclick="toggle_all(\''.$form_name."',".$fancy_index_highlite.')" ' . $checked . '/>'."\n";
+                  echo '<input type="checkbox" name="toggleAll" id="toggleAll" title="'._("Toggle All").'" onclick="toggle_all(\''.$form_name."',".$fancy_index_highlite.')" ' . $checked . '/>'."\n";
               } else {
                   $link = $baseurl 
                         . "&amp;startMessage=$pageOffset&amp;checkall=" 
@@ -199,23 +200,25 @@ if ($pageOffset < $end_msg) {
                   echo "<a href=\"$link\">"._("All").'</a>';
               }
               break;
-          case SQM_COL_FROM:       echo _("From")."\n";     break;
-          case SQM_COL_DATE:       echo _("Date")."\n";     break;
-          case SQM_COL_SUBJ:       echo _("Subject")."\n";  break;
+          case SQM_COL_FROM:       
+              echo '<label for="toggleAll">' . _("From") . "</label>\n";
+              break;
+          case SQM_COL_DATE:       echo _("Date") . "\n";     break;
+          case SQM_COL_SUBJ:       echo _("Subject") . "\n";  break;
           case SQM_COL_FLAGS:
                 echo getIcon($icon_theme_path, 'msg_new.png', '&nbsp;', _("Message Flags")) . "\n";
                 break;
-          case SQM_COL_SIZE:       echo  _("Size")."\n";    break;
+          case SQM_COL_SIZE:       echo  _("Size") . "\n";    break;
           case SQM_COL_PRIO:
                 echo getIcon($icon_theme_path, 'prio_high.png', '!', _("Priority")) . "\n";
                 break;
           case SQM_COL_ATTACHMENT:
                 echo getIcon($icon_theme_path, 'attach.png', '+', _("Attachment")) . "\n";
                 break;
-          case SQM_COL_INT_DATE:   echo _("Received")."\n"; break;
-          case SQM_COL_TO:         echo _("To")."\n";       break;
-          case SQM_COL_CC:         echo _("Cc")."\n";       break;
-          case SQM_COL_BCC:        echo _("Bcc")."\n";      break;
+          case SQM_COL_INT_DATE:   echo _("Received") . "\n"; break;
+          case SQM_COL_TO:         echo _("To") . "\n";       break;
+          case SQM_COL_CC:         echo _("Cc") . "\n";       break;
+          case SQM_COL_BCC:        echo _("Bcc") . "\n";      break;
           default: break;
         }
         // add the sort buttons
@@ -305,7 +308,7 @@ if ($pageOffset < $end_msg) {
         $aColumns[SQM_COL_ATTACHMENT]['value'] = $sValue;
     }
 
-    $class = ($checkall && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even');
+    $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even');
     $non_clicked_class = 'even';
 
     /**
@@ -313,7 +316,7 @@ if ($pageOffset < $end_msg) {
      */
     if (isset($alt_index_colors) && $alt_index_colors) {
         if (!($i % 2)) {
-            $class = ($checkall && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd');
+            $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd');
             $non_clicked_class = 'odd';
         }
 
@@ -324,7 +327,7 @@ if ($pageOffset < $end_msg) {
      */
     if (isset($aMsg['row']['color']))
     {
-       if ($checkall && $javascript_on && $fancy_index_highlite) {
+       if (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite) {
 //FIXME: would be best not to use $color directly here; want to move this to be a CSS style-defined value only, but the problem is that this CSS class is being defined on the fly right here
            $bgcolor = $color[16];
            $class = 'clicked_misc'.$i;
@@ -432,7 +435,7 @@ if ($non_clicked_class != 'even' && $non_clicked_class != 'odd'
 
         switch ($iCol) {
           case SQM_COL_CHECK:
-            $checked = ($checkall ? ' checked="checked" ' : '');
+            $checked = (($checkall || in_array($iUid, $preselected)) ? ' checked="checked" ' : '');
             if ($javascript_on) {
                 echo '<td class="col_check"'. $javascript_auto_click. '>' ?>
                 <input type="checkbox" name="<?php echo "msg[$i]";?>" id="<?php echo $form_id."_msg$i";?>" value="<?php echo $iUid;?>" <?php echo $checkbox_javascript . $checked;?> /></td>