3 var Marionette = require('backbone.marionette');
4 var appEvents = require('../../utils/appevents');
5 var platformKeys = require('../../utils/platform-keys');
6 var ModalView = require('./modal');
7 var keyboardTemplate = require('./tmpl/keyboard-view.hbs');
9 var View = Marionette.ItemView.extend({
10 template: keyboardTemplate,
12 initialize: function() {
13 this.listenTo(this, 'menuItemClicked', this.menuItemClicked);
16 menuItemClicked: function(button) {
18 case 'showMarkdownHelp':
20 window.location.hash = '#markdown';
29 serializeData: function() {
31 cmdKey: platformKeys.cmd,
32 gitterKey: platformKeys.gitter
37 module.exports = ModalView.extend({
38 initialize: function(options) {
39 options.title = 'Keyboard Shortcuts';
40 ModalView.prototype.initialize.apply(this, arguments);
41 this.view = new View({});
42 this.listenTo(this, 'hide', function() {
43 appEvents.trigger('help.close');
48 action: 'showMarkdownHelp',
49 text: 'Markdown Help (' + platformKeys.cmd + ' + ' + platformKeys.gitter + ' + m)',
50 className: 'modal--default__footer__btn'