Add access keys to mailbox list
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Mar 2009 20:34:35 +0000 (20:34 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 26 Mar 2009 20:34:35 +0000 (20:34 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13451 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php
functions/template/paginator_util.php
include/load_prefs.php
include/options/accessibility.php
src/right_main.php
src/search.php
templates/default/message_list.tpl
templates/default/message_list_controls.tpl

index 9fb3725cf0ffbbed200071e9f0c018736a8a7b6f..5ddc48acccc5e5a8d322d0157a725ab77599bffc 100644 (file)
@@ -1002,8 +1002,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
 
     /* future admin control over displayable buttons */
     $aAdminControl = array(
 
     /* future admin control over displayable buttons */
     $aAdminControl = array(
-                           'markUnflagged' => 1,
                            'markFlagged'   => 1,
                            'markFlagged'   => 1,
+                           'markUnflagged' => 1,
                            'markRead'      => 1,
                            'markUnread'    => 1,
                            'forward'       => 1,
                            'markRead'      => 1,
                            'markUnread'    => 1,
                            'forward'       => 1,
@@ -1018,8 +1018,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
     /* user prefs control */
     $aUserControl = array (
 
     /* user prefs control */
     $aUserControl = array (
 
-                           'markUnflagged' => $show_flag_buttons,
                            'markFlagged'   => $show_flag_buttons,
                            'markFlagged'   => $show_flag_buttons,
+                           'markUnflagged' => $show_flag_buttons,
                            'markRead'      => 1,
                            'markUnread'    => 1,
                            'forward'       => 1,
                            'markRead'      => 1,
                            'markUnread'    => 1,
                            'forward'       => 1,
@@ -1060,17 +1060,37 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
                           );
     /* Button strings */
     $aButtonStrings = array(
                           );
     /* Button strings */
     $aButtonStrings = array(
-                           'markUnflagged' => _("Unflag"),
-                           'markFlagged'   => _("Flag"),
-                           'markRead'      => _("Read"),
-                           'markUnread'    => _("Unread"),
-                           'forward'       => _("Forward"),
-                           'delete'    => _("Delete"),
-                           'undeleteButton'  => _("Undelete"),
-                           'bypass_trash'  => _("Bypass Trash"),
-                           'expungeButton' => _("Expunge"),
-                           'moveButton'          => _("Move"),
-                           'copyButton'          => _("Copy")
+                           'markFlagged'    => _("Flag"),
+                           'markUnflagged'  => _("Unflag"),
+                           'markRead'       => _("Read"),
+                           'markUnread'     => _("Unread"),
+                           'forward'        => _("Forward"),
+                           'delete'         => _("Delete"),
+                           'undeleteButton' => _("Undelete"),
+                           'bypass_trash'   => _("Bypass Trash"),
+                           'expungeButton'  => _("Expunge"),
+                           'moveButton'     => _("Move"),
+                           'copyButton'     => _("Copy")
+                           );
+    /* Button access keys */
+    global $accesskey_mailbox_flag, $accesskey_mailbox_unflag,
+           $accesskey_mailbox_read, $accesskey_mailbox_unread,
+           $accesskey_mailbox_forward, $accesskey_mailbox_delete,
+           $accesskey_mailbox_undelete, $accesskey_mailbox_bypass_trash,
+           $accesskey_mailbox_expunge, $accesskey_mailbox_move,
+           $accesskey_mailbox_copy, $accesskey_mailbox_move_to;
+    $aButtonAccessKeys = array(
+                           'markFlagged'    => $accesskey_mailbox_flag,
+                           'markUnflagged'  => $accesskey_mailbox_unflag,
+                           'markRead'       => $accesskey_mailbox_read,
+                           'markUnread'     => $accesskey_mailbox_unread,
+                           'forward'        => $accesskey_mailbox_forward,
+                           'delete'         => $accesskey_mailbox_delete,
+                           'undeleteButton' => $accesskey_mailbox_undelete,
+                           'bypass_trash'   => $accesskey_mailbox_bypass_trash,
+                           'expungeButton'  => $accesskey_mailbox_expunge,
+                           'moveButton'     => $accesskey_mailbox_move,
+                           'copyButton'     => $accesskey_mailbox_copy,
                            );
 
 
                            );
 
 
@@ -1082,8 +1102,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
     foreach($aAdminControl as $k => $v) {
         if ($v & $aUserControl[$k] & $aImapControl[$k]) {
             switch ($k) {
     foreach($aAdminControl as $k => $v) {
         if ($v & $aUserControl[$k] & $aImapControl[$k]) {
             switch ($k) {
-              case 'markUnflagged':
               case 'markFlagged':
               case 'markFlagged':
+              case 'markUnflagged':
               case 'markRead':
               case 'markUnread':
               case 'delete':
               case 'markRead':
               case 'markUnread':
               case 'delete':
@@ -1091,23 +1111,24 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) {
               case 'expungeButton':
               case 'forward':
                 $aFormElements[$k] 
               case 'expungeButton':
               case 'forward':
                 $aFormElements[$k] 
-                    = array('value' => $aButtonStrings[$k], 'type' => 'submit');
+                    = array('value' => $aButtonStrings[$k], 'type' => 'submit', 'accesskey' => (isset($aButtonAccessKeys[$k]) ? $aButtonAccessKeys[$k] : 'NONE'));
                 break;
               case 'bypass_trash':
                 $aFormElements[$k] 
                 break;
               case 'bypass_trash':
                 $aFormElements[$k] 
-                    = array('value' => $aButtonStrings[$k], 'type' => 'checkbox');
+                    = array('value' => $aButtonStrings[$k], 'type' => 'checkbox', 'accesskey' => (isset($aButtonAccessKeys[$k]) ? $aButtonAccessKeys[$k] : 'NONE'));
                 break;
               case 'moveButton':
               case 'copyButton':
                 $aFormElements['targetMailbox']
                     = array('options_list' => sqimap_mailbox_option_list($imapConnection, array(strtolower($lastTargetMailbox)), 0, $boxes),
                 break;
               case 'moveButton':
               case 'copyButton':
                 $aFormElements['targetMailbox']
                     = array('options_list' => sqimap_mailbox_option_list($imapConnection, array(strtolower($lastTargetMailbox)), 0, $boxes),
-                            'type' => 'select');
+                            'type' => 'select',
+                            'accesskey' => $accesskey_mailbox_move_to);
                 $aFormElements['mailbox']       
                     = array('value' => $aMailbox['NAME'], 'type' => 'hidden');
                 $aFormElements['startMessage']  
                     = array('value' => $aMailbox['PAGEOFFSET'], 'type' => 'hidden');
                 $aFormElements[$k]              
                 $aFormElements['mailbox']       
                     = array('value' => $aMailbox['NAME'], 'type' => 'hidden');
                 $aFormElements['startMessage']  
                     = array('value' => $aMailbox['PAGEOFFSET'], 'type' => 'hidden');
                 $aFormElements[$k]              
-                    = array('value' => $aButtonStrings[$k], 'type' => 'submit');
+                    = array('value' => $aButtonStrings[$k], 'type' => 'submit', 'accesskey' => (isset($aButtonAccessKeys[$k]) ? $aButtonAccessKeys[$k] : 'NONE'));
                 break;
             }
         }
                 break;
             }
         }
index cf892075dda6d44316f6854ca6166ac6920d9351..242791990d42f3b8432e0cab67956fed7395861a 100644 (file)
@@ -20,14 +20,17 @@ include_once(SM_PATH . 'functions/forms.php');
  /**
   * Generate a paginator link.
   *
  /**
   * Generate a paginator link.
   *
-  * @param string  $box Mailbox name
+  * @param string  $box       Mailbox name
   * @param integer $start_msg Message Offset
   * @param integer $start_msg Message Offset
-  * @param string  $text text used for paginator link
+  * @param string  $text      The text used for paginator link
+  * @param string  $accesskey The access key for the link, if any
   * @return string
   */
   * @return string
   */
-function get_paginator_link($box, $start_msg, $text) {
+function get_paginator_link($box, $start_msg, $text, $accesskey='NONE') {
     sqgetGlobalVar('PHP_SELF',$php_self,SQ_SERVER);
     sqgetGlobalVar('PHP_SELF',$php_self,SQ_SERVER);
-    return create_hyperlink("$php_self?startMessage=$start_msg&amp;mailbox=$box", $text);
+    return create_hyperlink("$php_self?startMessage=$start_msg&amp;mailbox=$box",
+                            $text, '', '', '', '', '',
+                            array('accesskey' => $accesskey));
 }
 
 
 }
 
 
@@ -48,6 +51,8 @@ function get_paginator_link($box, $start_msg, $text) {
  */
 function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll, $javascript_on, $page_selector) {
 
  */
 function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll, $javascript_on, $page_selector) {
 
+    static $accesskeys_constructed = FALSE;
+
     /* This will be used as a space. */
     global $oTemplate, $nbsp;
 
     /* This will be used as a space. */
     global $oTemplate, $nbsp;
 
@@ -80,16 +85,27 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,
     $prev_grp = $iOffset - $iLimit;
 
     if (!$bShowAll) {
     $prev_grp = $iOffset - $iLimit;
 
     if (!$bShowAll) {
+
         /* Compute the basic previous and next strings. */
         /* Compute the basic previous and next strings. */
+
+        global $accesskey_mailbox_previous, $accesskey_mailbox_next;
         if (($next_grp <= $iTotal) && ($prev_grp >= 0)) {
         if (($next_grp <= $iTotal) && ($prev_grp >= 0)) {
-            $prv_str = get_paginator_link($box, $prev_grp, '<');
-            $nxt_str = get_paginator_link($box, $next_grp, '>');
+            $prv_str = get_paginator_link($box, $prev_grp, '<',
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_previous));
+            $nxt_str = get_paginator_link($box, $next_grp, '>',
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_next));
         } else if (($next_grp > $iTotal) && ($prev_grp >= 0)) {
         } else if (($next_grp > $iTotal) && ($prev_grp >= 0)) {
-            $prv_str = get_paginator_link($box, $prev_grp, '<');
+            $prv_str = get_paginator_link($box, $prev_grp, '<',
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_previous));
             $nxt_str = '>';
         } else if (($next_grp <= $iTotal) && ($prev_grp < 0)) {
             $prv_str = '<';
             $nxt_str = '>';
         } else if (($next_grp <= $iTotal) && ($prev_grp < 0)) {
             $prv_str = '<';
-            $nxt_str = get_paginator_link($box, $next_grp, '>');
+            $nxt_str = get_paginator_link($box, $next_grp, '>',
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_next));
         }
 
         /* Page selector block. Following code computes page links. */
         }
 
         /* Page selector block. Following code computes page links. */
@@ -103,7 +119,8 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,
             $last_grp = (($tot_pgs - 1) * $iLimit) + 1;
         }
     } else {
             $last_grp = (($tot_pgs - 1) * $iLimit) + 1;
         }
     } else {
-        $pg_str = create_hyperlink("$php_self?showall=0&amp;startMessage=1&amp;mailbox=$box", _("Paginate"));
+        global $accesskey_mailbox_all_paginate;
+        $pg_str = create_hyperlink("$php_self?showall=0&amp;startMessage=1&amp;mailbox=$box", _("Paginate"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate)));
     }
 
     /* Put all the pieces of the paginator string together. */
     }
 
     /* Put all the pieces of the paginator string together. */
