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
82f7a6a6
Commit
82f7a6a6
authored
Dec 20, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add search box to issue board switcher
parent
2e19d7fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
ee/app/assets/javascripts/boards/components/boards_selector.vue
.../assets/javascripts/boards/components/boards_selector.vue
+23
-2
ee/changelogs/unreleased/winh-board-switcher-search-ee.yml
ee/changelogs/unreleased/winh-board-switcher-search-ee.yml
+5
-0
No files found.
ee/app/assets/javascripts/boards/components/boards_selector.vue
View file @
82f7a6a6
<
script
>
import
$
from
'
jquery
'
;
import
{
throttle
}
from
'
underscore
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
,
GlSearchBox
}
from
'
@gitlab/ui
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
boardsStore
from
'
~/boards/stores/boards_store
'
;
import
BoardForm
from
'
./board_form.vue
'
;
...
...
@@ -14,6 +14,7 @@ export default {
Icon
,
BoardForm
,
GlLoadingIcon
,
GlSearchBox
,
},
props
:
{
currentBoard
:
{
...
...
@@ -79,12 +80,18 @@ export default {
contentClientHeight
:
0
,
maxPosition
:
0
,
store
:
boardsStore
,
filterTerm
:
''
,
};
},
computed
:
{
currentPage
()
{
return
this
.
state
.
currentPage
;
},
filteredBoards
()
{
return
this
.
boards
.
filter
(
board
=>
board
.
name
.
toLowerCase
().
includes
(
this
.
filterTerm
.
toLowerCase
()),
);
},
reload
:
{
get
()
{
return
this
.
state
.
reload
;
...
...
@@ -123,6 +130,12 @@ export default {
$
(
'
#js-add-list
'
).
on
(
'
hide.bs.dropdown
'
,
this
.
handleDropdownHide
);
$
(
'
.js-new-board-list-tabs
'
).
on
(
'
click
'
,
this
.
handleDropdownTabClick
);
},
mounted
()
{
// prevent dropdown from closing when search box is clicked
$
(
this
.
$el
)
.
find
(
'
.dropdown-header
'
)
.
on
(
'
click
'
,
event
=>
event
.
stopPropagation
());
},
methods
:
{
showPage
(
page
)
{
this
.
state
.
reload
=
false
;
...
...
@@ -207,6 +220,10 @@ export default {
{{
board
.
name
}}
<icon
name=
"chevron-down"
/>
</button>
<div
class=
"dropdown-menu"
:class=
"
{ 'is-loading': loading }">
<div
class=
"dropdown-header position-relative"
>
<gl-search-box
v-if=
"!loading"
ref=
"searchBox"
v-model=
"filterTerm"
/>
</div>
<div
class=
"dropdown-content-faded-mask js-scroll-fade"
:class=
"scrollFadeClass"
>
<ul
v-if=
"!loading"
...
...
@@ -214,7 +231,11 @@ export default {
class=
"dropdown-list js-dropdown-list"
@
scroll.passive=
"throttledSetScrollFade"
>
<li
v-for=
"otherBoard in boards"
:key=
"otherBoard.id"
class=
"js-dropdown-item"
>
<li
v-for=
"otherBoard in filteredBoards"
:key=
"otherBoard.id"
class=
"js-dropdown-item"
>
<a
:href=
"`$
{boardBaseUrl}/${otherBoard.id}`">
{{
otherBoard
.
name
}}
</a>
</li>
<li
v-if=
"hasMissingBoards"
class=
"small unclickable"
>
...
...
ee/changelogs/unreleased/winh-board-switcher-search-ee.yml
0 → 100644
View file @
82f7a6a6
---
title
:
Add search field to issue board switcher
merge_request
:
8862
author
:
type
:
changed
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