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
Léo-Paul Géneau
gitlab-ce
Commits
0acbc1b7
Commit
0acbc1b7
authored
Feb 01, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $.ajax in project.js
parent
9e239f30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
app/assets/javascripts/pages/projects/project.js
app/assets/javascripts/pages/projects/project.js
+10
-9
No files found.
app/assets/javascripts/pages/projects/project.js
View file @
0acbc1b7
/* eslint-disable func-names, space-before-function-paren, no-var, consistent-return, no-new, prefer-arrow-callback, no-return-assign, one-var, one-var-declaration-per-line, object-shorthand, no-else-return, newline-per-chained-call, no-shadow, vars-on-top, prefer-template, max-len */
/* eslint-disable func-names, space-before-function-paren, no-var, consistent-return, no-new, prefer-arrow-callback, no-return-assign, one-var, one-var-declaration-per-line, object-shorthand, no-else-return, newline-per-chained-call, no-shadow, vars-on-top, prefer-template, max-len */
import
Cookies
from
'
js-cookie
'
;
import
Cookies
from
'
js-cookie
'
;
import
{
visitUrl
}
from
'
../../lib/utils/url_utility
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
flash
from
'
~/flash
'
;
import
projectSelect
from
'
../../project_select
'
;
import
projectSelect
from
'
../../project_select
'
;
export
default
class
Project
{
export
default
class
Project
{
...
@@ -67,17 +70,15 @@ export default class Project {
...
@@ -67,17 +70,15 @@ export default class Project {
$dropdown
=
$
(
this
);
$dropdown
=
$
(
this
);
selected
=
$dropdown
.
data
(
'
selected
'
);
selected
=
$dropdown
.
data
(
'
selected
'
);
return
$dropdown
.
glDropdown
({
return
$dropdown
.
glDropdown
({
data
:
function
(
term
,
callback
)
{
data
(
term
,
callback
)
{
return
$
.
ajax
({
axios
.
get
(
$dropdown
.
data
(
'
refs-url
'
),
{
url
:
$dropdown
.
data
(
'
refs-url
'
),
params
:
{
data
:
{
ref
:
$dropdown
.
data
(
'
ref
'
),
ref
:
$dropdown
.
data
(
'
ref
'
),
search
:
term
,
search
:
term
,
},
},
dataType
:
'
json
'
,
})
}).
done
(
function
(
refs
)
{
.
then
(({
data
})
=>
callback
(
data
))
return
callback
(
refs
);
.
catch
(()
=>
flash
(
__
(
'
An error occurred while getting projects
'
)));
});
},
},
selectable
:
true
,
selectable
:
true
,
filterable
:
true
,
filterable
:
true
,
...
...
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