BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c7b9bba5
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
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,21 +86,21 @@ export default class Shortcuts {
$modal
.
modal
(
'toggle'
);
}
$
.
ajax
({
url
:
gon
.
shortcuts_path
,
dataType
:
'script'
,
success
()
{
if
(
location
&&
location
.
length
>
0
)
{
const
results
=
[];
for
(
let
i
=
0
,
len
=
location
.
length
;
i
<
len
;
i
+=
1
)
{
results
.
push
(
$
(
location
[
i
]).
show
());
}
return
results
;
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
)
{
results
.
push
(
$
(
location
[
i
]).
show
());
}
return
results
;
}
$
(
'.hidden-shortcut'
).
show
();
return
$
(
'.js-more-help-button'
).
remove
();
},
$
(
'.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