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
Tatuya Kamada
gitlab-ce
Commits
44cf9e4c
Commit
44cf9e4c
authored
Jul 18, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issuable sidebar label toggle not working
Removed un-used JS var
parent
1920cf2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+1
-1
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+2
-2
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
44cf9e4c
...
...
@@ -26,7 +26,7 @@ class @LabelsSelect
$colorPreview
=
$
(
'.js-dropdown-label-color-preview'
)
$newLabelCreateButton
=
$
(
'.js-new-label-btn'
)
fieldName
=
$dropdown
.
data
(
'field-name'
)
useId
=
$dropdown
.
hasClass
(
'js-issuable-form-dropdown'
)
or
$dropdown
.
hasClass
(
'js-filter-bulk-update
'
)
useId
=
$dropdown
.
is
(
'.js-issuable-form-dropdown, .js-filter-bulk-update, .js-label-sidebar-dropdown
'
)
propertyName
=
if
useId
then
"id"
else
"title"
$newLabelError
.
hide
()
...
...
app/assets/javascripts/users_select.js.coffee
View file @
44cf9e4c
...
...
@@ -142,7 +142,7 @@ class @UsersSelect
selectable
:
true
fieldName
:
$dropdown
.
data
(
'field-name'
)
toggleLabel
:
(
selected
,
el
,
e
)
->
toggleLabel
:
(
selected
,
el
)
->
if
selected
and
'id'
of
selected
and
$
(
el
).
hasClass
(
'is-active'
)
if
selected
.
text
then
selected
.
text
else
selected
.
name
else
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
44cf9e4c
...
...
@@ -127,9 +127,9 @@
.selectbox.hide-collapsed
-
selected_labels
=
params
[
"
#{
issuable
.
to_ability_name
}
[label_names]"
].
to_a
-
issuable
.
labels_array
.
each
do
|
label
|
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[label_names][]"
,
label
.
id
,
id:
nil
,
data:
{
title:
label
.
title
}
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[label_names][]"
,
label
.
id
,
id:
nil
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
default_label:
"Labels"
,
field_name:
"#{issuable.to_ability_name}[label_names][]"
,
ability_name:
issuable
.
to_ability_name
,
show_no:
"true"
,
show_any:
"true"
,
project_id:
(
@project
.
id
if
@project
),
issue_update:
issuable_json_path
(
issuable
),
labels:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:json
)
if
@project
)}}
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
.js-label-sidebar-dropdown
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
default_label:
"Labels"
,
field_name:
"#{issuable.to_ability_name}[label_names][]"
,
ability_name:
issuable
.
to_ability_name
,
show_no:
"true"
,
show_any:
"true"
,
project_id:
(
@project
.
id
if
@project
),
issue_update:
issuable_json_path
(
issuable
),
labels:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:json
)
if
@project
)}}
%span
.dropdown-toggle-text
{
class:
(
"is-default"
if
issuable
.
labels_array
.
empty?
)}
=
multi_label_name
(
issuable
.
labels_array
,
h
(
selected_labels
[
0
]),
"Labels"
)
=
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