summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-05-31 22:32:29 +0300
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-06-06 11:10:10 +0200
commitc1e2b02e34e5038be0c39e11c3172c3375dc0734 (patch)
tree2e09b1f7f5e630a0dd7183d29475028945ce6803 /app
parent63a5402182aa9697bbd9e2d7192ef661c6d74b86 (diff)
downloadgitlab-ce-c1e2b02e34e5038be0c39e11c3172c3375dc0734.tar.gz
Added tests for award emoji feature.
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/awards_handler.coffee20
-rw-r--r--app/assets/stylesheets/pages/notes.scss2
2 files changed, 11 insertions, 11 deletions
diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee
index e01c5d68c43..4f4009e6db0 100644
--- a/app/assets/javascripts/awards_handler.coffee
+++ b/app/assets/javascripts/awards_handler.coffee
@@ -202,7 +202,7 @@ class @AwardsHandler
getAwardTooltip: ($awardBlock) ->
- return $awardBlock.attr('data-original-title') or $awardBlock.attr('data-title')
+ return $awardBlock.attr('data-original-title') or $awardBlock.attr('data-title') or ''
removeMeFromUserList: ($emojiButton, emoji) ->
@@ -222,7 +222,7 @@ class @AwardsHandler
.attr 'data-original-title', newAuthors
.attr 'data-title', newAuthors
- @resetTooltip(awardBlock)
+ @resetTooltip awardBlock
addMeToUserList: (votesBlock, emoji) ->
@@ -232,21 +232,21 @@ class @AwardsHandler
users = []
if origTitle
- users = origTitle.trim().split(', ')
+ users = origTitle.trim().split ', '
- users.push('me')
- awardBlock.attr('title', users.join(', '))
+ users.push 'me'
+ awardBlock.attr 'title', users.join ', '
- @resetTooltip(awardBlock)
+ @resetTooltip awardBlock
resetTooltip: (award) ->
- award.tooltip('destroy')
+
+ award.tooltip 'destroy'
# 'destroy' call is asynchronous and there is no appropriate callback on it, this is why we need to set timeout.
- setTimeout (->
- award.tooltip()
- ), 200
+ cb = -> award.tooltip()
+ setTimeout cb, 200
createEmoji_: (votesBlock, emoji) ->
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index 53a9d1144c8..4ebaf227279 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -122,7 +122,7 @@ ul.notes {
.note-awards {
.js-awards-block {
- padding: 2px 0;
+ padding: 2px;
margin-top: 10px;
}