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
3ae2d90b
Commit
3ae2d90b
authored
Jan 31, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted milestone_select.js to axios
parent
d58ff943
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
61 deletions
+58
-61
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+58
-61
No files found.
app/assets/javascripts/milestone_select.js
View file @
3ae2d90b
...
...
@@ -2,6 +2,7 @@
/* global Issuable */
/* global ListMilestone */
import
_
from
'
underscore
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
{
timeFor
}
from
'
./lib/utils/datetime_utility
'
;
export
default
class
MilestoneSelect
{
...
...
@@ -52,9 +53,8 @@ export default class MilestoneSelect {
}
return
$dropdown
.
glDropdown
({
showMenuAbove
:
showMenuAbove
,
data
:
(
term
,
callback
)
=>
$
.
ajax
({
url
:
milestonesUrl
}).
done
((
data
)
=>
{
data
:
(
term
,
callback
)
=>
axios
.
get
(
milestonesUrl
)
.
then
(({
data
})
=>
{
const
extraOptions
=
[];
if
(
showAny
)
{
extraOptions
.
push
({
...
...
@@ -200,11 +200,8 @@ export default class MilestoneSelect {
data
[
abilityName
].
milestone_id
=
selected
!=
null
?
selected
:
null
;
$loading
.
removeClass
(
'
hidden
'
).
fadeIn
();
$dropdown
.
trigger
(
'
loading.gl.dropdown
'
);
return
$
.
ajax
({
type
:
'
PUT
'
,
url
:
issueUpdateURL
,
data
:
data
}).
done
((
data
)
=>
{
return
axios
.
put
(
issueUpdateURL
,
data
)
.
then
(({
data
})
=>
{
$dropdown
.
trigger
(
'
loaded.gl.dropdown
'
);
$loading
.
fadeOut
();
$selectBox
.
hide
();
...
...
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