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
3c0aa44f
Commit
3c0aa44f
authored
Jan 29, 2018
by
Clement Ho
Committed by
Fatih Acet
Jan 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace $.post in awards handler with axios
parent
a5a91d7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+8
-4
No files found.
app/assets/javascripts/awards_handler.js
View file @
3c0aa44f
/* eslint-disable class-methods-use-this */
import
_
from
'
underscore
'
;
import
Cookies
from
'
js-cookie
'
;
import
{
s__
}
from
'
./locale
'
;
import
{
isInIssuePage
,
updateTooltipTitle
}
from
'
./lib/utils/common_utils
'
;
import
Flash
from
'
./flash
'
;
import
flash
from
'
./flash
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
transitionEndEventString
=
'
transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd
'
;
...
...
@@ -441,13 +443,15 @@ class AwardsHandler {
if
(
this
.
isUserAuthored
(
$emojiButton
))
{
this
.
userAuthored
(
$emojiButton
);
}
else
{
$
.
post
(
awardUrl
,
{
axios
.
post
(
awardUrl
,
{
name
:
emoji
,
},
(
data
)
=>
{
})
.
then
(({
data
})
=>
{
if
(
data
.
ok
)
{
callback
();
}
}).
fail
(()
=>
new
Flash
(
'
Something went wrong on our end.
'
));
})
.
catch
(()
=>
flash
(
s__
(
'
Something went wrong on our end.
'
)));
}
}
...
...
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