mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 13:46:11 +10:00
Fix the situation where the user has named themselves "me"
Stopped looking for existing user since remove functionality is fixed.
This commit is contained in:
@@ -59,8 +59,7 @@ class @AwardsHandler
|
||||
removeMeFromAuthorList: (emoji) ->
|
||||
award_block = @findEmojiIcon(emoji).parent()
|
||||
authors = award_block.attr("data-original-title").split(", ")
|
||||
if authors.indexOf("me") != -1
|
||||
authors.splice(authors.indexOf("me"),1)
|
||||
authors.splice(authors.indexOf("me"),1)
|
||||
award_block.closest(".award").attr("data-original-title", authors.join(", "))
|
||||
@resetTooltip(award_block)
|
||||
|
||||
@@ -70,8 +69,7 @@ class @AwardsHandler
|
||||
authors = []
|
||||
if origTitle
|
||||
authors = origTitle.split(', ')
|
||||
if authors.indexOf("me") == -1
|
||||
authors.push("me")
|
||||
authors.push("me")
|
||||
award_block.attr("title", authors.join(", "))
|
||||
@resetTooltip(award_block)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user