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
e52ab81f
Commit
e52ab81f
authored
Aug 23, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add search to new issue project dropdown
parent
6f438650
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
23 deletions
+35
-23
app/assets/javascripts/boards/components/board_new_issue.js
app/assets/javascripts/boards/components/board_new_issue.js
+35
-23
No files found.
app/assets/javascripts/boards/components/board_new_issue.js
View file @
e52ab81f
...
...
@@ -42,13 +42,6 @@ export default {
},
},
methods
:
{
loadProjects
()
{
this
.
loading
=
true
;
Api
.
groupProjects
(
this
.
groupId
,
{},
(
projects
)
=>
{
this
.
projects
=
projects
;
this
.
loading
=
false
;
});
},
submit
(
e
)
{
e
.
preventDefault
();
if
(
this
.
title
.
trim
()
===
''
)
return
Promise
.
resolve
();
...
...
@@ -104,8 +97,29 @@ export default {
search
:
{
fields
:
[
'
name_with_namespace
'
],
},
data
(
term
,
callback
)
{
return
Api
.
groupProjects
(
this
.
groupId
,
term
,
callback
);
clicked
:
({
$el
,
e
})
=>
{
e
.
preventDefault
();
this
.
selectedProject
=
{
id
:
$el
.
data
(
'
project-id
'
),
name
:
$el
.
data
(
'
project-name
'
),
};
},
selectable
:
true
,
data
:
(
term
,
callback
)
=>
{
this
.
loading
=
true
;
return
Api
.
groupProjects
(
this
.
groupId
,
term
,
(
projects
)
=>
{
this
.
loading
=
false
;
callback
(
projects
);
});
},
renderRow
(
project
)
{
return
`
<li>
<a href='#' class='dropdown-menu-link' data-project-id="
${
project
.
id
}
" data-project-name="
${
project
.
name
}
">
${
_
.
escape
(
project
.
name
)}
</a>
</li>
`
;
},
text
:
project
=>
project
.
name
,
});
...
...
@@ -135,9 +149,8 @@ export default {
:for="list.id + '-project'">
Project
</label>
<div class="dropdown">
<div
ref="projectsDropdown"
class="dropdown">
<button
@click="loadProjects"
class="dropdown-menu-toggle wide"
type="button"
data-toggle="dropdown"
...
...
@@ -146,18 +159,17 @@ export default {
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</button>
<div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width">
<loading-icon v-if="loading" />
<ul>
<li v-for="project in projects">
<a
href="#"
role="button"
:class="{ 'is-active': project.id == selectedProject.id }"
@click.prevent="selectedProject = project">
{{ project.name }}
</a>
</li>
</ul>
<div class="dropdown-title">
<span>Projects</span>
<button aria-label="Close" type="button" class="dropdown-title-button dropdown-menu-close">
<i aria-hidden="true" data-hidden="true" class="fa fa-times dropdown-menu-close-icon"></i>
</button>
</div>
<div class="dropdown-input">
<input class="dropdown-input-field">
</div>
<div class="dropdown-content"></div>
<div class="dropdown-loading"></div>
</div>
</div>
</template>
...
...
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