69e4072f89
* master: (389 commits)
Document "No gems fetched from git repositories" policy [ci skip]
Typos
Small gramatical tweaks
Typos
Added PHP & NPM doc
Use `:empty_project` where possible in request specs
Add caching of droplab ajax requests
Use `:empty_project` where possible in model specs
Revert 3f17f29a
Remove unused js response from refs controller
Add MR id to changelog entry
fixed small mini pipeline graph line glitch
Prevent form to be submitted twice
Fix Error 500 when repositories contain annotated tags pointing to blobs
Fix /explore sorting (trending)
Simplify wording in "adding an image" docs
Remove "official merge window" from CONTRIBUTING.md [ci skip]
Update repository check documentation
Fixed flexbox and wrap issues
Update two_factor_authentication.md
...
40 lines
1.7 KiB
JavaScript
40 lines
1.7 KiB
JavaScript
/* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, prefer-arrow-callback, consistent-return, no-return-assign */
|
|
/* global Mousetrap */
|
|
/* global Shortcuts */
|
|
|
|
require('./shortcuts');
|
|
|
|
(function() {
|
|
var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
|
hasProp = {}.hasOwnProperty;
|
|
|
|
this.ShortcutsDashboardNavigation = (function(superClass) {
|
|
extend(ShortcutsDashboardNavigation, superClass);
|
|
|
|
function ShortcutsDashboardNavigation() {
|
|
ShortcutsDashboardNavigation.__super__.constructor.call(this);
|
|
Mousetrap.bind('g a', function() {
|
|
return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-activity');
|
|
});
|
|
Mousetrap.bind('g i', function() {
|
|
return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-issues');
|
|
});
|
|
Mousetrap.bind('g m', function() {
|
|
return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-merge_requests');
|
|
});
|
|
Mousetrap.bind('g p', function() {
|
|
return ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-projects');
|
|
});
|
|
}
|
|
|
|
ShortcutsDashboardNavigation.findAndFollowLink = function(selector) {
|
|
var link;
|
|
link = $(selector).attr('href');
|
|
if (link) {
|
|
return window.location = link;
|
|
}
|
|
};
|
|
|
|
return ShortcutsDashboardNavigation;
|
|
})(Shortcuts);
|
|
}).call(this);
|