mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Sieve Filters (Interface first look)
Code refactoring Small fixes
This commit is contained in:
parent
409e9fbdc2
commit
1027f319ed
43 changed files with 466 additions and 427 deletions
|
|
@ -0,0 +1,46 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends KnoinAbstractViewModel
|
||||
*/
|
||||
function PopupsKeyboardShortcutsHelpViewModel()
|
||||
{
|
||||
KnoinAbstractViewModel.call(this, 'Popups', 'PopupsKeyboardShortcutsHelp');
|
||||
|
||||
this.sDefaultKeyScope = Enums.KeyState.PopupKeyboardShortcutsHelp;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsKeyboardShortcutsHelpViewModel', PopupsKeyboardShortcutsHelpViewModel);
|
||||
|
||||
PopupsKeyboardShortcutsHelpViewModel.prototype.onBuild = function (oDom)
|
||||
{
|
||||
key('tab, shift+tab, left, right', Enums.KeyState.PopupKeyboardShortcutsHelp, _.bind(function (event, handler) {
|
||||
if (event && handler)
|
||||
{
|
||||
var
|
||||
$tabs = oDom.find('.nav.nav-tabs > li'),
|
||||
bNext = handler && ('tab' === handler.shortcut || 'right' === handler.shortcut),
|
||||
iIndex = $tabs.index($tabs.filter('.active'))
|
||||
;
|
||||
|
||||
if (!bNext && iIndex > 0)
|
||||
{
|
||||
iIndex--;
|
||||
}
|
||||
else if (bNext && iIndex < $tabs.length - 1)
|
||||
{
|
||||
iIndex++;
|
||||
}
|
||||
else
|
||||
{
|
||||
iIndex = bNext ? 0 : $tabs.length - 1;
|
||||
}
|
||||
|
||||
$tabs.eq(iIndex).find('a[data-toggle="tab"]').tab('show');
|
||||
return false;
|
||||
}
|
||||
}, this));
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue