Commit 21ac92b8 authored by Robert Speicher's avatar 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
parents 9f03ae8c 182cc843
...@@ -61,6 +61,7 @@ v 8.4.0 (unreleased) ...@@ -61,6 +61,7 @@ v 8.4.0 (unreleased)
- Import GitHub wiki into GitLab - Import GitHub wiki into GitLab
- Add reporters ability to download and browse build artifacts (Andrew Johnson) - Add reporters ability to download and browse build artifacts (Andrew Johnson)
- Autofill referring url in message box when reporting user abuse. (Josh Frye) - 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 v 8.3.4
- Use gitlab-workhorse 0.5.4 (fixes API routing bug) - Use gitlab-workhorse 0.5.4 (fixes API routing bug)
......
...@@ -66,9 +66,14 @@ class @AwardsHandler ...@@ -66,9 +66,14 @@ class @AwardsHandler
addMeToAuthorList: (emoji) -> addMeToAuthorList: (emoji) ->
award_block = @findEmojiIcon(emoji).parent() 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") authors.push("me")
if authors.length == 1
award_block.attr("title", "me")
else
award_block.attr("title", authors.join(", ")) award_block.attr("title", authors.join(", "))
@resetTooltip(award_block) @resetTooltip(award_block)
resetTooltip: (award) -> resetTooltip: (award) ->
......
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