Commit 4306c0b4 authored by geoandri's avatar geoandri Committed by George Andrinopoulos

Refactor shortcuts_wiki.js

parent 3c2596f7
...@@ -35,7 +35,6 @@ import './shortcuts_navigation'; ...@@ -35,7 +35,6 @@ import './shortcuts_navigation';
import './shortcuts_find_file'; import './shortcuts_find_file';
import './shortcuts_issuable'; import './shortcuts_issuable';
import './shortcuts_network'; import './shortcuts_network';
import './shortcuts_wiki';
// behaviors // behaviors
import './behaviors/'; import './behaviors/';
......
/* eslint-disable class-methods-use-this */
/* global Mousetrap */ /* global Mousetrap */
/* global ShortcutsNavigation */ /* global ShortcutsNavigation */
import findAndFollowLink from './shortcuts_dashboard_navigation';
export default class ShortcutsWiki extends ShortcutsNavigation { export default class ShortcutsWiki extends ShortcutsNavigation {
constructor() { constructor() {
super(); super();
this.$wikiEdit = $('.wiki-edit'); Mousetrap.bind('e', this.editWiki);
Mousetrap.bind('e', this.editWiki.bind(this));
} }
editWiki() { editWiki() {
gl.utils.visitUrl(this.$wikiEdit.attr('href')); findAndFollowLink('.wiki-edit');
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment