Commit 6d558174 authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'remove-leading-comma-award-emoji' into 'master'

Remove leading comma when user is the only one to award that emoji

Fixes #9073

See merge request !2450
parent 928303ce
......@@ -59,6 +59,7 @@ v 8.4.0 (unreleased)
- Import GitHub wiki into GitLab
- Add reporters ability to download and browse build artifacts (Andrew Johnson)
- Autofill referring url in message box when reporting user abuse. (Josh Frye)
- Remove leading comma on award emoji when the user is the first to award the emoji (Zeger-Jan van de Weg)
v 8.3.4
- Use gitlab-workhorse 0.5.4 (fixes API routing bug)
......
......@@ -19,7 +19,7 @@ class @AwardsHandler
@addAwardToEmojiBar(emoji)
$(".emoji-menu").hide()
addAwardToEmojiBar: (emoji) ->
@addEmojiToFrequentlyUsedList(emoji)
......@@ -66,9 +66,14 @@ class @AwardsHandler
addMeToAuthorList: (emoji) ->
award_block = @findEmojiIcon(emoji).parent()
authors = award_block.attr("data-original-title").split(", ")
authors = _.compact(award_block.attr("data-original-title").split(", "))
authors.push("me")
award_block.attr("title", authors.join(", "))
if authors.length == 1
award_block.attr("title", "me")
else
award_block.attr("title", authors.join(", "))
@resetTooltip(award_block)
resetTooltip: (award) ->
......@@ -78,7 +83,7 @@ class @AwardsHandler
setTimeout (->
award.tooltip()
), 200
createEmoji: (emoji) ->
emojiCssClass = @resolveNameToCssClass(emoji)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment