* @licence GNU GPL
*
**/
/** *
**/
/**
* Shortcuts, list view:
* ?: Show shortcut help
* a: Select all visible messages
* A: Mark all as read (as Google Reader)
* c: Compose new message
* d: Delete message
* f: Forward message
* j: Go to previous page of messages (as Gmail)
* k: Go to next page of messages (as Gmail)
* p: Print message
* r: Reply to message
* R: Reply to all of message
* s: Jump to quicksearch
* u: Check for new mail (update)
*
* Shortcuts, threads view:
* E: Expand all
* C: Collapse all
* U: Expand Unread
*
* Shortcuts, mail view:
* d: Delete message
* f: Forward message
* j: Go to previous message (as Gmail)
* k: Go to next message (as Gmail)
* p: Print message
* r: Reply to message
* R: Reply to all of message
*/
class keyboard_shortcuts extends rcube_plugin
{
public $task = 'mail';
function init()
{
// only init in authenticated state and if newuserdialog is finished
// do not init on compose (css incompatibility with compose_addressbook plugin
$rcmail = rcmail::get_instance();
$this->require_plugin('jqueryui');
if($_SESSION['username'] && empty($_SESSION['plugin.newuserdialog']) && $rcmail->action != 'compose'){
$this->include_stylesheet('keyboard_shortcuts.css');
$this->include_script('keyboard_shortcuts.js');
$this->add_hook('template_container', array($this, 'html_output'));
$this->add_texts('localization', true);
}
}
function html_output($p) {
if ($p['name'] == "listcontrols") {
$rcmail = rcmail::get_instance();
$skin = $rcmail->config->get('skin');
if(!file_exists('plugins/keyboard_shortcuts/skins/' . $skin . '/images/keyboard.png')){
$skin = "default";
}
$this->load_config();
$keyboard_shortcuts = $rcmail->config->get('keyboard_shortcuts_extras', array());
$c = "";
$c .= '' . $this->gettext("title") . ": \n";
$c .= "