diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-10-30 12:10:09 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-10-30 12:10:09 +0300 |
commit | cd784a80d7c779edc468d6255ffdeb8ea692661a (patch) | |
tree | db32f323b5aa0af3fcba743e1b871991d41b97d2 /app/assets/javascripts/users_select.js | |
parent | 192049a61039220bb62e88d1d173d0aeaa555297 (diff) |
[CE backport] Saved configuration for issue board
Diffstat (limited to 'app/assets/javascripts/users_select.js')
-rw-r--r-- | app/assets/javascripts/users_select.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js index a0883b32593..759cc9925f4 100644 --- a/app/assets/javascripts/users_select.js +++ b/app/assets/javascripts/users_select.js @@ -6,7 +6,7 @@ import _ from 'underscore'; // TODO: remove eventHub hack after code splitting refactor window.emitSidebarEvent = window.emitSidebarEvent || $.noop; -function UsersSelect(currentUser, els) { +function UsersSelect(currentUser, els, options = {}) { var $els; this.users = this.users.bind(this); this.user = this.user.bind(this); @@ -20,6 +20,8 @@ function UsersSelect(currentUser, els) { } } + const { handleClick } = options; + $els = $(els); if (!els) { @@ -442,6 +444,9 @@ function UsersSelect(currentUser, els) { } if ($el.closest('.add-issues-modal').length) { gl.issueBoards.ModalStore.store.filter[$dropdown.data('field-name')] = user.id; + } else if (handleClick) { + e.preventDefault(); + handleClick(user, isMarking); } else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { return Issuable.filterResults($dropdown.closest('form')); } else if ($dropdown.hasClass('js-filter-submit')) { |