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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c7b9bba5
Commit
c7b9bba5
authored
Feb 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted shortcuts.js to use axios
parent
015e15f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
app/assets/javascripts/shortcuts.js
app/assets/javascripts/shortcuts.js
+14
-13
No files found.
app/assets/javascripts/shortcuts.js
View file @
c7b9bba5
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
'
;
...
...
@@ -85,10 +86,11 @@ export default class Shortcuts {
$modal
.
modal
(
'
toggle
'
);
}
$
.
ajax
({
url
:
gon
.
shortcuts_path
,
dataType
:
'
script
'
,
success
()
{
return
axios
.
get
(
gon
.
shortcuts_path
,
{
responseType
:
'
text
'
,
}).
then
(({
data
})
=>
{
$
.
globalEval
(
data
);
if
(
location
&&
location
.
length
>
0
)
{
const
results
=
[];
for
(
let
i
=
0
,
len
=
location
.
length
;
i
<
len
;
i
+=
1
)
{
...
...
@@ -99,7 +101,6 @@ export default class Shortcuts {
$
(
'
.hidden-shortcut
'
).
show
();
return
$
(
'
.js-more-help-button
'
).
remove
();
},
});
}
...
...
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