mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
parent
0b30bac43f
commit
05f455c34e
17 changed files with 400 additions and 264 deletions
|
|
@ -196,16 +196,21 @@ function MailBoxMessageListViewModel()
|
|||
'.messageListItem .actionHandle', '.messageListItem.selected', '.messageListItem .checkboxMessage',
|
||||
'.messageListItem.focused');
|
||||
|
||||
this.selector.on('onItemSelect', _.bind(function (oMessage) {
|
||||
this.selector.on('onItemSelect', _.bind(function (oMessage, bClick) {
|
||||
if (oMessage)
|
||||
{
|
||||
oData.message(oData.staticMessageList.populateByMessageListItem(oMessage));
|
||||
this.populateMessageBody(oData.message());
|
||||
|
||||
if (Enums.Layout.NoPreview === oData.layout())
|
||||
{
|
||||
kn.setHash(RL.link().messagePreview(), true);
|
||||
oData.message.focused(true);
|
||||
}
|
||||
else if (bClick)
|
||||
{
|
||||
oData.message.focused(false);
|
||||
}
|
||||
|
||||
oData.message(oData.staticMessageList.populateByMessageListItem(oMessage));
|
||||
this.populateMessageBody(oData.message());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -226,10 +231,10 @@ function MailBoxMessageListViewModel()
|
|||
|
||||
RL
|
||||
.sub('mailbox.message-list.selector.go-down', function () {
|
||||
this.selector.goDown();
|
||||
this.selector.goDown(true);
|
||||
}, this)
|
||||
.sub('mailbox.message-list.selector.go-up', function () {
|
||||
this.selector.goUp();
|
||||
this.selector.goUp(true);
|
||||
}, this)
|
||||
;
|
||||
|
||||
|
|
@ -696,7 +701,7 @@ MailBoxMessageListViewModel.prototype.initShortcuts = function ()
|
|||
});
|
||||
|
||||
// change focused state
|
||||
key('tab', Enums.KeyState.MessageList, function () {
|
||||
key('tab, shift+tab', Enums.KeyState.MessageList, function () {
|
||||
if (oData.useKeyboardShortcuts())
|
||||
{
|
||||
if (self.message())
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue