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
8d83e517
Commit
8d83e517
authored
Feb 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted task_list.js to use axios
parent
c7b9bba5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
app/assets/javascripts/task_list.js
app/assets/javascripts/task_list.js
+5
-7
No files found.
app/assets/javascripts/task_list.js
View file @
8d83e517
import
'
deckar01-task_list
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
Flash
from
'
./flash
'
;
export
default
class
TaskList
{
...
...
@@ -38,12 +39,9 @@ export default class TaskList {
patchData
[
this
.
dataType
]
=
{
[
this
.
fieldName
]:
$target
.
val
(),
};
return
$
.
ajax
({
type
:
'
PATCH
'
,
url
:
$target
.
data
(
'
update-url
'
)
||
$
(
'
form.js-issuable-update
'
).
attr
(
'
action
'
),
data
:
patchData
,
success
:
this
.
onSuccess
,
error
:
this
.
onError
,
});
return
axios
.
patch
(
$target
.
data
(
'
update-url
'
)
||
$
(
'
form.js-issuable-update
'
).
attr
(
'
action
'
),
patchData
)
.
then
(({
data
})
=>
this
.
onSuccess
(
data
))
.
catch
(()
=>
this
.
onError
());
}
}
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