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
69458c0e
Commit
69458c0e
authored
8 years ago
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keeps the filters after a reload
parent
8e3fd88e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
16 deletions
+27
-16
app/assets/javascripts/boards/components/board.js.es6
app/assets/javascripts/boards/components/board.js.es6
+0
-2
app/assets/javascripts/boards/models/list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+1
-1
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+7
-4
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+7
-2
app/assets/javascripts/milestone_select.js
app/assets/javascripts/milestone_select.js
+3
-1
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+4
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+4
-4
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+1
-1
No files found.
app/assets/javascripts/boards/components/board.js.es6
View file @
69458c0e
...
@@ -11,13 +11,11 @@
...
@@ -11,13 +11,11 @@
watch: {
watch: {
'query': function () {
'query': function () {
if (this.board.canSearch()) {
if (this.board.canSearch()) {
this.board.filters = this.getFilterData();
this.board.getIssues(true);
this.board.getIssues(true);
}
}
},
},
'filters': {
'filters': {
handler: function () {
handler: function () {
this.board.filters = this.getFilterData();
this.board.getIssues(true);
this.board.getIssues(true);
},
},
deep: true
deep: true
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/boards/models/list.js.es6
View file @
69458c0e
...
@@ -4,7 +4,7 @@ class List {
...
@@ -4,7 +4,7 @@ class List {
this.position = obj.position;
this.position = obj.position;
this.title = obj.title;
this.title = obj.title;
this.type = obj.list_type;
this.type = obj.list_type;
this.filters =
{}
;
this.filters =
BoardsStore.state.filters
;
this.page = 1;
this.page = 1;
this.loading = true;
this.loading = true;
this.issues = [];
this.issues = [];
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
69458c0e
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
state: {
state: {
lists: [],
lists: [],
filters: {
filters: {
author_id:
null
,
author_id:
gl.utils.getParameterValues('author_id')[0]
,
assignee_id:
null
,
assignee_id:
gl.utils.getParameterValues('assignee_id')[0]
,
milestone_title:
null
,
milestone_title:
gl.utils.getParameterValues('milestone_title')[0]
,
label_name:
[]
label_name:
gl.utils.getParameterValues('label_name[]')
}
}
},
},
reset: function () {
reset: function () {
...
@@ -118,6 +118,9 @@
...
@@ -118,6 +118,9 @@
return _.find(this.state.lists, (list) => {
return _.find(this.state.lists, (list) => {
return list[key] === val;
return list[key] === val;
});
});
},
updateFiltersUrl: function () {
history.pushState(null, null, `?${$.param(this.state.filters)}`);
}
}
};
};
}(window));
}(window));
This diff is collapsed.
Click to expand it.
app/assets/javascripts/labels_select.js
View file @
69458c0e
...
@@ -272,6 +272,9 @@
...
@@ -272,6 +272,9 @@
isMRIndex
=
page
===
'
projects:merge_requests:index
'
;
isMRIndex
=
page
===
'
projects:merge_requests:index
'
;
$selectbox
.
hide
();
$selectbox
.
hide
();
$value
.
removeAttr
(
'
style
'
);
$value
.
removeAttr
(
'
style
'
);
if
(
page
===
'
projects:boards:show
'
)
{
return
;
}
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
if
(
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
selectedLabels
=
$dropdown
.
closest
(
'
form
'
).
find
(
"
input:hidden[name='
"
+
(
$dropdown
.
data
(
'
fieldName
'
))
+
"
']
"
);
selectedLabels
=
$dropdown
.
closest
(
'
form
'
).
find
(
"
input:hidden[name='
"
+
(
$dropdown
.
data
(
'
fieldName
'
))
+
"
']
"
);
...
@@ -291,7 +294,7 @@
...
@@ -291,7 +294,7 @@
}
}
},
},
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
multiSelect
:
$dropdown
.
hasClass
(
'
js-multiselect
'
),
clicked
:
function
(
label
)
{
clicked
:
function
(
label
,
$el
,
e
)
{
var
isIssueIndex
,
isMRIndex
,
page
;
var
isIssueIndex
,
isMRIndex
,
page
;
_this
.
enableBulkLabelDropdown
();
_this
.
enableBulkLabelDropdown
();
if
(
$dropdown
.
hasClass
(
'
js-filter-bulk-update
'
))
{
if
(
$dropdown
.
hasClass
(
'
js-filter-bulk-update
'
))
{
...
@@ -301,7 +304,9 @@
...
@@ -301,7 +304,9 @@
isIssueIndex
=
page
===
'
projects:issues:index
'
;
isIssueIndex
=
page
===
'
projects:issues:index
'
;
isMRIndex
=
page
===
'
projects:merge_requests:index
'
;
isMRIndex
=
page
===
'
projects:merge_requests:index
'
;
if
(
page
===
'
projects:boards:show
'
)
{
if
(
page
===
'
projects:boards:show
'
)
{
BoardsStore
.
state
.
filters
[
'
label_name
'
]
=
label
.
title
;
BoardsStore
.
state
.
filters
[
'
label_name
'
].
push
(
label
.
title
);
BoardsStore
.
updateFiltersUrl
();
e
.
preventDefault
();
return
;
return
;
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
if
(
!
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
if
(
!
$dropdown
.
hasClass
(
'
js-multiselect
'
))
{
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/milestone_select.js
View file @
69458c0e
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
$selectbox
.
hide
();
$selectbox
.
hide
();
return
$value
.
css
(
'
display
'
,
''
);
return
$value
.
css
(
'
display
'
,
''
);
},
},
clicked
:
function
(
selected
)
{
clicked
:
function
(
selected
,
$el
,
e
)
{
var
data
,
isIssueIndex
,
isMRIndex
,
page
;
var
data
,
isIssueIndex
,
isMRIndex
,
page
;
page
=
$
(
'
body
'
).
data
(
'
page
'
);
page
=
$
(
'
body
'
).
data
(
'
page
'
);
isIssueIndex
=
page
===
'
projects:issues:index
'
;
isIssueIndex
=
page
===
'
projects:issues:index
'
;
...
@@ -104,6 +104,8 @@
...
@@ -104,6 +104,8 @@
}
}
if
(
page
===
'
projects:boards:show
'
)
{
if
(
page
===
'
projects:boards:show
'
)
{
BoardsStore
.
state
.
filters
[
$dropdown
.
data
(
'
field-name
'
)]
=
selected
.
name
;
BoardsStore
.
state
.
filters
[
$dropdown
.
data
(
'
field-name
'
)]
=
selected
.
name
;
BoardsStore
.
updateFiltersUrl
();
e
.
preventDefault
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
if
(
selected
.
name
!=
null
)
{
if
(
selected
.
name
!=
null
)
{
selectedMilestone
=
selected
.
name
;
selectedMilestone
=
selected
.
name
;
...
...
This diff is collapsed.
Click to expand it.
app/assets/javascripts/users_select.js
View file @
69458c0e
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
$selectbox
.
hide
();
$selectbox
.
hide
();
return
$value
.
css
(
'
display
'
,
''
);
return
$value
.
css
(
'
display
'
,
''
);
},
},
clicked
:
function
(
user
)
{
clicked
:
function
(
user
,
$el
,
e
)
{
var
isIssueIndex
,
isMRIndex
,
page
,
selected
;
var
isIssueIndex
,
isMRIndex
,
page
,
selected
;
page
=
$
(
'
body
'
).
data
(
'
page
'
);
page
=
$
(
'
body
'
).
data
(
'
page
'
);
isIssueIndex
=
page
===
'
projects:issues:index
'
;
isIssueIndex
=
page
===
'
projects:issues:index
'
;
...
@@ -150,7 +150,10 @@
...
@@ -150,7 +150,10 @@
return
;
return
;
}
}
if
(
page
===
'
projects:boards:show
'
)
{
if
(
page
===
'
projects:boards:show
'
)
{
selectedId
=
user
.
id
;
BoardsStore
.
state
.
filters
[
$dropdown
.
data
(
'
field-name
'
)]
=
user
.
id
;
BoardsStore
.
state
.
filters
[
$dropdown
.
data
(
'
field-name
'
)]
=
user
.
id
;
BoardsStore
.
updateFiltersUrl
();
e
.
preventDefault
();
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
}
else
if
(
$dropdown
.
hasClass
(
'
js-filter-submit
'
)
&&
(
isIssueIndex
||
isMRIndex
))
{
selectedId
=
user
.
id
;
selectedId
=
user
.
id
;
return
Issuable
.
filterResults
(
$dropdown
.
closest
(
'
form
'
));
return
Issuable
.
filterResults
(
$dropdown
.
closest
(
'
form
'
));
...
...
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/pages/boards.scss
View file @
69458c0e
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
.is-dragging
{
.is-dragging
{
*
{
*
{
cursor
:
-
webkit-grabbing
;
cursor
:
-
webkit-grabbing
;
cursor
:
grabbing
;
cursor
:
grabbing
;
}
}
}
}
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
width
:
320px
;
width
:
320px
;
.dropdown-content
{
.dropdown-content
{
max-height
:
150px
;
max-height
:
150px
;
}
}
}
}
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
border-top-left-radius
:
$border-radius-default
;
border-top-left-radius
:
$border-radius-default
;
border-top-right-radius
:
$border-radius-default
;
border-top-right-radius
:
$border-radius-default
;
cursor
:
-
webkit-grab
;
cursor
:
-
webkit-grab
;
cursor
:
grab
;
cursor
:
grab
;
&
.has-border
{
&
.has-border
{
padding-top
:
(
$gl-padding
-
3px
);
padding-top
:
(
$gl-padding
-
3px
);
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
box-shadow
:
0
1px
2px
rgba
(
186
,
186
,
186
,
0
.5
);
box-shadow
:
0
1px
2px
rgba
(
186
,
186
,
186
,
0
.5
);
list-style
:
none
;
list-style
:
none
;
cursor
:
-
webkit-grab
;
cursor
:
-
webkit-grab
;
cursor
:
grab
;
cursor
:
grab
;
&
:not
(
:last-child
)
{
&
:not
(
:last-child
)
{
margin-bottom
:
5px
;
margin-bottom
:
5px
;
...
...
This diff is collapsed.
Click to expand it.
spec/features/boards/boards_spec.rb
View file @
69458c0e
...
@@ -8,7 +8,7 @@ describe 'Issue Boards', feature: true, js: true do
...
@@ -8,7 +8,7 @@ describe 'Issue Boards', feature: true, js: true do
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
login_as
(
user
)
visit
namespace_project_board
s
_path
(
project
.
namespace
,
project
)
visit
namespace_project_board_path
(
project
.
namespace
,
project
)
end
end
it
'shows default lists'
do
it
'shows default lists'
do
...
...
This diff is collapsed.
Click to expand it.
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