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
iv
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
...
@@ -41,6 +41,7 @@ class @LabelsSelect
'</span>'
+
'</span>'
+
'</a>'
+
'</a>'
+
'<% }); %>'
);
'<% }); %>'
);
labelNoneHTMLTemplate
=
_
.
template
(
'<div class="light">None</div>'
)
if
newLabelField
.
length
and
$dropdown
.
hasClass
'js-extra-options'
if
newLabelField
.
length
and
$dropdown
.
hasClass
'js-extra-options'
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
$
(
'.suggest-colors-dropdown a'
).
on
"click"
,
(
e
)
->
...
@@ -176,6 +177,8 @@ class @LabelsSelect
...
@@ -176,6 +177,8 @@ class @LabelsSelect
$selectbox
.
hide
()
$selectbox
.
hide
()
$value
.
show
()
$value
.
show
()
multiSelect
:
$dropdown
.
hasClass
'js-multiselect'
clicked
:
->
clicked
:
->
page
=
$
(
'body'
).
data
'page'
page
=
$
(
'body'
).
data
'page'
isIssueIndex
=
page
is
'projects:issues:index'
isIssueIndex
=
page
is
'projects:issues:index'
...
@@ -190,11 +193,9 @@ class @LabelsSelect
...
@@ -190,11 +193,9 @@ class @LabelsSelect
.
closest
(
'.selectbox'
)
.
closest
(
'.selectbox'
)
.
find
(
'input[type="hidden"]'
)
.
find
(
'input[type="hidden"]'
)
.
val
()
.
val
()
console
.
log
'selected'
,
selected
# need inline-block here instead of show,
# need inline-block here instead of show,
# which will default to the element's style in this case inline.
# which will default to the element's style in this case inline.
selected
=
if
selected
?
then
[
selected
]
else
[
''
]
selected
=
if
selected
?
then
selected
.
split
(
','
)
else
[
''
]
console
.
log
'selected'
,
selected
$loading
$loading
.
fadeIn
()
.
fadeIn
()
$
.
ajax
(
$
.
ajax
(
...
@@ -206,7 +207,11 @@ class @LabelsSelect
...
@@ -206,7 +207,11 @@ class @LabelsSelect
).
done
(
data
)
->
).
done
(
data
)
->
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$selectbox
.
hide
()
$selectbox
.
hide
()
if
not
data
.
labels
.
length
template
=
labelNoneHTMLTemplate
()
else
template
=
labelHTMLTemplate
(
data
)
href
=
$value
href
=
$value
.
show
()
.
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