@@ -115,7 +132,8 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,
     if ( $prv_str || $nxt_str ) {
 
         /* Compute the 'show all' string. */
     if ( $prv_str || $nxt_str ) {
 
         /* Compute the 'show all' string. */
-        $all_str = create_hyperlink("$php_self?showall=1&amp;startMessage=1&amp;mailbox=$box", _("Show All"));
+        global $accesskey_mailbox_all_paginate;
+        $all_str = create_hyperlink("$php_self?showall=1&amp;startMessage=1&amp;mailbox=$box", _("Show All"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate)));
 
         $result .= '[' . get_paginator_link($box, 1, '<<') . ']';
         $result .= '[' . $prv_str . ']';
 
         $result .= '[' . get_paginator_link($box, 1, '<<') . ']';
         $result .= '[' . $prv_str . ']';
@@ -158,6 +176,9 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,
     if ($result == '') {
         $result = '&nbsp;';
     }
     if ($result == '') {
         $result = '&nbsp;';
     }
+
+    $accesskeys_constructed = TRUE;
+
     /* Return our final magical paginator string. */
     return ($result);
 }
     /* Return our final magical paginator string. */
     return ($result);
 }
@@ -180,6 +201,8 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,
  */
 function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_selector, $page_selector_max) {
 
  */
 function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_selector, $page_selector_max) {
 
+    static $accesskeys_constructed = FALSE;
+
     /* This will be used as a space. */
     global $oTemplate, $nbsp;
     sqgetGlobalVar('PHP_SELF',$php_self,SQ_SERVER);
     /* This will be used as a space. */
     global $oTemplate, $nbsp;
     sqgetGlobalVar('PHP_SELF',$php_self,SQ_SERVER);
@@ -204,17 +227,27 @@ function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_sel
     $prev_grp = $iOffset - $iLimit;
 
     if (!$bShowAll) {
     $prev_grp = $iOffset - $iLimit;
 
     if (!$bShowAll) {
+
         /* Compute the basic previous and next strings. */
 
         /* Compute the basic previous and next strings. */
 
+        global $accesskey_mailbox_previous, $accesskey_mailbox_next;
         if (($next_grp <= $iTotal) && ($prev_grp >= 0)) {
         if (($next_grp <= $iTotal) && ($prev_grp >= 0)) {
-            $prv_str = get_paginator_link($box, $prev_grp, _("Previous"));
-            $nxt_str = get_paginator_link($box, $next_grp, _("Next"));
+            $prv_str = get_paginator_link($box, $prev_grp, _("Previous"),
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_previous));
+            $nxt_str = get_paginator_link($box, $next_grp, _("Next"),
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_next));
         } else if (($next_grp > $iTotal) && ($prev_grp >= 0)) {
         } else if (($next_grp > $iTotal) && ($prev_grp >= 0)) {
-            $prv_str = get_paginator_link($box, $prev_grp, _("Previous"));
+            $prv_str = get_paginator_link($box, $prev_grp, _("Previous"),
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_previous));
             $nxt_str = _("Next");
         } else if (($next_grp <= $iTotal) && ($prev_grp < 0)) {
             $prv_str = _("Previous");
             $nxt_str = _("Next");
         } else if (($next_grp <= $iTotal) && ($prev_grp < 0)) {
             $prv_str = _("Previous");
-            $nxt_str = get_paginator_link($box, $next_grp, _("Next"));
+            $nxt_str = get_paginator_link($box, $next_grp, _("Next"),
+                                          ($accesskeys_constructed
+                                          ? '' : $accesskey_mailbox_next));
         }
 
         /* Page selector block. Following code computes page links. */
         }
 
         /* Page selector block. Following code computes page links. */
