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
2f4e352d
Commit
2f4e352d
authored
Aug 31, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limit group boards filtered search milestones and labels to groups only
parent
8dbe6800
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
...ripts/filtered_search/filtered_search_dropdown_manager.js
+4
-3
app/assets/javascripts/filtered_search/filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+6
-1
No files found.
app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
View file @
2f4e352d
...
...
@@ -2,13 +2,14 @@ import DropLab from '~/droplab/drop_lab';
import
FilteredSearchContainer
from
'
./container
'
;
class
FilteredSearchDropdownManager
{
constructor
(
baseEndpoint
=
''
,
tokenizer
,
page
)
{
constructor
(
baseEndpoint
=
''
,
tokenizer
,
page
,
isGroup
)
{
this
.
container
=
FilteredSearchContainer
.
container
;
this
.
baseEndpoint
=
baseEndpoint
.
replace
(
/
\/
$/
,
''
);
this
.
tokenizer
=
tokenizer
;
this
.
filteredSearchTokenKeys
=
gl
.
FilteredSearchTokenKeys
;
this
.
filteredSearchInput
=
this
.
container
.
querySelector
(
'
.filtered-search
'
);
this
.
page
=
page
;
this
.
groupsOnly
=
page
===
'
boards
'
&&
isGroup
;
if
(
this
.
page
===
'
issues
'
||
this
.
page
===
'
boards
'
)
{
this
.
filteredSearchTokenKeys
=
gl
.
FilteredSearchTokenKeysIssuesEE
;
...
...
@@ -47,7 +48,7 @@ class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
'
DropdownNonUser
'
,
extraArguments
:
{
endpoint
:
`
${
this
.
baseEndpoint
}
/milestones.json
?only_group_milestones=true
`
,
endpoint
:
`
${
this
.
baseEndpoint
}
/milestones.json
${
this
.
groupsOnly
?
'
?only_group_milestones=true
'
:
''
}
`
,
symbol
:
'
%
'
,
},
element
:
this
.
container
.
querySelector
(
'
#js-dropdown-milestone
'
),
...
...
@@ -56,7 +57,7 @@ class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
'
DropdownNonUser
'
,
extraArguments
:
{
endpoint
:
`
${
this
.
baseEndpoint
}
/labels.json
?only_group_labels=true
`
,
endpoint
:
`
${
this
.
baseEndpoint
}
/labels.json
${
this
.
groupsOnly
?
'
?only_group_labels=true
'
:
''
}
`
,
symbol
:
'
~
'
,
preprocessing
:
gl
.
DropdownUtils
.
duplicateLabelPreprocessing
,
},
...
...
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
2f4e352d
...
...
@@ -63,7 +63,12 @@ class FilteredSearchManager {
if
(
this
.
filteredSearchInput
)
{
this
.
tokenizer
=
gl
.
FilteredSearchTokenizer
;
this
.
dropdownManager
=
new
gl
.
FilteredSearchDropdownManager
(
this
.
filteredSearchInput
.
getAttribute
(
'
data-base-endpoint
'
)
||
''
,
this
.
tokenizer
,
this
.
page
);
this
.
dropdownManager
=
new
gl
.
FilteredSearchDropdownManager
(
this
.
filteredSearchInput
.
getAttribute
(
'
data-base-endpoint
'
)
||
''
,
this
.
tokenizer
,
this
.
page
,
Boolean
(
this
.
filteredSearchInput
.
getAttribute
(
'
data-group-id
'
)),
);
this
.
recentSearchesRoot
=
new
RecentSearchesRoot
(
this
.
recentSearchesStore
,
...
...
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