mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-24 14:11:29 +01:00
* Mail - Add keyboard actions for forward & reply in the list, and send in compose
This commit is contained in:
parent
2078025eea
commit
5daf70535f
@ -122,6 +122,7 @@ class mail_compose
|
|||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'onExecute' => 'javaScript:app.mail.compose_submitAction',
|
'onExecute' => 'javaScript:app.mail.compose_submitAction',
|
||||||
'hint' => 'Send',
|
'hint' => 'Send',
|
||||||
|
'shortcut' => array('ctrl' => true, 'keyCode' => 83, 'caption' => 'Ctrl + S'),
|
||||||
'toolbarDefault' => true
|
'toolbarDefault' => true
|
||||||
),
|
),
|
||||||
'pgp' => array(
|
'pgp' => array(
|
||||||
|
@ -1115,6 +1115,7 @@ class mail_ui
|
|||||||
'group' => $group,
|
'group' => $group,
|
||||||
'onExecute' => 'javaScript:app.mail.mail_compose',
|
'onExecute' => 'javaScript:app.mail.mail_compose',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
|
'shortcut' => array('ctrl' => true, 'shift' => true, 'keyCode' => 65, 'caption' => 'Ctrl + Shift + A'),
|
||||||
),
|
),
|
||||||
'forward' => array(
|
'forward' => array(
|
||||||
'caption' => 'Forward',
|
'caption' => 'Forward',
|
||||||
@ -1128,6 +1129,7 @@ class mail_ui
|
|||||||
'hint' => 'forward inline',
|
'hint' => 'forward inline',
|
||||||
'onExecute' => 'javaScript:app.mail.mail_compose',
|
'onExecute' => 'javaScript:app.mail.mail_compose',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
|
'shortcut' => array('ctrl' => true, 'keyCode' => 70, 'caption' => 'Ctrl + F'),
|
||||||
'toolbarDefault' => true
|
'toolbarDefault' => true
|
||||||
),
|
),
|
||||||
'forwardasattach' => array(
|
'forwardasattach' => array(
|
||||||
|
@ -284,6 +284,8 @@ app.classes.mail = AppJS.extend(
|
|||||||
}
|
}
|
||||||
that.compose_resizeHandler();
|
that.compose_resizeHandler();
|
||||||
});
|
});
|
||||||
|
// Init key handler
|
||||||
|
this.init_keyHandler();
|
||||||
|
|
||||||
//Call drag_n_drop initialization for emails on compose
|
//Call drag_n_drop initialization for emails on compose
|
||||||
this.init_dndCompose();
|
this.init_dndCompose();
|
||||||
@ -4743,6 +4745,31 @@ app.classes.mail = AppJS.extend(
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Keyhandler for compose window
|
||||||
|
* Use this one so we can handle keys even on inputs
|
||||||
|
*/
|
||||||
|
init_keyHandler: function()
|
||||||
|
{
|
||||||
|
jQuery(document).on('keydown', function(e) {
|
||||||
|
// Translate the given key code and make it valid
|
||||||
|
var keyCode = e.which;
|
||||||
|
keyCode = egw_keycode_translation_function(keyCode);
|
||||||
|
keyCode = egw_keycode_makeValid(keyCode);
|
||||||
|
|
||||||
|
// Only go on if this is a valid key code - call the key handler
|
||||||
|
if (keyCode != -1)
|
||||||
|
{
|
||||||
|
if (egw_keyHandler(keyCode, e.shiftKey, e.ctrlKey || e.metaKey, e.altKey))
|
||||||
|
{
|
||||||
|
// If the key handler successfully passed the key event to some
|
||||||
|
// sub component, prevent the default action
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize dropping targets for draggable emails
|
* Initialize dropping targets for draggable emails
|
||||||
* -
|
* -
|
||||||
|
Loading…
Reference in New Issue
Block a user