Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0465cd31
Commit
0465cd31
authored
Sep 12, 2019
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update all uses of gl_dropdown to use objects
Update explicit headers to new format
parent
4b01f494
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
16 deletions
+24
-16
app/assets/javascripts/groups/transfer_dropdown.js
app/assets/javascripts/groups/transfer_dropdown.js
+1
-1
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+1
-1
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+1
-1
app/assets/javascripts/namespace_select.js
app/assets/javascripts/namespace_select.js
+1
-1
app/assets/javascripts/pages/search/show/search.js
app/assets/javascripts/pages/search/show/search.js
+2
-2
app/assets/javascripts/search_autocomplete.js
app/assets/javascripts/search_autocomplete.js
+6
-4
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+4
-3
ee/app/assets/javascripts/pages/admin/application_settings/ci_cd/ci_template.js
...pts/pages/admin/application_settings/ci_cd/ci_template.js
+3
-1
ee/app/assets/javascripts/projects/settings/access_dropdown.js
...p/assets/javascripts/projects/settings/access_dropdown.js
+5
-2
No files found.
app/assets/javascripts/groups/transfer_dropdown.js
View file @
0465cd31
...
...
@@ -14,7 +14,7 @@ export default class TransferDropdown {
}
buildDropdown
()
{
const
extraOptions
=
[{
id
:
'
-1
'
,
text
:
__
(
'
No parent group
'
)
},
'
divider
'
];
const
extraOptions
=
[{
id
:
'
-1
'
,
text
:
__
(
'
No parent group
'
)
},
{
type
:
'
divider
'
}
];
this
.
groupDropdown
.
glDropdown
({
selectable
:
true
,
...
...
app/assets/javascripts/labels_select.js
View file @
0465cd31
...
...
@@ -231,7 +231,7 @@ export default class LabelsSelect {
});
}
if
(
extraData
.
length
)
{
extraData
.
push
(
'
divider
'
);
extraData
.
push
(
{
type
:
'
divider
'
}
);
data
=
extraData
.
concat
(
data
);
}
}
...
...
app/assets/javascripts/milestone_select.js
View file @
0465cd31
...
...
@@ -100,7 +100,7 @@ export default class MilestoneSelect {
});
}
if
(
extraOptions
.
length
)
{
extraOptions
.
push
(
'
divider
'
);
extraOptions
.
push
(
{
type
:
'
divider
'
}
);
}
callback
(
extraOptions
.
concat
(
data
));
...
...
app/assets/javascripts/namespace_select.js
View file @
0465cd31
...
...
@@ -34,7 +34,7 @@ export default class NamespaceSelect {
id
:
null
,
};
namespaces
.
unshift
(
anyNamespace
);
namespaces
.
splice
(
1
,
0
,
'
divider
'
);
namespaces
.
splice
(
1
,
0
,
{
type
:
'
divider
'
}
);
}
return
dataCallback
(
namespaces
);
});
...
...
app/assets/javascripts/pages/search/show/search.js
View file @
0465cd31
...
...
@@ -30,7 +30,7 @@ export default class Search {
data
.
unshift
({
full_name
:
__
(
'
Any
'
),
});
data
.
splice
(
1
,
0
,
'
divider
'
);
data
.
splice
(
1
,
0
,
{
type
:
'
divider
'
}
);
return
callback
(
data
);
});
},
...
...
@@ -57,7 +57,7 @@ export default class Search {
data
.
unshift
({
name_with_namespace
:
__
(
'
Any
'
),
});
data
.
splice
(
1
,
0
,
'
divider
'
);
data
.
splice
(
1
,
0
,
{
type
:
'
divider
'
}
);
return
data
;
})
...
...
app/assets/javascripts/search_autocomplete.js
View file @
0465cd31
...
...
@@ -191,13 +191,14 @@ export class SearchAutocomplete {
// Add group header before list each group
if
(
lastCategory
!==
suggestion
.
category
)
{
if
(
!
firstCategory
)
{
data
.
push
(
'
separator
'
);
data
.
push
(
{
type
:
'
separator
'
}
);
}
if
(
firstCategory
)
{
firstCategory
=
false
;
}
data
.
push
({
header
:
suggestion
.
category
,
type
:
'
header
'
,
content
:
suggestion
.
category
,
});
lastCategory
=
suggestion
.
category
;
}
...
...
@@ -221,7 +222,7 @@ export class SearchAutocomplete {
template
=
s__
(
'
SearchAutocomplete|in this group
'
);
}
data
.
unshift
(
'
separator
'
);
data
.
unshift
(
{
type
:
'
separator
'
}
);
data
.
unshift
({
icon
,
text
:
term
,
...
...
@@ -271,7 +272,8 @@ export class SearchAutocomplete {
if
(
name
)
{
baseItems
.
push
({
header
:
`
${
name
}
`
,
type
:
'
header
'
,
content
:
`
${
name
}
`
,
});
}
...
...
app/assets/javascripts/users_select.js
View file @
0465cd31
...
...
@@ -333,7 +333,7 @@ function UsersSelect(currentUser, els, options = {}) {
}
if
(
showDivider
)
{
users
.
splice
(
showDivider
,
0
,
'
divider
'
);
users
.
splice
(
showDivider
,
0
,
{
type
:
'
divider
'
}
);
}
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
...
...
@@ -343,7 +343,8 @@ function UsersSelect(currentUser, els, options = {}) {
if
(
$dropdown
.
data
(
'
dropdownHeader
'
))
{
showDivider
+=
1
;
users
.
splice
(
showDivider
,
0
,
{
header
:
$dropdown
.
data
(
'
dropdownHeader
'
),
type
:
'
header
'
,
content
:
$dropdown
.
data
(
'
dropdownHeader
'
),
});
}
...
...
@@ -358,7 +359,7 @@ function UsersSelect(currentUser, els, options = {}) {
users
.
splice
(
showDivider
,
0
,
selectedUser
);
});
users
.
splice
(
showDivider
+
1
,
0
,
'
divider
'
);
users
.
splice
(
showDivider
+
1
,
0
,
{
type
:
'
divider
'
}
);
}
}
}
...
...
ee/app/assets/javascripts/pages/admin/application_settings/ci_cd/ci_template.js
View file @
0465cd31
...
...
@@ -33,7 +33,9 @@ export default class CiTemplate {
name
:
__
(
'
No required pipeline
'
),
id
:
null
,
},
'
divider
'
,
{
type
:
'
divider
'
,
},
],
...
this
.
$dropdown
.
data
(
'
data
'
),
};
...
...
ee/app/assets/javascripts/projects/settings/access_dropdown.js
View file @
0465cd31
...
...
@@ -369,12 +369,15 @@ export default class AccessDropdown {
});
if
(
roles
.
length
)
{
consolidatedData
=
consolidatedData
.
concat
([{
type
:
'
header
'
,
content
:
s__
(
'
AccessDropdown|Roles
'
)
}],
roles
);
consolidatedData
=
consolidatedData
.
concat
(
[{
type
:
'
header
'
,
content
:
s__
(
'
AccessDropdown|Roles
'
)
}],
roles
,
);
}
if
(
groups
.
length
)
{
if
(
roles
.
length
)
{
consolidatedData
=
consolidatedData
.
concat
([
'
divider
'
]);
consolidatedData
=
consolidatedData
.
concat
([
{
type
:
'
divider
'
}
]);
}
consolidatedData
=
consolidatedData
.
concat
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment