diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-02 14:11:32 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-02 14:15:08 +0100 |
commit | af541515fa49756d4d23719029648276ed6c2f5b (patch) | |
tree | 7c096a67e599bee8c6e942ab5ff2c822f8b44bc5 /app/assets/javascripts/users_select.js.coffee | |
parent | f385988d1648e54218d68e02a25eaad048b04d0b (diff) | |
download | gitlab-ce-af541515fa49756d4d23719029648276ed6c2f5b.tar.gz |
Remove "none" username for "Unassigned" and "Any User" select options
Diffstat (limited to 'app/assets/javascripts/users_select.js.coffee')
-rw-r--r-- | app/assets/javascripts/users_select.js.coffee | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index f5db74d84e7..12abf806bfa 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -32,17 +32,15 @@ class @UsersSelect if showNullUser nullUser = { name: 'Unassigned', - avatar: null, - username: 'none', id: 0 } data.results.unshift(nullUser) if showAnyUser + name = showAnyUser + name = 'Any User' if name == true anyUser = { - name: 'Any', - avatar: null, - username: 'none', + name: name, id: null } data.results.unshift(anyUser) @@ -50,7 +48,6 @@ class @UsersSelect if showEmailUser && data.results.length == 0 && query.term.match(/^[^@]+@[^@]+$/) emailUser = { name: "Invite \"#{query.term}\"", - avatar: null, username: query.term, id: query.term } @@ -82,10 +79,10 @@ class @UsersSelect else avatar = gon.default_avatar_url - "<div class='user-result'> + "<div class='user-result #{'no-username' unless user.username}'> <div class='user-image'><img class='avatar s24' src='#{avatar}'></div> <div class='user-name'>#{user.name}</div> - <div class='user-username'>#{user.username}</div> + <div class='user-username'>#{user.username || ""}</div> </div>" formatSelection: (user) -> |