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
Léo-Paul Géneau
gitlab-ce
Commits
139c255a
Commit
139c255a
authored
Mar 21, 2016
by
Phil Hughes
Committed by
Jacob Schatz
Mar 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed JS error that was failing the builds
parent
cf0c6e87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+6
-5
No files found.
app/assets/javascripts/users_select.js.coffee
View file @
139c255a
...
@@ -2,7 +2,8 @@ class @UsersSelect
...
@@ -2,7 +2,8 @@ class @UsersSelect
constructor
:
(
currentUser
)
->
constructor
:
(
currentUser
)
->
@
usersPath
=
"/autocomplete/users.json"
@
usersPath
=
"/autocomplete/users.json"
@
userPath
=
"/autocomplete/users/:id.json"
@
userPath
=
"/autocomplete/users/:id.json"
@
currentUser
=
JSON
.
parse
(
currentUser
)
if
currentUser
?
@
currentUser
=
JSON
.
parse
(
currentUser
)
$
(
'.js-user-search'
).
each
(
i
,
dropdown
)
=>
$
(
'.js-user-search'
).
each
(
i
,
dropdown
)
=>
$dropdown
=
$
(
dropdown
)
$dropdown
=
$
(
dropdown
)
...
@@ -20,7 +21,7 @@ class @UsersSelect
...
@@ -20,7 +21,7 @@ class @UsersSelect
$value
=
$block
.
find
(
'.value'
)
$value
=
$block
.
find
(
'.value'
)
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$loading
=
$block
.
find
(
'.block-loading'
).
fadeOut
()
$block
.
on
(
'click'
,
'.js-assign-yourself'
,
(
e
)
=>
$block
.
on
(
'click'
,
'.js-assign-yourself'
,
(
e
)
=>
e
.
preventDefault
()
e
.
preventDefault
()
assignTo
(
@
currentUser
.
id
)
assignTo
(
@
currentUser
.
id
)
)
)
...
@@ -39,7 +40,7 @@ class @UsersSelect
...
@@ -39,7 +40,7 @@ class @UsersSelect
).
done
(
data
)
->
).
done
(
data
)
->
$loading
.
fadeOut
()
$loading
.
fadeOut
()
$selectbox
.
hide
()
$selectbox
.
hide
()
if
data
.
assignee
if
data
.
assignee
user
=
user
=
name
:
data
.
assignee
.
name
name
:
data
.
assignee
.
name
...
@@ -67,7 +68,7 @@ class @UsersSelect
...
@@ -67,7 +68,7 @@ class @UsersSelect
</a>
</a>
<% } else { %>
<% } else { %>
<span class="assign-yourself">
<span class="assign-yourself">
No assignee -
No assignee -
<a href="#" class="js-assign-yourself">
<a href="#" class="js-assign-yourself">
assign yourself
assign yourself
</a>
</a>
...
@@ -175,7 +176,7 @@ class @UsersSelect
...
@@ -175,7 +176,7 @@ class @UsersSelect
listClosingTags
=
"</a>
listClosingTags
=
"</a>
</li>"
</li>"
if
username
is
''
if
username
is
''
listWithUserName
=
''
listWithUserName
=
''
...
...
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