Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
d7351cff
Commit
d7351cff
authored
Mar 30, 2017
by
Filipa Lacerda
Committed by
Jacob Schatz
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse code
parent
e9025c25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
50 deletions
+15
-50
app/assets/javascripts/shortcuts_navigation.js
app/assets/javascripts/shortcuts_navigation.js
+15
-50
No files found.
app/assets/javascripts/shortcuts_navigation.js
View file @
d7351cff
/* eslint-disable func-names, space-before-function-paren, max-len, no-var, one-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 */
import
findAndFollowLink
from
'
./shortcuts_dashboard_navigation
'
;
require
(
'
./shortcuts
'
);
...
...
@@ -13,59 +14,23 @@ require('./shortcuts');
function
ShortcutsNavigation
()
{
ShortcutsNavigation
.
__super__
.
constructor
.
call
(
this
);
Mousetrap
.
bind
(
'
g p
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-project
'
);
});
Mousetrap
.
bind
(
'
g e
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-project-activity
'
);
});
Mousetrap
.
bind
(
'
g f
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-tree
'
);
});
Mousetrap
.
bind
(
'
g c
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-commits
'
);
});
Mousetrap
.
bind
(
'
g j
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-builds
'
);
});
Mousetrap
.
bind
(
'
g n
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-network
'
);
});
Mousetrap
.
bind
(
'
g d
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-repository-charts
'
);
});
Mousetrap
.
bind
(
'
g i
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-issues
'
);
});
Mousetrap
.
bind
(
'
g b
'
,
function
()
{
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-issue-boards
'
);
});
Mousetrap
.
bind
(
'
g m
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-merge_requests
'
);
});
Mousetrap
.
bind
(
'
g t
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-todos
'
);
});
Mousetrap
.
bind
(
'
g w
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-wiki
'
);
});
Mousetrap
.
bind
(
'
g s
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-snippets
'
);
});
Mousetrap
.
bind
(
'
i
'
,
function
()
{
return
ShortcutsNavigation
.
findAndFollowLink
(
'
.shortcuts-new-issue
'
);
});
Mousetrap
.
bind
(
'
g p
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-project
'
));
Mousetrap
.
bind
(
'
g e
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-project-activity
'
));
Mousetrap
.
bind
(
'
g f
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-tree
'
));
Mousetrap
.
bind
(
'
g c
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-commits
'
));
Mousetrap
.
bind
(
'
g j
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-builds
'
));
Mousetrap
.
bind
(
'
g n
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-network
'
));
Mousetrap
.
bind
(
'
g d
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-repository-charts
'
));
Mousetrap
.
bind
(
'
g i
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-issues
'
));
Mousetrap
.
bind
(
'
g b
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-issue-boards
'
));
Mousetrap
.
bind
(
'
g m
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-merge_requests
'
));
Mousetrap
.
bind
(
'
g t
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-todos
'
));
Mousetrap
.
bind
(
'
g w
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-wiki
'
));
Mousetrap
.
bind
(
'
g s
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-snippets
'
));
Mousetrap
.
bind
(
'
i
'
,
()
=>
findAndFollowLink
(
'
.shortcuts-new-issue
'
));
this
.
enabledHelp
.
push
(
'
.hidden-shortcut.project
'
);
}
ShortcutsNavigation
.
findAndFollowLink
=
function
(
selector
)
{
var
link
;
link
=
$
(
selector
).
attr
(
'
href
'
);
if
(
link
)
{
return
window
.
location
=
link
;
}
};
return
ShortcutsNavigation
;
})(
Shortcuts
);
}).
call
(
window
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment