BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cc79eedb
Commit
cc79eedb
authored
Mar 31, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes issue with dropdowns not selecting values
Fixes issue with dropdowns not selecting when navigating between tabs Closes #14813
parent
0af8587d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+2
-0
milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+7
-3
_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+2
-2
_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-1
No files found.
app/assets/javascripts/gl_dropdown.js.coffee
View file @
cc79eedb
...
...
@@ -318,6 +318,8 @@ class GitLabDropdown
input
=
$
(
input
)
.
attr
(
'id'
,
@
options
.
inputId
)
@
dropdown
.
before
input
else
field
.
val
value
return
selectedObject
...
...
app/assets/javascripts/milestone_select.js.coffee
View file @
cc79eedb
...
...
@@ -84,12 +84,16 @@ class @MilestoneSelect
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
clicked
:
(
e
)
->
clicked
:
(
selected
)
->
if
$dropdown
.
hasClass
'js-filter-bulk-update'
return
if
$dropdown
.
hasClass
'js-filter-submit'
$dropdown
.
parents
(
'form'
).
submit
()
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
if
selected
.
name
?
selectedMilestone
=
selected
.
name
else
selectedMilestone
=
''
Issues
.
filterResults
$dropdown
.
closest
(
'form'
)
else
selected
=
$selectbox
.
find
(
'input[type="hidden"]'
)
...
...
app/views/shared/issuable/_filter.html.haml
View file @
cc79eedb
...
...
@@ -7,13 +7,13 @@
class:
"check_all_issues left"
.issues-other-filters
.filter-item.inline
-
if
params
[
:author_id
]
-
if
params
[
:author_id
]
.
present?
=
hidden_field_tag
(
:author_id
,
params
[
:author_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:author_id
],
"Author"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-author-search"
,
title:
"Filter by author"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-author js-filter-submit"
,
placeholder:
"Search authors"
,
data:
{
any_user:
"Any Author"
,
first_user:
(
current_user
.
username
if
current_user
),
current_user:
true
,
project_id:
(
@project
.
id
if
@project
),
selected:
params
[
:author_id
],
field_name:
"author_id"
,
default_label:
"Author"
}
})
.filter-item.inline
-
if
params
[
:assignee_id
]
-
if
params
[
:assignee_id
]
.
present?
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:assignee_id
],
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Assignee"
,
first_user:
(
current_user
.
username
if
current_user
),
null_user:
true
,
current_user:
true
,
project_id:
(
@project
.
id
if
@project
),
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
,
default_label:
"Assignee"
}
})
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
cc79eedb
-
if
params
[
:label_name
]
-
if
params
[
:label_name
]
.
present?
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"label_name"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
params
[
:label_name
],
project_id:
@project
.
try
(
:id
),
labels:
labels_filter_path
,
default_label:
"Label"
}}
...
...
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
cc79eedb
-
if
params
[
:milestone_title
]
-
if
params
[
:milestone_title
]
.
present?
=
hidden_field_tag
(
:milestone_title
,
params
[
:milestone_title
])
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
]),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search milestones"
,
footer_content:
@project
.
present?
,
data:
{
show_no:
true
,
show_any:
true
,
show_upcoming:
true
,
field_name:
"milestone_title"
,
selected:
params
[
:milestone_title
],
project_id:
@project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
,
default_label:
"Milestone"
}
})
do
...
...
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