mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 22:59:19 +10:00
Fix Assignee selector when 'Unassigned' #2831
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Please view this file on the master branch, on stable branches it's out of date.
|
||||
|
||||
v 8.3.0 (unreleased)
|
||||
- Fix: Assignee selector is empty when 'Unassigned' is selected (Jose Corcuera)
|
||||
|
||||
v 8.2.0
|
||||
- Improved performance of finding projects and groups in various places
|
||||
|
||||
@@ -58,11 +58,8 @@ class @UsersSelect
|
||||
|
||||
query.callback(data)
|
||||
|
||||
initSelection: (element, callback) =>
|
||||
id = $(element).val()
|
||||
if id != "" && id != "0"
|
||||
@user(id, callback)
|
||||
|
||||
initSelection: (args...) =>
|
||||
@initSelection(args...)
|
||||
formatResult: (args...) =>
|
||||
@formatResult(args...)
|
||||
formatSelection: (args...) =>
|
||||
@@ -71,6 +68,14 @@ class @UsersSelect
|
||||
escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results
|
||||
m
|
||||
|
||||
initSelection: (element, callback) ->
|
||||
id = $(element).val()
|
||||
if id == "0"
|
||||
nullUser = { name: 'Unassigned' }
|
||||
callback(nullUser)
|
||||
else if id != ""
|
||||
@user(id, callback)
|
||||
|
||||
formatResult: (user) ->
|
||||
if user.avatar_url
|
||||
avatar = user.avatar_url
|
||||
|
||||
Reference in New Issue
Block a user