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
Jérome Perrin
gitlab-ce
Commits
fdb703d7
Commit
fdb703d7
authored
Mar 14, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up commit message
parent
3753ace9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+9
-4
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
fdb703d7
...
...
@@ -41,6 +41,7 @@ class @LabelsSelect
'</span>'
+
'</a>'
+
'<% }); %>'
);
labelNoneHTMLTemplate
=
_
.
template
(
'<div class="light">None</div>'
)
if
newLabelField
.
length
and
$dropdown
.
hasClass
'js-extra-options'
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
...
...
@@ -176,6 +177,8 @@ class @LabelsSelect
$selectbox
.
hide
()
$value
.
show
()
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
clicked
:
->
page
=
$
(
'body'
).
data
'page'
isIssueIndex
=
page
is
'projects:issues:index'
...
...
@@ -190,11 +193,9 @@ class @LabelsSelect
.
closest
(
'.selectbox'
)
.
find
(
'input[type="hidden"]'
)
.
val
()
console
.
log
'selected'
,
selected
# need inline-block here instead of show,
# which will default to the element's style in this case inline.
selected
=
if
selected
?
then
[
selected
]
else
[
''
]
console
.
log
'selected'
,
selected
selected
=
if
selected
?
then
selected
.
split
(
','
)
else
[
''
]
$loading
.
fadeIn
()
$
.
ajax
(
...
...
@@ -206,7 +207,11 @@ class @LabelsSelect
).
done
(
data
)
->
$loading
.
fadeOut
()
$selectbox
.
hide
()
if
not
data
.
labels
.
length
template
=
labelNoneHTMLTemplate
()
else
template
=
labelHTMLTemplate
(
data
)
href
=
$value
.
show
()
.
html
(
labelHTMLTemplate
(
data
)
)
.
html
(
template
)
)
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