snappymail/dev/View/Admin/Settings/Menu.js

40 lines
781 B
JavaScript
Raw Normal View History

import $ from '$';
import key from 'key';
import {leftPanelDisabled} from 'Common/Globals';
2017-07-11 20:40:31 +08:00
import {KeyState} from 'Common/Enums';
2017-07-11 20:40:31 +08:00
import {view, ViewType, settingsMenuKeysHendler} from 'Knoin/Knoin';
import {AbstractViewNext} from 'Knoin/AbstractViewNext';
@view({
name: 'View/Admin/Settings/Menu',
type: ViewType.Left,
templateID: 'AdminMenu'
})
class MenuSettingsAdminView extends AbstractViewNext
2016-06-30 08:02:45 +08:00
{
/**
* @param {?} screen
*/
constructor(screen) {
super();
this.leftPanelDisabled = leftPanelDisabled;
this.menu = screen.menu;
}
link(route) {
return '#/' + route;
}
onBuild(dom) {
2017-07-11 20:40:31 +08:00
key('up, down', KeyState.Settings, settingsMenuKeysHendler($('.b-admin-menu .e-item', dom)));
}
}
export {MenuSettingsAdminView, MenuSettingsAdminView as default};