Ctrl+Tab/Shift+Ctrl+Tab switching
Supported TDesktop-like conversations switching for packed mode Closes #496
This commit is contained in:
parent
ba13e29573
commit
f1149fffff
@ -294,14 +294,23 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
return cancelEvent(e);
|
return cancelEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.keyCode == 38 || e.keyCode == 40) { // UP, DOWN
|
var next, prev, skip, ctrlTabSupported = Config.Modes.packed;
|
||||||
var skip = !e.shiftKey && e.altKey;
|
if (e.keyCode == 40 || e.keyCode == 38) { // UP, DOWN
|
||||||
|
next = e.keyCode == 40;
|
||||||
|
prev = !next;
|
||||||
|
skip = !e.shiftKey && e.altKey
|
||||||
|
}
|
||||||
|
else if (ctrlTabSupported && e.keyCode == 9 && e.ctrlKey && !e.metaKey) { // Ctrl + Tab, Shift + Ctrl + Tab
|
||||||
|
next = !e.shiftKey;
|
||||||
|
prev = !next;
|
||||||
|
skip = true;
|
||||||
|
}
|
||||||
|
if (next || prev) {
|
||||||
if (!skip && (!searchFocused || e.metaKey)) {
|
if (!skip && (!searchFocused || e.metaKey)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var next = e.keyCode == 40,
|
var currentSelected = !skip && $(scrollableWrap).find('.im_dialog_selected')[0] || $(scrollableWrap).find('.active a.im_dialog')[0],
|
||||||
currentSelected = !skip && $(scrollableWrap).find('.im_dialog_selected')[0] || $(scrollableWrap).find('.active a.im_dialog')[0],
|
|
||||||
currentSelectedWrap = currentSelected && currentSelected.parentNode,
|
currentSelectedWrap = currentSelected && currentSelected.parentNode,
|
||||||
nextDialogWrap;
|
nextDialogWrap;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user