Commit 59b34188 authored by Fatih Acet's avatar Fatih Acet 🙌 Committed by Z.J. van de Weg

Animate emoji when rendered.

parent ce572913
......@@ -126,6 +126,7 @@ class @AwardsHandler
counter.text parseInt(counter.text()) + 1
$emojiBtn.addClass 'active'
@addMeToUserList votesBlock, emoji
@animateEmoji $emojiBtn
votesBlock.removeClass 'hidden'
@createEmoji votesBlock, emoji
......@@ -242,15 +243,25 @@ class @AwardsHandler
<span class='award-control-text js-counter'>1</span>
emoji_node = $(buttonHtml)
$emojiButton = $ buttonHtml
emoji_node = $emojiButton
.insertBefore votesBlock.find '.js-award-holder:not(.js-award-action-btn)'
.find '.emoji-icon'
.data 'emoji', emoji
@animateEmoji $emojiButton
votesBlock.removeClass 'current'
animateEmoji: ($emoji) ->
className = 'pulse animated'
$emoji.addClass className
setTimeout (-> $emoji.removeClass className), 321
createEmoji: (votesBlock, emoji) ->
if $('.emoji-menu').length
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment