diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-19 15:58:20 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-05-26 10:04:17 +0100 |
commit | bc0666b3c906c990c1a10efc4b0acc73281ea533 (patch) | |
tree | 45e399b429dba60cd2de1a8c4d0d87baf79a09f2 /app/assets | |
parent | adc64e4583dc42399f681a9b17490f98b8c4bec0 (diff) | |
download | gitlab-ce-bc0666b3c906c990c1a10efc4b0acc73281ea533.tar.gz |
Filter issuables by any user
Closes #2836
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/users_select.js.coffee | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index b80b1b861cc..49d0320701e 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -93,7 +93,9 @@ class @UsersSelect $dropdown.glDropdown( data: (term, callback) => - @users term, (users) => + isAuthorFilter = $('.js-author-search') + + @users term, term is '' and isAuthorFilter, (users) => if term.length is 0 showDivider = 0 @@ -138,7 +140,7 @@ class @UsersSelect toggleLabel: (selected) -> if selected && 'id' of selected - selected.name + if selected.text then selected.text else selected.name else defaultLabel @@ -219,7 +221,7 @@ class @UsersSelect multiple: $(select).hasClass('multiselect') minimumInputLength: 0 query: (query) => - @users query.term, (users) => + @users query.term, false, (users) => data = { results: users } if query.term.length == 0 @@ -302,7 +304,7 @@ class @UsersSelect # Return users list. Filtered by query # Only active users retrieved - users: (query, callback) => + users: (query, fromProject, callback) => url = @buildUrl(@usersPath) $.ajax( @@ -311,7 +313,7 @@ class @UsersSelect search: query per_page: 20 active: true - project_id: @projectId + project_id: @projectId if fromProject group_id: @groupId current_user: @showCurrentUser author_id: @authorId |