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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
e00b56d0
Commit
e00b56d0
authored
Aug 08, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly uses search query in backlog
parent
ff5fd4eb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
+25
-20
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+8
-6
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+3
-1
app/views/projects/boards/components/_blank_state.html.haml
app/views/projects/boards/components/_blank_state.html.haml
+2
-1
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+12
-12
No files found.
app/assets/javascripts/boards/components/board.js.es6
View file @
e00b56d0
(() => {
(() => {
const Board = Vue.extend({
const Board = Vue.extend({
props: {
props: {
board
: Object,
list
: Object,
disabled: Boolean
disabled: Boolean
},
},
data: function () {
data: function () {
return {
return {
query: '',
filters: BoardsStore.state.filters
filters: BoardsStore.state.filters
};
};
},
},
watch: {
watch: {
'query': function () {
'query': function () {
if (this.board.canSearch()) {
if (this.list.canSearch()) {
this.board.getIssues(true);
this.list.filters = this.getFilterData();
this.list.getIssues(true);
}
}
},
},
'filters': {
'filters': {
handler: function () {
handler: function () {
this.
board
.getIssues(true);
this.
list
.getIssues(true);
},
},
deep: true
deep: true
}
}
...
@@ -27,14 +29,14 @@
...
@@ -27,14 +29,14 @@
this.query = '';
this.query = '';
},
},
getFilterData: function () {
getFilterData: function () {
const queryData = this.
board
.canSearch() ? { search: this.query } : {};
const queryData = this.
list
.canSearch() ? { search: this.query } : {};
return _.extend(queryData, this.filters);
return _.extend(queryData, this.filters);
}
}
},
},
computed: {
computed: {
isPreset: function () {
isPreset: function () {
return this.
board.type === 'backlog' || this.board.type === 'done' || this.board
.type === 'blank';
return this.
list.type === 'backlog' || this.list.type === 'done' || this.list
.type === 'blank';
}
}
},
},
ready: function () {
ready: function () {
...
...
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
e00b56d0
...
@@ -113,7 +113,9 @@
...
@@ -113,7 +113,9 @@
}
}
if (listTo.type === 'done' && listFrom.type !== 'backlog') {
if (listTo.type === 'done' && listFrom.type !== 'backlog') {
_.each(issueLists, list.removeIssue.bind(list));
_.each(issueLists, function (list) {
list.removeIssue(issue);
});
issue.removeLabels(listLabels);
issue.removeLabels(listLabels);
} else {
} else {
listFrom.removeIssue(issue);
listFrom.removeIssue(issue);
...
...
app/views/projects/boards/components/_blank_state.html.haml
View file @
e00b56d0
%board-blank-state
{
"inline-template"
=>
true
,
"v-if"
=>
"board.id == 'blank'"
}
%board-blank-state
{
"inline-template"
=>
true
,
"v-if"
=>
"list.id == 'blank'"
}
.board-blank-state
.board-blank-state
%p
%p
Add the following default lists to your Issue Board with one click:
Add the following default lists to your Issue Board with one click:
...
...
app/views/projects/boards/components/_board.html.haml
View file @
e00b56d0
%board
{
"inline-template"
=>
true
,
%board
{
"inline-template"
=>
true
,
"v-cloak"
=>
true
,
"v-cloak"
=>
true
,
"v-for"
=>
"
board
in state.lists | orderBy 'position'"
,
"v-for"
=>
"
list
in state.lists | orderBy 'position'"
,
":
board"
=>
"board
"
,
":
list"
=>
"list
"
,
":disabled"
=>
"#{current_user.nil?}"
}
":disabled"
=>
"#{current_user.nil?}"
}
.board
{
":class"
=>
"{ 'is-draggable': !isPreset }"
}
.board
{
":class"
=>
"{ 'is-draggable': !isPreset }"
}
.board-inner
.board-inner
%header
.board-header
{
":class"
=>
"{ 'has-border':
board.label }"
,
":style"
=>
"{ borderTopColor: (board.label ? board
.label.color : null) }"
}
%header
.board-header
{
":class"
=>
"{ 'has-border':
list.label }"
,
":style"
=>
"{ borderTopColor: (list.label ? list
.label.color : null) }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': !disabled }"
}
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': !disabled }"
}
{{
board
.title }}
{{
list
.title }}
%span
.pull-right
{
"v-if"
=>
"
board
.type !== 'blank'"
}
%span
.pull-right
{
"v-if"
=>
"
list
.type !== 'blank'"
}
{{
board
.issues.length }}
{{
list
.issues.length }}
-
if
current_user
-
if
current_user
%board-delete
{
"inline-template"
=>
true
,
"v-if"
=>
"!isPreset"
,
":board-id"
=>
"
board
.id"
}
%board-delete
{
"inline-template"
=>
true
,
"v-if"
=>
"!isPreset"
,
":board-id"
=>
"
list
.id"
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete list"
,
"aria-label"
=>
"Delete list"
,
data:
{
placement:
"bottom"
},
"@click"
=>
"deleteBoard"
}
%button
.board-delete.has-tooltip.pull-right
{
type:
"button"
,
title:
"Delete list"
,
"aria-label"
=>
"Delete list"
,
data:
{
placement:
"bottom"
},
"@click"
=>
"deleteBoard"
}
=
icon
(
"trash"
)
=
icon
(
"trash"
)
.board-inner-container.board-search-container
{
"v-if"
=>
"
board
.canSearch()"
}
.board-inner-container.board-search-container
{
"v-if"
=>
"
list
.canSearch()"
}
%input
.form-control
{
type:
"text"
,
placeholder:
"Search issues"
,
"v-model"
=>
"query"
,
"debounce"
=>
"250"
}
%input
.form-control
{
type:
"text"
,
placeholder:
"Search issues"
,
"v-model"
=>
"query"
,
"debounce"
=>
"250"
}
=
icon
(
"search"
,
class:
"board-search-icon"
,
"v-show"
=>
"!query"
)
=
icon
(
"search"
,
class:
"board-search-icon"
,
"v-show"
=>
"!query"
)
%button
.board-search-clear-btn
{
type:
"button"
,
role:
"button"
,
"aria-label"
=>
"Clear search"
,
"@click"
=>
"clearSearch"
,
"v-show"
=>
"query"
}
%button
.board-search-clear-btn
{
type:
"button"
,
role:
"button"
,
"aria-label"
=>
"Clear search"
,
"@click"
=>
"clearSearch"
,
"v-show"
=>
"query"
}
=
icon
(
"times"
,
class:
"board-search-clear"
)
=
icon
(
"times"
,
class:
"board-search-clear"
)
%board-list
{
"inline-template"
=>
true
,
%board-list
{
"inline-template"
=>
true
,
"v-if"
=>
"
board
.type !== 'blank'"
,
"v-if"
=>
"
list
.type !== 'blank'"
,
":list"
=>
"
board
"
,
":list"
=>
"
list
"
,
":issues"
=>
"
board
.issues"
,
":issues"
=>
"
list
.issues"
,
":loading"
=>
"
board
.loading"
,
":loading"
=>
"
list
.loading"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
":issue-link-base"
=>
"'#{namespace_project_issues_path(@project.namespace, @project)}'"
}
":issue-link-base"
=>
"'#{namespace_project_issues_path(@project.namespace, @project)}'"
}
.board-list-loading.text-center
{
"v-if"
=>
"loading"
}
.board-list-loading.text-center
{
"v-if"
=>
"loading"
}
...
...
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