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
0a81c000
Commit
0a81c000
authored
Jul 18, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 'no label' being in dropdown toggle label
parent
70d5493e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+4
-6
_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
0a81c000
...
...
@@ -212,7 +212,7 @@ class @LabelsSelect
$a
=
$
(
'<a href="#">'
)
selectedClass
=
[]
removesAll
=
label
.
id
is
0
or
not
label
.
id
?
removesAll
=
label
.
id
<=
0
or
not
label
.
id
?
if
$dropdown
.
hasClass
(
'js-filter-bulk-update'
)
indeterminate
=
instance
.
indeterminateIds
...
...
@@ -281,7 +281,7 @@ class @LabelsSelect
selectedIds
=
$
(
"input[name='
#{
fieldName
}
']"
).
map
(
->
@
value
).
get
()
selected
=
_
.
filter
glDropdown
.
fullData
,
(
label
)
->
selectedIds
.
indexOf
(
"
#{
label
[
propertyName
]
}
"
)
>=
0
if
label
[
propertyName
]
?
selectedIds
.
indexOf
(
"
#{
label
[
propertyName
]
}
"
)
>=
0
if
label
[
propertyName
]
?
and
label
.
id
>
0
if
selected
.
length
is
1
selected
[
0
].
title
...
...
@@ -292,11 +292,9 @@ class @LabelsSelect
defaultLabel
:
defaultLabel
fieldName
:
fieldName
id
:
(
label
)
->
return
if
label
.
id
<=
0
if
$dropdown
.
hasClass
(
'js-issuable-form-dropdown'
)
if
label
.
id
is
0
return
else
return
label
.
id
return
label
.
id
if
$dropdown
.
hasClass
(
"js-filter-submit"
)
and
not
label
.
isAny
?
label
.
title
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
0a81c000
...
...
@@ -7,7 +7,7 @@
-
classes
=
local_assigns
.
fetch
(
:classes
,
[])
-
selected
=
local_assigns
.
fetch
(
:selected
,
nil
)
-
selected_toggle
=
local_assigns
.
fetch
(
:selected_toggle
,
nil
)
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
selected
,
project_id:
project
.
try
(
:id
),
labels:
labels_filter_path
,
default_label:
"Label"
}
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
selected
,
project_id:
project
.
try
(
:id
),
labels:
labels_filter_path
,
default_label:
"Label
s
"
}
-
dropdown_data
.
merge!
(
data_options
)
-
classes
<<
'js-extra-options'
if
extra_options
-
classes
<<
'js-filter-submit'
if
filter_submit
...
...
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