@@ -335,7 +368,8 @@ function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_sel
             $last_grp = (($tot_pgs - 1) * $iLimit) + 1;
         }
     } else {
             $last_grp = (($tot_pgs - 1) * $iLimit) + 1;
         }
     } else {
-        $pg_str = create_hyperlink("$php_self?showall=0&amp;startMessage=1&amp;mailbox=$box", _("Paginate"));
+        global $accesskey_mailbox_all_paginate;
+        $pg_str = create_hyperlink("$php_self?showall=0&amp;startMessage=1&amp;mailbox=$box", _("Paginate"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate)));
     }
 
     /* Put all the pieces of the paginator string together. */
     }
 
     /* Put all the pieces of the paginator string together. */
@@ -347,7 +381,8 @@ function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_sel
     if ( $prv_str || $nxt_str ) {
 
         /* Compute the 'show all' string. */
     if ( $prv_str || $nxt_str ) {
 
         /* Compute the 'show all' string. */
-        $all_str = create_hyperlink("$php_self?showall=1&amp;startMessage=1&amp;mailbox=$box", _("Show All"));
+        global $accesskey_mailbox_all_paginate;
+        $all_str = create_hyperlink("$php_self?showall=1&amp;startMessage=1&amp;mailbox=$box", _("Show All"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate)));
 
         $result .= '[';
         $result .= ($prv_str != '' ? $prv_str . $nbsp . $sep . $nbsp : '');
 
         $result .= '[';
         $result .= ($prv_str != '' ? $prv_str . $nbsp . $sep . $nbsp : '');
@@ -362,6 +397,9 @@ function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_sel
     if ($result == '') {
         $result = $nbsp;
     }
     if ($result == '') {
         $result = $nbsp;
     }
+
+    $accesskeys_constructed = TRUE;
+
     /* Return our final magical compact paginator string. */
     return ($result);
 }
     /* Return our final magical compact paginator string. */
     return ($result);
 }
