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
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
Hide 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
Cookies
from
'
js-cookie
'
;
import
Mousetrap
from
'
mousetrap
'
;
import
Mousetrap
from
'
mousetrap
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
{
refreshCurrentPage
,
visitUrl
}
from
'
./lib/utils/url_utility
'
;
import
{
refreshCurrentPage
,
visitUrl
}
from
'
./lib/utils/url_utility
'
;
import
findAndFollowLink
from
'
./shortcuts_dashboard_navigation
'
;
import
findAndFollowLink
from
'
./shortcuts_dashboard_navigation
'
;
...
@@ -85,21 +86,21 @@ export default class Shortcuts {
...
@@ -85,21 +86,21 @@ export default class Shortcuts {
$modal
.
modal
(
'
toggle
'
);
$modal
.
modal
(
'
toggle
'
);
}
}
$
.
ajax
({
return
axios
.
get
(
gon
.
shortcuts_path
,
{
url
:
gon
.
shortcuts_path
,
responseType
:
'
text
'
,
dataType
:
'
script
'
,
}).
then
(({
data
})
=>
{
success
()
{
$
.
globalEval
(
data
);
if
(
location
&&
location
.
length
>
0
)
{
const
results
=
[];
if
(
location
&&
location
.
length
>
0
)
{
for
(
let
i
=
0
,
len
=
location
.
length
;
i
<
len
;
i
+=
1
)
{
const
results
=
[];
results
.
push
(
$
(
location
[
i
]).
show
());
for
(
let
i
=
0
,
len
=
location
.
length
;
i
<
len
;
i
+=
1
)
{
}
results
.
push
(
$
(
location
[
i
]).
show
());
return
results
;
}
}
return
results
;
}
$
(
'
.hidden-shortcut
'
).
show
();
$
(
'
.hidden-shortcut
'
).
show
();
return
$
(
'
.js-more-help-button
'
).
remove
();
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