Scroll to awards after adding emoji-award comment

This makes it more intuitive, as user can see that something actually
happened after adding emoji-only comment in long discussions.
This commit is contained in:
Grzegorz Bizon 2015-12-02 09:36:11 +01:00
parent ba08811d07
commit c92b6e66dc
2 changed files with 7 additions and 1 deletions

View File

@ -88,4 +88,9 @@ class @AwardsHandler
callback.call()
findEmojiIcon: (emoji) ->
$(".icon[data-emoji='" + emoji + "']")
$(".icon[data-emoji='" + emoji + "']")
scrollToAwards: ->
$('body, html').animate({
scrollTop: $('.awards').offset().top - 80
}, 200)

View File

@ -122,6 +122,7 @@ class @Notes
if note.award
awards_handler.addAwardToEmojiBar(note.note, note.emoji_path)
awards_handler.scrollToAwards()
###
Check if note does not exists on page