BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bac9bb18
Commit
bac9bb18
authored
Mar 01, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ee-3727-epic-labels-backport' into 'master'
CE Platform port for EE epics filtered search changes See merge request gitlab-org/gitlab-ce!17445
parents
2c4f5d30
add8a308
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
15 deletions
+62
-15
filtered_search_boards.js
app/assets/javascripts/boards/filtered_search_boards.js
+3
-1
filtered_search_dropdown_manager.js
...ripts/filtered_search/filtered_search_dropdown_manager.js
+24
-3
filtered_search_manager.js
...ts/javascripts/filtered_search/filtered_search_manager.js
+12
-8
init_filtered_search.js
app/assets/javascripts/pages/search/init_filtered_search.js
+14
-2
date_picker.vue
...javascripts/vue_shared/components/sidebar/date_picker.vue
+9
-1
No files found.
app/assets/javascripts/boards/filtered_search_boards.js
View file @
bac9bb18
...
...
@@ -4,7 +4,9 @@ import FilteredSearchManager from '../filtered_search/filtered_search_manager';
export
default
class
FilteredSearchBoards
extends
FilteredSearchManager
{
constructor
(
store
,
updateUrl
=
false
,
cantEdit
=
[])
{
super
(
'boards'
);
super
({
page
:
'boards'
,
});
this
.
store
=
store
;
this
.
updateUrl
=
updateUrl
;
...
...
app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
View file @
bac9bb18
...
...
@@ -10,13 +10,22 @@ import DropdownUser from './dropdown_user';
import
FilteredSearchVisualTokens
from
'./filtered_search_visual_tokens'
;
export
default
class
FilteredSearchDropdownManager
{
constructor
(
baseEndpoint
=
''
,
tokenizer
,
page
,
isGroup
,
filteredSearchTokenKeys
)
{
constructor
({
baseEndpoint
=
''
,
tokenizer
,
page
,
isGroup
,
isGroupAncestor
,
filteredSearchTokenKeys
,
})
{
this
.
container
=
FilteredSearchContainer
.
container
;
this
.
baseEndpoint
=
baseEndpoint
.
replace
(
/
\/
$/
,
''
);
this
.
tokenizer
=
tokenizer
;
this
.
filteredSearchTokenKeys
=
filteredSearchTokenKeys
||
FilteredSearchTokenKeys
;
this
.
filteredSearchInput
=
this
.
container
.
querySelector
(
'.filtered-search'
);
this
.
page
=
page
;
this
.
groupsOnly
=
isGroup
;
this
.
groupAncestor
=
isGroupAncestor
;
this
.
setupMapping
();
...
...
@@ -59,7 +68,7 @@ export default class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
DropdownNonUser
,
extraArguments
:
{
endpoint
:
`
${
this
.
baseEndpoint
}
/milestones.json`
,
endpoint
:
this
.
getMilestoneEndpoint
()
,
symbol
:
'%'
,
},
element
:
this
.
container
.
querySelector
(
'#js-dropdown-milestone'
),
...
...
@@ -68,7 +77,7 @@ export default class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
DropdownNonUser
,
extraArguments
:
{
endpoint
:
`
${
this
.
baseEndpoint
}
/labels.json`
,
endpoint
:
this
.
getLabelsEndpoint
()
,
symbol
:
'~'
,
preprocessing
:
DropdownUtils
.
duplicateLabelPreprocessing
,
},
...
...
@@ -90,6 +99,18 @@ export default class FilteredSearchDropdownManager {
this
.
mapping
=
allowedMappings
;
}
getMilestoneEndpoint
()
{
const
endpoint
=
`
${
this
.
baseEndpoint
}
/milestones.json`
;
return
endpoint
;
}
getLabelsEndpoint
()
{
const
endpoint
=
`
${
this
.
baseEndpoint
}
/labels.json`
;
return
endpoint
;
}
static
addWordToInput
(
tokenName
,
tokenValue
=
''
,
clicked
=
false
)
{
const
input
=
FilteredSearchContainer
.
container
.
querySelector
(
'.filtered-search'
);
...
...
app/assets/javascripts/filtered_search/filtered_search_manager.js
View file @
bac9bb18
...
...
@@ -20,10 +20,13 @@ import DropdownUtils from './dropdown_utils';
export
default
class
FilteredSearchManager
{
constructor
({
page
,
isGroup
=
false
,
isGroupAncestor
=
false
,
filteredSearchTokenKeys
=
FilteredSearchTokenKeys
,
stateFiltersSelector
=
'.issues-state-filters'
,
})
{
this
.
isGroup
=
false
;
this
.
isGroup
=
isGroup
;
this
.
isGroupAncestor
=
isGroupAncestor
;
this
.
states
=
[
'opened'
,
'closed'
,
'merged'
,
'all'
];
this
.
page
=
page
;
...
...
@@ -75,13 +78,14 @@ export default class FilteredSearchManager {
if
(
this
.
filteredSearchInput
)
{
this
.
tokenizer
=
FilteredSearchTokenizer
;
this
.
dropdownManager
=
new
FilteredSearchDropdownManager
(
this
.
filteredSearchInput
.
getAttribute
(
'data-base-endpoint'
)
||
''
,
this
.
tokenizer
,
this
.
page
,
this
.
isGroup
,
this
.
filteredSearchTokenKeys
,
);
this
.
dropdownManager
=
new
FilteredSearchDropdownManager
({
baseEndpoint
:
this
.
filteredSearchInput
.
getAttribute
(
'data-base-endpoint'
)
||
''
,
tokenizer
:
this
.
tokenizer
,
page
:
this
.
page
,
isGroup
:
this
.
isGroup
,
isGroupAncestor
:
this
.
isGroupAncestor
,
filteredSearchTokenKeys
:
this
.
filteredSearchTokenKeys
,
});
this
.
recentSearchesRoot
=
new
RecentSearchesRoot
(
this
.
recentSearchesStore
,
...
...
app/assets/javascripts/pages/search/init_filtered_search.js
View file @
bac9bb18
import
FilteredSearchManager
from
'~/filtered_search/filtered_search_manager'
;
export
default
({
page
})
=>
{
export
default
({
page
,
filteredSearchTokenKeys
,
isGroup
,
isGroupAncestor
,
stateFiltersSelector
,
})
=>
{
const
filteredSearchEnabled
=
FilteredSearchManager
&&
document
.
querySelector
(
'.filtered-search'
);
if
(
filteredSearchEnabled
)
{
const
filteredSearchManager
=
new
FilteredSearchManager
({
page
});
const
filteredSearchManager
=
new
FilteredSearchManager
({
page
,
isGroup
,
isGroupAncestor
,
filteredSearchTokenKeys
,
stateFiltersSelector
,
});
filteredSearchManager
.
setup
();
}
};
app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue
View file @
bac9bb18
...
...
@@ -14,6 +14,11 @@
collapsedCalendarIcon
,
},
props
:
{
blockClass
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
collapsed
:
{
type
:
Boolean
,
required
:
false
,
...
...
@@ -91,7 +96,10 @@
</
script
>
<
template
>
<div
class=
"block"
>
<div
class=
"block"
:class=
"blockClass"
>
<div
class=
"issuable-sidebar-header"
>
<toggle-sidebar
:collapsed=
"collapsed"
...
...
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