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
dfadbe5e
Commit
dfadbe5e
authored
Mar 29, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial mutli label filter
parent
c0678f2d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
issues.js.coffee
app/assets/javascripts/issues.js.coffee
+2
-0
labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+9
-0
_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-0
No files found.
app/assets/javascripts/issues.js.coffee
View file @
dfadbe5e
...
@@ -52,7 +52,9 @@
...
@@ -52,7 +52,9 @@
filterResults
:
(
form
)
=>
filterResults
:
(
form
)
=>
$
(
'.issues-holder, .merge-requests-holder'
).
css
(
"opacity"
,
'0.5'
)
$
(
'.issues-holder, .merge-requests-holder'
).
css
(
"opacity"
,
'0.5'
)
formAction
=
form
.
attr
(
'action'
)
formAction
=
form
.
attr
(
'action'
)
console
.
log
form
.
find
(
"input[type='hidden'][name='label_names[]']"
)
formData
=
form
.
serialize
()
formData
=
form
.
serialize
()
console
.
log
'formData'
,
formData
issuesUrl
=
formAction
issuesUrl
=
formAction
issuesUrl
+=
(
"
#{
if
formAction
.
indexOf
(
"?"
)
<
0
then
'?'
else
'&'
}
"
)
issuesUrl
+=
(
"
#{
if
formAction
.
indexOf
(
"?"
)
<
0
then
'?'
else
'&'
}
"
)
issuesUrl
+=
formData
issuesUrl
+=
formData
...
...
app/assets/javascripts/labels_select.js.coffee
View file @
dfadbe5e
...
@@ -234,10 +234,19 @@ class @LabelsSelect
...
@@ -234,10 +234,19 @@ class @LabelsSelect
label
.
id
label
.
id
hidden
:
->
hidden
:
->
page
=
$
(
'body'
).
data
'page'
isIssueIndex
=
page
is
'projects:issues:index'
isMRIndex
=
page
is
page
is
'projects:merge_requests:index'
$selectbox
.
hide
()
$selectbox
.
hide
()
# display:block overrides the hide-collapse rule
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
$value
.
removeAttr
(
'style'
)
if
$dropdown
.
hasClass
'js-multiselect'
if
$dropdown
.
hasClass
'js-multiselect'
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
and
(
isIssueIndex
or
isMRIndex
)
Issues
.
filterResults
$dropdown
.
closest
(
'form'
)
else
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
$dropdown
.
closest
(
'form'
).
submit
()
else
saveLabelData
()
saveLabelData
()
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
dfadbe5e
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
=
hidden_field_tag
(
:label_name
,
params
[
:label_name
])
.dropdown
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit.js-extra-options
{
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"
}}
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit.js-extra-options
{
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"
}}
%button
.dropdown-menu-toggle.js-label-select.js-filter-submit.js-multiselect.js-extra-options
{
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"
}}
%span
.dropdown-toggle-text
%span
.dropdown-toggle-text
=
h
(
params
[
:label_name
].
presence
||
"Label"
)
=
h
(
params
[
:label_name
].
presence
||
"Label"
)
=
icon
(
'chevron-down'
)
=
icon
(
'chevron-down'
)
...
...
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