index a11feae75e5e7686f60d35bbf229eaf7372fd68d..c4fdb7ae71e6f1d3f7a525191bac1e4ef3d202f2 100644 (file)
@@ -405,6 +405,25 @@ $accesskey_options_compose = getPref($data_dir, $username, 'accesskey_options_co
 $accesskey_options_accessibility = getPref($data_dir, $username, 'accesskey_options_accessibility', 'a');
 
 
 $accesskey_options_accessibility = getPref($data_dir, $username, 'accesskey_options_accessibility', 'a');
 
 
+$accesskey_mailbox_previous = getPref($data_dir, $username, 'accesskey_mailbox_previous', 'p');
+$accesskey_mailbox_next = getPref($data_dir, $username, 'accesskey_mailbox_next', 'n');
+$accesskey_mailbox_all_paginate = getPref($data_dir, $username, 'accesskey_mailbox_all_paginate', 'a');
+$accesskey_mailbox_thread = getPref($data_dir, $username, 'accesskey_mailbox_thread', 'h');
+$accesskey_mailbox_flag = getPref($data_dir, $username, 'accesskey_mailbox_flag', 'l');
+$accesskey_mailbox_unflag = getPref($data_dir, $username, 'accesskey_mailbox_unflag', 'g');
+$accesskey_mailbox_read = getPref($data_dir, $username, 'accesskey_mailbox_read', 'r');
+$accesskey_mailbox_unread = getPref($data_dir, $username, 'accesskey_mailbox_unread', 'u');
+$accesskey_mailbox_forward = getPref($data_dir, $username, 'accesskey_mailbox_forward', 'f');
+$accesskey_mailbox_delete = getPref($data_dir, $username, 'accesskey_mailbox_delete', 'd');
+$accesskey_mailbox_expunge = getPref($data_dir, $username, 'accesskey_mailbox_expunge', 'x');
+$accesskey_mailbox_undelete = getPref($data_dir, $username, 'accesskey_mailbox_undelete', 'e');
+$accesskey_mailbox_bypass_trash = getPref($data_dir, $username, 'accesskey_mailbox_bypass_trash', 'b');
+$accesskey_mailbox_move_to = getPref($data_dir, $username, 'accesskey_mailbox_move_to', 't');
+$accesskey_mailbox_move = getPref($data_dir, $username, 'accesskey_mailbox_move', 'm');
+$accesskey_mailbox_copy = getPref($data_dir, $username, 'accesskey_mailbox_copy', 'y');
+$accesskey_mailbox_toggle_selected = getPref($data_dir, $username, 'accesskey_mailbox_toggle_selected', 's');
+
+
 /**
  * Height of iframe that displays html formated emails
  * @since 1.5.1
 /**
  * Height of iframe that displays html formated emails
  * @since 1.5.1
index 9e91ec55550ce57e4638394701a92c193a4dc372..adef93c61d557ae9a2ce10a36b7707af8def4667 100644 (file)
@@ -110,14 +110,141 @@ function load_optpage_data_accessibility() {
     $optgrps[SMOPT_GRP_ACCESSKEYS_MAILBOX] = _("Access Keys For Message List Screen");
     $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX] = array();
 
     $optgrps[SMOPT_GRP_ACCESSKEYS_MAILBOX] = _("Access Keys For Message List Screen");
     $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX] = array();
 
-//FIXME -- TODO...
-//    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
-//        'name'    => 'accesskey_mailbox_XXXXXXXXXXXXXXXXXXXXXXX',
-//        'caption' => _("XXXXXXXXXXXXXXX"),
-//        'type'    => SMOPT_TYPE_STRLIST,
-//        'refresh' => SMOPT_REFRESH_NONE,
-//        'posvals' => $my_a_to_z,
-//    );
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_previous',
+        'caption' => _("Previous"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_next',
+        'caption' => _("Next"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_all_paginate',
+        'caption' => _("Show All/Paginate"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_thread',
+        'caption' => _("Thread View/Unthreaded View"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_flag',
+        'caption' => _("Flag"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_unflag',
+        'caption' => _("Unflag"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_read',
+        'caption' => _("Read"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_unread',
+        'caption' => _("Unread"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_forward',
+        'caption' => _("Forward"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_delete',
+        'caption' => _("Delete"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_expunge',
+        'caption' => _("Expunge"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_undelete',
+        'caption' => _("Undelete"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_bypass_trash',
+        'caption' => _("Bypass Trash"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_move_to',
+        'caption' => _("Move To"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_move',
+        'caption' => _("Move"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_copy',
+        'caption' => _("Copy"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
+
+    $optvals[SMOPT_GRP_ACCESSKEYS_MAILBOX][] = array(
+        'name'    => 'accesskey_mailbox_toggle_selected',
+        'caption' => _("Toggle Selected"),
+        'type'    => SMOPT_TYPE_STRLIST,
+        'refresh' => SMOPT_REFRESH_NONE,
+        'posvals' => $my_a_to_z,
+    );
 
 
     /*** Load the Access Key Options for the Read Message page into the array ***/
 
 
     /*** Load the Access Key Options for the Read Message page into the array ***/
index f974d4299df9216879cebf98e74257fefcfccd0b..cb95fefeecde250b479b3bb5ca2cadba29d49b80 100644 (file)
@@ -357,6 +357,10 @@ if ($aMailbox['EXISTS'] > 0) {
     global $show_personal_names;
     $oTemplate->assign('show_personal_names', $show_personal_names);
 
     global $show_personal_names;
     $oTemplate->assign('show_personal_names', $show_personal_names);
 
+    global $accesskey_mailbox_toggle_selected, $accesskey_mailbox_thread;
+    $oTemplate->assign('accesskey_mailbox_toggle_selected', $accesskey_mailbox_toggle_selected);
+    $oTemplate->assign('accesskey_mailbox_thread', $accesskey_mailbox_thread);
+
     $oTemplate->display('message_list.tpl');
 
 } else {
     $oTemplate->display('message_list.tpl');
 
 } else {
index 6520fc281daac92528ccb5b2e1377184dda8a00f..113077d1f1c9ea9f68734ba5a4abfec47a9449d9 100644 (file)
@@ -1628,6 +1628,10 @@ if ($submit == $search_button_text) {
                         global $show_personal_names;
                         $oTemplate->assign('show_personal_names', $show_personal_names);
 
                         global $show_personal_names;
                         $oTemplate->assign('show_personal_names', $show_personal_names);
 
+                        global $accesskey_mailbox_toggle_selected, $accesskey_mailbox_thread;
+                        $oTemplate->assign('accesskey_mailbox_toggle_selected', $accesskey_mailbox_toggle_selected);
+                        $oTemplate->assign('accesskey_mailbox_thread', $accesskey_mailbox_thread);
+
                         $oTemplate->display('message_list.tpl');
                     }
                 }
                         $oTemplate->display('message_list.tpl');
                     }
                 }
index d3733551e83cff5960fd88250903e39287133455..0cb945fb7060751db9a9b6b52a2a6a1183c03ae4 100644 (file)
@@ -70,6 +70,8 @@
  *                                 email address as a tool tip;
  *                                 When turned off, this logic
  *                                 should be inverted
  *                                 email address as a tool tip;
  *                                 When turned off, this logic
  *                                 should be inverted
+ *    $accesskey_mailbox_toggle_selected The access key to use for the toggle all checkbox
+ *    $accesskey_mailbox_thread The access key to use for the Thread/Unthread links
  *
  * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  *
  * @copyright &copy; 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -134,7 +136,10 @@ if ($pageOffset < $end_msg) {
                        */
                       $paginator_str = $this->fetch('paginator.tpl');
                       echo $paginator_str . '<small>[<a href="' . $thread_link_uri
                        */
                       $paginator_str = $this->fetch('paginator.tpl');
                       echo $paginator_str . '<small>[<a href="' . $thread_link_uri
-                                          . '">' . $thread_name . '</a>]</small>&nbsp;&nbsp;';
+                                          . ($accesskey_mailbox_thread != 'NONE'
+                                          ? '" accesskey="' . $accesskey_mailbox_thread . '">'
+                                          : '">')
+                                          . $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 -->
                       if (!empty($plugin_output['mailbox_paginator_after'])) echo $plugin_output['mailbox_paginator_after'];
                   ?>
 <!-- end paginator and thread link string -->
@@ -200,10 +205,12 @@ if ($pageOffset < $end_msg) {
           case SQM_COL_CHECK:
               if ($javascript_on) {
                   $checked = ($checkall ? ' checked="checked" ' : '');
           case SQM_COL_CHECK:
               if ($javascript_on) {
                   $checked = ($checkall ? ' checked="checked" ' : '');
+                  $accesskey = ($accesskey_mailbox_toggle_selected == 'NONE' ? ''
+                                : ' accesskey="' . $accesskey_mailbox_toggle_selected . '" ');
                   echo '<input type="checkbox" name="toggleAll" id="toggleAll" title="'
                      . _("Toggle All") . '" onclick="toggle_all(\''
                      . $form_name . '\', \'msg\', ' . $fancy_index_highlite
                   echo '<input type="checkbox" name="toggleAll" id="toggleAll" title="'
                      . _("Toggle All") . '" onclick="toggle_all(\''
                      . $form_name . '\', \'msg\', ' . $fancy_index_highlite
-                     . '); return false;" ' . $checked . '/>' . "\n";
+                     . '); return false;" ' . $checked . $accesskey . '/>' . "\n";
               } else {
                   $link = $baseurl 
                         . "&amp;startMessage=$pageOffset&amp;checkall=" 
               } else {
                   $link = $baseurl 
                         . "&amp;startMessage=$pageOffset&amp;checkall=" 
index 714230214d954a107bcbdedf379ab68b97c43e62..f9f026e0e47fda0a460cf340a0d59f49b7e721bd 100644 (file)
@@ -87,6 +87,8 @@ extract($t);
             case 'submit':
                 if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell
                     echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button"';
             case 'submit':
                 if ($widget_name != 'moveButton' && $widget_name != 'copyButton' && $widget_name != 'delete' && $widget_name != 'undeleteButton') { // add these later in another table cell
                     echo '<input type="submit" name="' . $widget_name . '" value="' . $widget_attrs['value'] . '" class="message_control_button"';
+                    if ($widget_attrs['accesskey'] != 'NONE')
+                        echo ' accesskey="' . $widget_attrs['accesskey'] . '"';
                     if (!empty($widget_attrs['extra_attrs'])) {
                         foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
                             echo ' ' . $attr . '="' . $val . '"';
                     if (!empty($widget_attrs['extra_attrs'])) {
                         foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
                             echo ' ' . $attr . '="' . $val . '"';
@@ -98,6 +100,8 @@ extract($t);
             case 'checkbox':
                 if ($widget_name != 'bypass_trash') {
                     echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '"';
             case 'checkbox':
                 if ($widget_name != 'bypass_trash') {
                     echo '<input type="checkbox" name="' . $widget_name . '" id="' . $widget_name . '"';
+                    if ($widget_attrs['accesskey'] != 'NONE')
+                        echo ' accesskey="' . $widget_attrs['accesskey'] . '"';
                     if (!empty($widget_attrs['extra_attrs'])) {
                         foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
                             echo ' ' . $attr . '="' . $val . '"';
                     if (!empty($widget_attrs['extra_attrs'])) {
                         foreach ($widget_attrs['extra_attrs'] as $attr => $val) {
                             echo ' ' . $attr . '="' . $val . '"';
@@ -107,7 +111,7 @@ extract($t);
                 }
                 break;
             case 'hidden':
                 }
                 break;
             case 'hidden':
-                echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\" />\n";
+                echo '<input type="hidden" name="'.$widget_name.'" value="'. $widget_attrs['value']."\" />";
                 break;
             default: break;
             }
                 break;
             default: break;
             }
@@ -117,12 +121,12 @@ extract($t);
               <td class="message_control_delete">
 <?php
         if (isset($aFormElements['delete'])) {
               <td class="message_control_delete">
 <?php
         if (isset($aFormElements['delete'])) {
-            echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" />&nbsp;';
+            echo '<input type="submit" name="delete" value="' . $aFormElements['delete']['value'] . '" class="message_control_button" ' . ($aFormElements['delete']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['delete']['accesskey'] . '" ' : '') . '/>&nbsp;';
             if (isset($aFormElements['bypass_trash'])) {
             if (isset($aFormElements['bypass_trash'])) {
-                echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" /><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label>&nbsp;';
+                echo '<input type="checkbox" name="bypass_trash" id="bypass_trash" ' . ($aFormElements['bypass_trash']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['bypass_trash']['accesskey'] . '" ' : '') . '/><label for="bypass_trash">' . $aFormElements['bypass_trash']['value'] . '</label>&nbsp;';
             }
             if (isset($aFormElements['undeleteButton'])) {
             }
             if (isset($aFormElements['undeleteButton'])) {
-                echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" />&nbsp;';
+                echo '<input type="submit" name="undeleteButton" value="' . $aFormElements['undeleteButton']['value'] . '" class="message_control_button" ' . ($aFormElements['undeleteButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['undeleteButton']['accesskey'] . '" ' : '') . '/>&nbsp;';
             }
 ?>
 
             }
 ?>
 
@@ -133,15 +137,15 @@ extract($t);
         if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) {
 ?>
               <td class="message_control_move">
         if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) {
 ?>
               <td class="message_control_move">
-                    <select name="targetMailbox">
+                    <select name="targetMailbox"<?php if ($aFormElements['targetMailbox']['accesskey'] != 'NONE') echo ' accesskey="' . $aFormElements['targetMailbox']['accesskey'] . '"'; ?>>
                        <?php echo $aFormElements['targetMailbox']['options_list'];?>
                     </select>
 <?php
             if (isset($aFormElements['moveButton'])) {
                        <?php echo $aFormElements['targetMailbox']['options_list'];?>
                     </select>
 <?php
             if (isset($aFormElements['moveButton'])) {
-                echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" />';
+                echo '<input type="submit" name="moveButton" value="' . $aFormElements['moveButton']['value'] . '" class="message_control_button" ' . ($aFormElements['moveButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['moveButton']['accesskey'] . '" ' : '') . '/>';
             }
             if (isset($aFormElements['copyButton'])) {
             }
             if (isset($aFormElements['copyButton'])) {
-                echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" />';
+                echo '<input type="submit" name="copyButton" value="' . $aFormElements['copyButton']['value'] . '" class="message_control_button" ' . ($aFormElements['copyButton']['accesskey'] != 'NONE' ? 'accesskey="' . $aFormElements['copyButton']['accesskey'] . '" ' : '') . '/>';
             }
 ?>
 
             }
 ?>