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
5792faf4
Commit
5792faf4
authored
Jan 29, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted issuable_bulk_update_actions to axios
parent
ba96309f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
app/assets/javascripts/issuable_bulk_update_actions.js
app/assets/javascripts/issuable_bulk_update_actions.js
+4
-9
No files found.
app/assets/javascripts/issuable_bulk_update_actions.js
View file @
5792faf4
/* eslint-disable comma-dangle, quotes, consistent-return, func-names, array-callback-return, space-before-function-paren, prefer-arrow-callback, max-len, no-unused-expressions, no-sequences, no-underscore-dangle, no-unused-vars, no-param-reassign */
import
_
from
'
underscore
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
Flash
from
'
./flash
'
;
export
default
{
...
...
@@ -22,15 +23,9 @@ export default {
},
submit
()
{
const
_this
=
this
;
const
xhr
=
$
.
ajax
({
url
:
this
.
form
.
attr
(
'
action
'
),
method
:
this
.
form
.
attr
(
'
method
'
),
dataType
:
'
JSON
'
,
data
:
this
.
getFormDataAsObject
()
});
xhr
.
done
(()
=>
window
.
location
.
reload
());
xhr
.
fail
(()
=>
this
.
onFormSubmitFailure
());
axios
[
this
.
form
.
attr
(
'
method
'
)](
this
.
form
.
attr
(
'
action
'
),
this
.
getFormDataAsObject
())
.
then
(()
=>
window
.
location
.
reload
())
.
catch
(()
=>
this
.
onFormSubmitFailure
());
},
onFormSubmitFailure
()
{
...
...
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