Synch with abook page; helps keep toggle-all checkbox separate from checkboxes below
[squirrelmail.git] / templates / default / message_list.tpl
index 1dc68642d7ec8f23f5d73a16a2a111b2aadf3301..1e46faed1accc3b9e876983edd9b1e30cc816155 100644 (file)
@@ -128,7 +128,9 @@ if ($pageOffset < $end_msg) {
                        */
                       $paginator_str = $this->fetch('paginator.tpl');
                       echo $paginator_str . '<small>[<a href="' . $thread_link_uri
-                                          . '">' . $thread_name . '</a>]</small>'; ?>
+                                          . '">' . $thread_name . '</a>]</small>&nbsp;&nbsp;';
+                      if (!empty($plugin_output['mailbox_paginator_after'])) echo $plugin_output['mailbox_paginator_after'];
+                  ?>
 <!-- end paginator and thread link string -->
               </td>
 <!-- message count string -->
@@ -192,12 +194,15 @@ if ($pageOffset < $end_msg) {
           case SQM_COL_CHECK:
               if ($javascript_on) {
                   $checked = ($checkall ? ' checked="checked" ' : '');
-                  echo '<input type="checkbox" name="toggleAll" id="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 . '\', \'msg\', ' . $fancy_index_highlite
+                     . '); return false;" ' . $checked . '/>' . "\n";
               } else {
                   $link = $baseurl 
                         . "&amp;startMessage=$pageOffset&amp;checkall=" 
                         . ($checkall ? '0' : '1');
-                  echo "<a href=\"$link\">"._("All").'</a>';
+                  echo "<a href=\"$link\">" . _("All") . '</a>';
               }
               break;
           case SQM_COL_FROM:       
@@ -261,8 +266,13 @@ if ($pageOffset < $end_msg) {
 
             // this stuff does the auto row highlighting on mouseover
             //
+            if (!empty($plugin_output['checkbox_javascript_onclick'])) $checkbox_javascript_onclick = $plugin_output['checkbox_javascript_onclick'];
+            else $checkbox_javascript_onclick = '';
+
             if ($javascript_on && $fancy_index_highlite) {
-                $checkbox_javascript = ' onclick="this.checked = !this.checked;"';
+                $checkbox_javascript = ' onclick="this.checked = !this.checked; ' . $checkbox_javascript_onclick . '"';
+            } else if (!empty($checkbox_javascript_onclick)) {
+                $checkbox_javascript = ' onclick="' . $checkbox_javascript_onclick . '"';
             } else {
                 $checkbox_javascript = '';
             }
@@ -357,9 +367,11 @@ if ($pageOffset < $end_msg) {
     // where on the row you click
     //
     $javascript_auto_click = '';
+    $row_click_extra = '';
+    if (!empty($plugin_output['row_click_extra'])) $row_click_extra = $plugin_output['row_click_extra'];
     if ($javascript_on && $fancy_index_highlite) {
         // include the form_id in order to show multiple messages lists. Otherwise id isn't unique
-        $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i')\"";
+        $javascript_auto_click = " onmousedown=\"row_click('$form_id"."_msg$i', event, '$form_name', 'msg[' + $i + ']', '$row_click_extra')\"";
     }
 
 
@@ -459,7 +471,7 @@ if ($non_clicked_class != 'even' && $non_clicked_class != 'odd'
             if ($onclick)    { $sText .= " onclick=\"$onclick\""; }
             if ($link_extra) { $sText .= " $link_extra";          }
             if ($javascript_on && $fancy_index_highlite) {
-                  $sText .= " onmousedown=\"row_click('$form_id"."_msg$i'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') .
+                  $sText .= " onmousedown=\"row_click('$form_id"."_msg$i', event, '$form_name', 'msg[' + $i + ']', '$row_click_extra'); setPointer(this." . (empty($bold) ? '' : 'parentNode.') .
                             'parentNode.parentNode, ' . $i . ', \'click\', \''. $non_clicked_class. '\', \'mouse_over\', \'clicked\');"';
             }
             $sText .= ">"
@@ -532,6 +544,7 @@ if ($non_clicked_class != 'even' && $non_clicked_class != 'odd'
                        */
                       $paginator_str = $this->fetch('paginator.tpl');
                       echo $paginator_str; 
+                      if (!empty($plugin_output['mailbox_paginator_after'])) echo $plugin_output['mailbox_paginator_after'];
                     ?></td>
                     <td class="message_count"><?php echo $msg_cnt_str; ?></td>
                   </tr>