$accesskey_compose_delete_attach = getPref($data_dir, $username, 'accesskey_compose_delete_attach', 'l');
+$accesskey_folders_refresh = getPref($data_dir, $username, 'accesskey_folders_refresh', 'NONE');
+$accesskey_folders_purge_trash = getPref($data_dir, $username, 'accesskey_folders_purge_trash', 'NONE');
+$accesskey_folders_inbox = getPref($data_dir, $username, 'accesskey_folders_inbox', 'i');
+
+
/**
* Height of iframe that displays html formated emails
* @since 1.5.1
define('SMOPT_GRP_ACCESSKEYS_MAILBOX', 1);
define('SMOPT_GRP_ACCESSKEYS_READ_MESSAGE', 2);
define('SMOPT_GRP_ACCESSKEYS_COMPOSE', 3);
+define('SMOPT_GRP_ACCESSKEYS_FOLDER_LIST', 4);
+define('SMOPT_GRP_ACCESSKEYS_OPTIONS', 5);
/**
* This function builds an array with all the information about
);
+ /*** Load the Access Key Options for the Folder List page into the array ***/
+ $optgrps[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST] = _("Access Keys For Folder List Screen");
+ $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST] = array();
+
+ $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
+ 'name' => 'accesskey_folders_refresh',
+ 'caption' => _("Refresh/Check Mail"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'posvals' => $my_a_to_z,
+ );
+
+ $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
+ 'name' => 'accesskey_folders_purge_trash',
+ 'caption' => _("Purge Trash"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'posvals' => $my_a_to_z,
+ );
+
+ $optvals[SMOPT_GRP_ACCESSKEYS_FOLDER_LIST][] = array(
+ 'name' => 'accesskey_folders_inbox',
+ 'caption' => _("INBOX"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'posvals' => $my_a_to_z,
+ );
+
+
+ /*** Load the Access Key Options for the main Options page into the array ***/
+ $optgrps[SMOPT_GRP_ACCESSKEYS_OPTIONS] = _("Access Keys For Options Screen");
+ $optvals[SMOPT_GRP_ACCESSKEYS_OPTIONS] = array();
+
+//FIXME -- TODO...
+// $optvals[SMOPT_GRP_ACCESSKEYS_OPTIONS][] = array(
+// 'name' => 'accesskey_options_XXXXXXXXXXXXXXXXXXXXXXX',
+// 'caption' => _("XXXXXXXXXXXXXXX"),
+// 'type' => SMOPT_TYPE_STRLIST,
+// 'refresh' => SMOPT_REFRESH_NONE,
+// 'posvals' => $my_a_to_z,
+// );
+
+
/* Assemble all this together and return it as our result. */
$result = array(
'grps' => $optgrps,
$settings['collapsableFoldersEnabled'] = $collapse_folders==1;
$oTemplate->assign('settings', $settings);
+//access keys
+//
+$oTemplate->assign('accesskey_folders_refresh', $accesskey_folders_refresh);
+$oTemplate->assign('accesskey_folders_purge_trash', $accesskey_folders_purge_trash);
+$oTemplate->assign('accesskey_folders_inbox', $accesskey_folders_inbox);
+
$oTemplate->display('left_main.tpl');
sqimap_logout($imapConnection);
}
$pre .= $folder_icon;
+ // calculate if access key is needed
+ //
+ if ($box['IsInbox']) {
+ global $accesskey_folders_inbox;
+ $accesskey = $accesskey_folders_inbox;
+ }
+ else $accesskey = '';
+
/*
* The Trash folder should only be displayed if message recycling has
* been enabled, i.e. when deleted is a message moved to the trash or
* deleted forever?
*/
$view_link = '<a href="'.$box['ViewLink']['URL'].'" ' .
+ ($accesskey == '' ? '' : 'accesskey="' . $accesskey . '" ') .
'target="'.$box['ViewLink']['Target'].'" ' .
'style="text-decoration:none">';
<td style="text-align:center">
<span class="sqm_folderHeader"><?php echo _("Folders"); ?></span><br />
<span class="sqm_clock"><?php echo $clock; ?></span>
- <span class="sqm_refreshButton"><small>[<a href="../src/left_main.php" target="left"><?php echo _("Check mail"); ?></a>]</small></span>
+ <span class="sqm_refreshButton"><small>[<a href="../src/left_main.php" <?php if ($accesskey_folders_refresh != 'NONE') echo 'accesskey="' . $accesskey_folders_refresh . '" '; ?>target="left"><?php echo _("Check Mail"); ?></a>]</small></span>
</td>
</tr>
</table>
}
if ($display_folder) {
+
+ if ($box['IsInbox']) {
+ global $accesskey_folders_inbox;
+ $accesskey = $accesskey_folders_inbox;
+ }
+ else $accesskey = '';
+
$out .= 'mailboxes.add('.$counter.', '.$parent_node.', ' .
'"'.addslashes($name).'", "'.$url.'", "'.$title.'", ' .
'"'.$target.'", ' .
'"'.getIconPath($icon_theme_path, $img).'", ' .
- '"'.getIconPath($icon_theme_path, $img_open).'"' .
+ '"'.getIconPath($icon_theme_path, $img_open).'", ' .
+ '"'.$accesskey.'"' .
');'."\n";
}
}
<td style="text-align:center">
<span class="sqm_folderHeader"><?php echo _("Folders"); ?></span><br />
<span class="sqm_clock"><?php echo $clock; ?></span>
- <span class="sqm_refreshButton"><small>[<a href="../src/left_main.php" target="left"><?php echo _("Check mail"); ?></a>]</small></span>
+ <span class="sqm_refreshButton"><small>[<a href="../src/left_main.php" <?php if ($accesskey_folders_refresh != 'NONE') echo 'accesskey="' . $accesskey_folders_refresh . '" '; ?>target="left"><?php echo _("Check Mail"); ?></a>]</small></span>
</td>
</tr>
</table>
</tr>
</table>
<p>
-<a href="javascript:mailboxes.openAll()"><?php echo _("Open all") ?></a>
+<a href="javascript:mailboxes.openAll()"><?php echo _("Open All") ?></a>
|
-<a href="javascript:mailboxes.closeAll()"><?php echo _("Close all") ?></a>
+<a href="javascript:mailboxes.closeAll()"><?php echo _("Close All") ?></a>
<?php
if ($settings['messageRecyclingEnabled']) {
echo '<br />';
- echo '<a href="empty_trash.php">' . _("Purge trash") . '</a>';
+ echo '<a href="empty_trash.php"';
+ if ($accesskey_folders_purge_trash != 'NONE')
+ echo ' accesskey="' . $accesskey_folders_purge_trash . '"';
+ echo '>' . _("Purge Trash") . '</a>';
}
?>
</p>