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 markdownTemplate = require('./tmpl/markdown-view.hbs');
9 var View = Marionette.ItemView.extend({
10 template: markdownTemplate,
12 initialize: function() {
13 this.listenTo(this, 'menuItemClicked', this.menuItemClicked);
16 menuItemClicked: function(button) {
18 case 'showKeyboardShortcuts':
20 window.location.hash = '#keys';
30 module.exports = ModalView.extend({
31 initialize: function(options) {
32 options.title = 'Markdown Help';
33 ModalView.prototype.initialize.apply(this, arguments);
34 this.view = new View({});
35 this.listenTo(this, 'hide', function() {
36 appEvents.trigger('help.close');
41 action: 'showKeyboardShortcuts',
42 text: 'Keyboard shortcuts (' + platformKeys.cmd + ' + ' + platformKeys.gitter + ' + k)',
43 className: 'modal--default__footer__btn'