mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39: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
|
|
@ -5,22 +5,55 @@
|
|||
*/
|
||||
function AbstractData()
|
||||
{
|
||||
this.keyScope = ko.observable(Enums.KeyState.All);
|
||||
this.keyScope.subscribe(function (sValue) {
|
||||
this.keyScopeReal = ko.observable(Enums.KeyState.All);
|
||||
this.keyScopeFake = ko.observable(Enums.KeyState.All);
|
||||
|
||||
this.keyScope = ko.computed({
|
||||
'owner': this,
|
||||
'read': function () {
|
||||
return this.keyScopeFake();
|
||||
},
|
||||
'write': function (sValue) {
|
||||
|
||||
if (Enums.KeyState.Compose === sValue)
|
||||
{
|
||||
Utils.disableKeyFilter();
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.restoreKeyFilter();
|
||||
}
|
||||
if (Enums.KeyState.Menu !== sValue)
|
||||
{
|
||||
if (Enums.KeyState.Compose === sValue)
|
||||
{
|
||||
Utils.disableKeyFilter();
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.restoreKeyFilter();
|
||||
}
|
||||
|
||||
// window.console.log(sValue);
|
||||
this.keyScopeFake(sValue);
|
||||
if (Globals.dropdownVisibility())
|
||||
{
|
||||
sValue = Enums.KeyState.Menu;
|
||||
}
|
||||
}
|
||||
|
||||
// window.console.log(sValue + '/' + this.keyScopeFake());
|
||||
this.keyScopeReal(sValue);
|
||||
}
|
||||
});
|
||||
|
||||
this.keyScopeReal.subscribe(function (sValue) {
|
||||
window.console.log(sValue);
|
||||
key.setScope(sValue);
|
||||
});
|
||||
|
||||
Globals.dropdownVisibility.subscribe(function (bValue) {
|
||||
if (bValue)
|
||||
{
|
||||
this.keyScope(Enums.KeyState.Menu);
|
||||
}
|
||||
else if (Enums.KeyState.Menu === key.getScope())
|
||||
{
|
||||
this.keyScope(this.keyScopeFake());
|
||||
}
|
||||
}, this);
|
||||
|
||||
Utils.initDataConstructorBySettings(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue