From: pdontthink Date: Thu, 26 Mar 2009 20:34:35 +0000 (+0000) Subject: Add access keys to mailbox list X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=47485591c277f6da6aab7fe2b18482ea93234105;p=squirrelmail.git Add access keys to mailbox list git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13451 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 9fb3725c..5ddc48ac 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -1002,8 +1002,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { /* future admin control over displayable buttons */ $aAdminControl = array( - 'markUnflagged' => 1, 'markFlagged' => 1, + 'markUnflagged' => 1, 'markRead' => 1, 'markUnread' => 1, 'forward' => 1, @@ -1018,8 +1018,8 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { /* user prefs control */ $aUserControl = array ( - 'markUnflagged' => $show_flag_buttons, 'markFlagged' => $show_flag_buttons, + 'markUnflagged' => $show_flag_buttons, 'markRead' => 1, 'markUnread' => 1, 'forward' => 1, @@ -1060,17 +1060,37 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { ); /* 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) { - case 'markUnflagged': case 'markFlagged': + case 'markUnflagged': case 'markRead': case 'markUnread': case 'delete': @@ -1091,23 +1111,24 @@ function showMessagesForMailbox($imapConnection, &$aMailbox,$aProps, &$iError) { 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] - = 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), - '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] - = array('value' => $aButtonStrings[$k], 'type' => 'submit'); + = array('value' => $aButtonStrings[$k], 'type' => 'submit', 'accesskey' => (isset($aButtonAccessKeys[$k]) ? $aButtonAccessKeys[$k] : 'NONE')); break; } } diff --git a/functions/template/paginator_util.php b/functions/template/paginator_util.php index cf892075..24279199 100644 --- a/functions/template/paginator_util.php +++ b/functions/template/paginator_util.php @@ -20,14 +20,17 @@ include_once(SM_PATH . 'functions/forms.php'); /** * Generate a paginator link. * - * @param string $box Mailbox name + * @param string $box Mailbox name * @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 */ -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); - return create_hyperlink("$php_self?startMessage=$start_msg&mailbox=$box", $text); + return create_hyperlink("$php_self?startMessage=$start_msg&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) { + static $accesskeys_constructed = FALSE; + /* 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) { + /* Compute the basic previous and next strings. */ + + global $accesskey_mailbox_previous, $accesskey_mailbox_next; 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)) { - $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 = 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. */ @@ -103,7 +119,8 @@ function get_compact_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll, $last_grp = (($tot_pgs - 1) * $iLimit) + 1; } } else { - $pg_str = create_hyperlink("$php_self?showall=0&startMessage=1&mailbox=$box", _("Paginate")); + global $accesskey_mailbox_all_paginate; + $pg_str = create_hyperlink("$php_self?showall=0&startMessage=1&mailbox=$box", _("Paginate"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate))); } /* 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. */ - $all_str = create_hyperlink("$php_self?showall=1&startMessage=1&mailbox=$box", _("Show All")); + global $accesskey_mailbox_all_paginate; + $all_str = create_hyperlink("$php_self?showall=1&startMessage=1&mailbox=$box", _("Show All"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate))); $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 = ' '; } + + $accesskeys_constructed = TRUE; + /* 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) { + static $accesskeys_constructed = FALSE; + /* 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) { + /* Compute the basic previous and next strings. */ + global $accesskey_mailbox_previous, $accesskey_mailbox_next; 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)) { - $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 = 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. */ @@ -335,7 +368,8 @@ function get_paginator_str($box, $iOffset, $iTotal, $iLimit, $bShowAll,$page_sel $last_grp = (($tot_pgs - 1) * $iLimit) + 1; } } else { - $pg_str = create_hyperlink("$php_self?showall=0&startMessage=1&mailbox=$box", _("Paginate")); + global $accesskey_mailbox_all_paginate; + $pg_str = create_hyperlink("$php_self?showall=0&startMessage=1&mailbox=$box", _("Paginate"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate))); } /* 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. */ - $all_str = create_hyperlink("$php_self?showall=1&startMessage=1&mailbox=$box", _("Show All")); + global $accesskey_mailbox_all_paginate; + $all_str = create_hyperlink("$php_self?showall=1&startMessage=1&mailbox=$box", _("Show All"), '', '', '', '', '', array('accesskey' => ($accesskeys_constructed ? 'NONE' : $accesskey_mailbox_all_paginate))); $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; } + + $accesskeys_constructed = TRUE; + /* Return our final magical compact paginator string. */ return ($result); } diff --git a/include/load_prefs.php b/include/load_prefs.php index a11feae7..c4fdb7ae 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -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_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 diff --git a/include/options/accessibility.php b/include/options/accessibility.php index 9e91ec55..adef93c6 100644 --- a/include/options/accessibility.php +++ b/include/options/accessibility.php @@ -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(); -//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 ***/ diff --git a/src/right_main.php b/src/right_main.php index f974d429..cb95fefe 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -357,6 +357,10 @@ if ($aMailbox['EXISTS'] > 0) { 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 { diff --git a/src/search.php b/src/search.php index 6520fc28..113077d1 100644 --- a/src/search.php +++ b/src/search.php @@ -1628,6 +1628,10 @@ if ($submit == $search_button_text) { 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'); } } diff --git a/templates/default/message_list.tpl b/templates/default/message_list.tpl index d3733551..0cb945fb 100644 --- a/templates/default/message_list.tpl +++ b/templates/default/message_list.tpl @@ -70,6 +70,8 @@ * 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 © 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 . '[' . $thread_name . ']  '; + . ($accesskey_mailbox_thread != 'NONE' + ? '" accesskey="' . $accesskey_mailbox_thread . '">' + : '">') + . $thread_name . ']  '; if (!empty($plugin_output['mailbox_paginator_after'])) echo $plugin_output['mailbox_paginator_after']; ?> @@ -200,10 +205,12 @@ if ($pageOffset < $end_msg) { case SQM_COL_CHECK: if ($javascript_on) { $checked = ($checkall ? ' checked="checked" ' : ''); + $accesskey = ($accesskey_mailbox_toggle_selected == 'NONE' ? '' + : ' accesskey="' . $accesskey_mailbox_toggle_selected . '" '); echo '' . "\n"; + . '); return false;" ' . $checked . $accesskey . '/>' . "\n"; } else { $link = $baseurl . "&startMessage=$pageOffset&checkall=" diff --git a/templates/default/message_list_controls.tpl b/templates/default/message_list_controls.tpl index 71423021..f9f026e0 100644 --- a/templates/default/message_list_controls.tpl +++ b/templates/default/message_list_controls.tpl @@ -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 ' $val) { echo ' ' . $attr . '="' . $val . '"'; @@ -98,6 +100,8 @@ extract($t); case 'checkbox': if ($widget_name != 'bypass_trash') { echo ' $val) { echo ' ' . $attr . '="' . $val . '"'; @@ -107,7 +111,7 @@ extract($t); } break; case 'hidden': - echo '\n"; + echo '"; break; default: break; } @@ -117,12 +121,12 @@ extract($t);  '; + echo ' '; if (isset($aFormElements['bypass_trash'])) { - echo ' '; + echo ' '; } if (isset($aFormElements['undeleteButton'])) { - echo ' '; + echo ' '; } ?> @@ -133,15 +137,15 @@ extract($t); if (isset($aFormElements['moveButton']) || isset($aFormElements['copyButton'])) { ?> - > '; + echo ''; } if (isset($aFormElements['copyButton'])) { - echo ''; + echo ''; } ?>