mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-06 13:12:20 +03:00
Dropdown menu keyboard navigation
Keyboard shortcuts help popup (Shift + / )
This commit is contained in:
parent
f52be6fb66
commit
d961fa480a
47 changed files with 5598 additions and 583 deletions
|
|
@ -13,8 +13,9 @@ function AbstractSystemDropDownViewModel()
|
|||
this.accounts = oData.accounts;
|
||||
this.accountEmail = oData.accountEmail;
|
||||
this.accountsLoading = oData.accountsLoading;
|
||||
this.accountMenuFocus = oData.accountMenuFocus;
|
||||
|
||||
|
||||
this.accountMenuDropdownTrigger = ko.observable(false);
|
||||
|
||||
this.allowAddAccount = RL.settingsGet('AllowAdditionalAccounts');
|
||||
|
||||
this.loading = ko.computed(function () {
|
||||
|
|
@ -22,14 +23,6 @@ function AbstractSystemDropDownViewModel()
|
|||
}, this);
|
||||
|
||||
this.accountClick = _.bind(this.accountClick, this);
|
||||
|
||||
key('`', function () {
|
||||
if (oData.useKeyboardShortcuts() && !RL.popupVisibility() &&
|
||||
!oData.accountMenuFocus())
|
||||
{
|
||||
oData.accountMenuFocus(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_.extend(AbstractSystemDropDownViewModel.prototype, KnoinAbstractViewModel.prototype);
|
||||
|
|
@ -76,4 +69,15 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
|
|||
|
||||
RL.loginAndLogoutReload(true, RL.settingsGet('ParentEmail') && 0 < RL.settingsGet('ParentEmail').length);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
AbstractSystemDropDownViewModel.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
key('`', [Enums.KeyState.MessageList, Enums.KeyState.MessageView, Enums.KeyState.Settings], function () {
|
||||
if (RL.data().useKeyboardShortcuts() && !RL.popupVisibility() && !Globals.dropdownVisibility() && self.viewModelVisibility())
|
||||
{
|
||||
self.accountMenuDropdownTrigger(true);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue