Matteo Scandolo | fb46ae6 | 2017-08-08 09:10:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Matteo Scandolo | 5053cbe | 2017-01-31 17:37:56 -0800 | [diff] [blame] | 17 | import {IXosKeyboardShortcutService, IXosKeyboardShortcutMap} from '../services/keyboard-shortcut'; |
| 18 | import './key-binding-panel.scss'; |
| 19 | |
| 20 | class XosKeyBindingPanelController { |
| 21 | static $inject = ['$scope', 'XosKeyboardShortcut']; |
| 22 | public bindings: IXosKeyboardShortcutMap; |
Matteo Scandolo | c3804aa | 2017-08-09 16:00:43 -0700 | [diff] [blame] | 23 | |
Matteo Scandolo | 5053cbe | 2017-01-31 17:37:56 -0800 | [diff] [blame] | 24 | constructor ( |
| 25 | private $scope: ng.IScope, |
| 26 | private XosKeyboardShortcut: IXosKeyboardShortcutService |
| 27 | ) { |
| 28 | this.bindings = this.XosKeyboardShortcut.keyMapping; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | export const xosKeyBindingPanel: angular.IComponentOptions = { |
| 33 | template: require('./key-binding-panel.html'), |
| 34 | controllerAs: 'vm', |
| 35 | controller: XosKeyBindingPanelController |
| 36 | }; |