Keyboard shortcuts optimizations (#70, #109)

This commit is contained in:
RainLoop Team
2014-04-08 23:22:17 +04:00
parent 0b30bac43f
commit 05f455c34e
17 changed files with 400 additions and 264 deletions

View File

@@ -450,15 +450,16 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
}
});
key('ctrl+left, command+left', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts())
// toggle message blockquotes
key('b', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts() && oData.message() && oData.message().body)
{
self.goDownCommand();
Utils.toggleMessageBlockquote(oData.message().body);
return false;
}
});
key('ctrl+right, command+right', Enums.KeyState.MessageView, function () {
key('ctrl+left, command+left, ctrl+up, command+up', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts())
{
self.goUpCommand();
@@ -466,6 +467,14 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
}
});
key('ctrl+right, command+right, ctrl+down, command+down', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts())
{
self.goDownCommand();
return false;
}
});
// print
key('ctrl+p, command+p', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts())
@@ -505,7 +514,7 @@ MailBoxMessageViewViewModel.prototype.initShortcuts = function ()
});
// change focused state
key('tab', Enums.KeyState.MessageView, function () {
key('tab, shift+tab', Enums.KeyState.MessageView, function () {
if (oData.useKeyboardShortcuts())
{
if (!self.fullScreenMode() && self.message())