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