Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Tang <dtang@gitlab.com>2018-11-27 19:52:58 +0300
committerRubén Dávila <ruben@gitlab.com>2018-11-28 01:23:14 +0300
commit7bf26235347975d1f450a2da01943a10d8e9f856 (patch)
tree1951ee83626d6dc9259767a1c42495eeb61c5ae6 /app/assets/javascripts/groups_select.js
parent55f6eadc1d75c7c6d2c3413d43feea36f198dfcb (diff)
Backport: Callout CSS, group edit selection JS
Diffstat (limited to 'app/assets/javascripts/groups_select.js')
-rw-r--r--app/assets/javascripts/groups_select.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/groups_select.js b/app/assets/javascripts/groups_select.js
index b4a3037c1b7..2049760fe29 100644
--- a/app/assets/javascripts/groups_select.js
+++ b/app/assets/javascripts/groups_select.js
@@ -10,13 +10,18 @@ export default function groupsSelect() {
const $select = $(this);
const allAvailable = $select.data('allAvailable');
const skipGroups = $select.data('skipGroups') || [];
+ const parentGroupID = $select.data('parentId');
+ const groupsPath = parentGroupID
+ ? Api.subgroupsPath.replace(':id', parentGroupID)
+ : Api.groupsPath;
+
$select.select2({
placeholder: 'Search for a group',
allowClear: $select.hasClass('allowClear'),
multiple: $select.hasClass('multiselect'),
minimumInputLength: 0,
ajax: {
- url: Api.buildUrl(Api.groupsPath),
+ url: Api.buildUrl(groupsPath),
dataType: 'json',
quietMillis: 250,
transport(params) {