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
Boxiang Sun
gitlab-ce
Commits
c3339b33
Commit
c3339b33
authored
Feb 02, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resets modal filters when closing
parent
7e253790
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
6 deletions
+42
-6
app/assets/javascripts/boards/components/modal/filters.js.es6
...assets/javascripts/boards/components/modal/filters.js.es6
+3
-0
app/assets/javascripts/boards/components/modal/index.js.es6
app/assets/javascripts/boards/components/modal/index.js.es6
+2
-0
app/assets/javascripts/boards/stores/modal_store.js.es6
app/assets/javascripts/boards/stores/modal_store.js.es6
+11
-6
spec/features/boards/modal_filter_spec.rb
spec/features/boards/modal_filter_spec.rb
+26
-0
No files found.
app/assets/javascripts/boards/components/modal/filters.js.es6
View file @
c3339b33
...
@@ -18,6 +18,9 @@
...
@@ -18,6 +18,9 @@
required: true,
required: true,
},
},
},
},
destroyed() {
ModalStore.setDefaultFilter();
},
components: {
components: {
'user-filter': gl.issueBoards.ModalFilterUser,
'user-filter': gl.issueBoards.ModalFilterUser,
'milestone-filter': gl.issueBoards.ModalFilterMilestone,
'milestone-filter': gl.issueBoards.ModalFilterMilestone,
...
...
app/assets/javascripts/boards/components/modal/index.js.es6
View file @
c3339b33
...
@@ -74,6 +74,8 @@
...
@@ -74,6 +74,8 @@
this.loadIssues(true);
this.loadIssues(true);
}, 500),
}, 500),
loadIssues(clearIssues = false) {
loadIssues(clearIssues = false) {
if (!this.showAddIssuesModal) return;
const data = Object.assign({}, this.filter, {
const data = Object.assign({}, this.filter, {
search: this.searchTerm,
search: this.searchTerm,
page: this.page,
page: this.page,
...
...
app/assets/javascripts/boards/stores/modal_store.js.es6
View file @
c3339b33
...
@@ -17,12 +17,17 @@
...
@@ -17,12 +17,17 @@
loadingNewPage: false,
loadingNewPage: false,
page: 1,
page: 1,
perPage: 50,
perPage: 50,
filter: {
};
this.setDefaultFilter();
}
setDefaultFilter() {
this.store.filter = {
author_id: '',
author_id: '',
assignee_id: '',
assignee_id: '',
milestone_title: '',
milestone_title: '',
label_name: [],
label_name: [],
},
};
};
}
}
...
...
spec/features/boards/modal_filter_spec.rb
View file @
c3339b33
...
@@ -16,6 +16,32 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do
...
@@ -16,6 +16,32 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do
login_as
(
user
)
login_as
(
user
)
end
end
it
'restores filters when closing'
do
visit_board
page
.
within
(
'.add-issues-modal'
)
do
click_button
'Milestone'
wait_for_ajax
click_link
'Upcoming'
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.card'
,
count:
0
)
click_button
'Cancel'
end
click_button
(
'Add issues'
)
page
.
within
(
'.add-issues-modal'
)
do
wait_for_vue_resource
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
end
end
context
'author'
do
context
'author'
do
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user2
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user2
)
}
...
...
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