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
Boxiang Sun
gitlab-ce
Commits
08c3920c
Commit
08c3920c
authored
Sep 18, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move findAndFollowLink to lib/utils
parent
df1eb4fa
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/lib/utils/navigation_utility.js
app/assets/javascripts/lib/utils/navigation_utility.js
+1
-1
app/assets/javascripts/shortcuts.js
app/assets/javascripts/shortcuts.js
+1
-1
app/assets/javascripts/shortcuts_navigation.js
app/assets/javascripts/shortcuts_navigation.js
+1
-1
app/assets/javascripts/shortcuts_wiki.js
app/assets/javascripts/shortcuts_wiki.js
+1
-1
spec/javascripts/lib/utils/navigation_utility_spec.js
spec/javascripts/lib/utils/navigation_utility_spec.js
+1
-1
No files found.
app/assets/javascripts/
shortcuts_dashboard_navigation
.js
→
app/assets/javascripts/
lib/utils/navigation_utility
.js
View file @
08c3920c
import
{
visitUrl
}
from
'
./
lib/utils/
url_utility
'
;
import
{
visitUrl
}
from
'
./url_utility
'
;
/**
* Helper function that finds the href of the fiven selector and updates the location.
...
...
app/assets/javascripts/shortcuts.js
View file @
08c3920c
...
...
@@ -3,7 +3,7 @@ import Cookies from 'js-cookie';
import
Mousetrap
from
'
mousetrap
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
{
refreshCurrentPage
,
visitUrl
}
from
'
./lib/utils/url_utility
'
;
import
findAndFollowLink
from
'
./
shortcuts_dashboard_navigation
'
;
import
findAndFollowLink
from
'
./
lib/utils/navigation_utility
'
;
const
defaultStopCallback
=
Mousetrap
.
stopCallback
;
Mousetrap
.
stopCallback
=
(
e
,
element
,
combo
)
=>
{
...
...
app/assets/javascripts/shortcuts_navigation.js
View file @
08c3920c
import
Mousetrap
from
'
mousetrap
'
;
import
findAndFollowLink
from
'
./
shortcuts_dashboard_navigation
'
;
import
findAndFollowLink
from
'
./
lib/utils/navigation_utility
'
;
import
Shortcuts
from
'
./shortcuts
'
;
export
default
class
ShortcutsNavigation
extends
Shortcuts
{
...
...
app/assets/javascripts/shortcuts_wiki.js
View file @
08c3920c
import
Mousetrap
from
'
mousetrap
'
;
import
ShortcutsNavigation
from
'
./shortcuts_navigation
'
;
import
findAndFollowLink
from
'
./
shortcuts_dashboard_navigation
'
;
import
findAndFollowLink
from
'
./
lib/utils/navigation_utility
'
;
export
default
class
ShortcutsWiki
extends
ShortcutsNavigation
{
constructor
()
{
...
...
spec/javascripts/
shortcuts_dashboard_navigation
_spec.js
→
spec/javascripts/
lib/utils/navigation_utility
_spec.js
View file @
08c3920c
import
findAndFollowLink
from
'
~/
shortcuts_dashboard_navigation
'
;
import
findAndFollowLink
from
'
~/
lib/utils/navigation_utility
'
;
describe
(
'
findAndFollowLink
'
,
()
=>
{
it
(
'
visits a link when the selector exists
'
,
()
=>
{
...
...
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