Keyboard shortcuts optimizations (#70)

Folder list focused state
This commit is contained in:
RainLoop Team 2014-04-13 04:32:07 +04:00
parent d961fa480a
commit 0fad66c452
53 changed files with 2231 additions and 1181 deletions

View file

@ -85,6 +85,7 @@ function WebMailDataStorage()
// folders
this.namespace = '';
this.folderList = ko.observableArray([]);
this.folderList.focused = ko.observable(false);
this.foldersListError = ko.observable('');
@ -279,6 +280,7 @@ function WebMailDataStorage()
this.message.focused.subscribe(function (bValue) {
if (bValue)
{
RL.data().folderList.focused(false);
RL.data().keyScope(Enums.KeyState.MessageView);
}
else if (Enums.KeyState.MessageView === RL.data().keyScope())
@ -287,6 +289,17 @@ function WebMailDataStorage()
}
});
this.folderList.focused.subscribe(function (bValue) {
if (bValue)
{
RL.data().keyScope(Enums.KeyState.FolderList);
}
else if (Enums.KeyState.FolderList === RL.data().keyScope())
{
RL.data().keyScope(Enums.KeyState.MessageList);
}
});
this.messageLoading.subscribe(function (bValue) {
this.messageLoadingThrottle(bValue);
}, this);
@ -363,8 +376,6 @@ function WebMailDataStorage()
}, this);
// other
this.useKeyboardShortcuts = ko.observable(true);
this.allowOpenPGP = ko.observable(false);
this.openpgpkeys = ko.observableArray([]);
this.openpgpKeyring = null;