Commit 139c255a authored by Phil Hughes's avatar Phil Hughes Committed by Jacob Schatz

Fixed JS error that was failing the builds

parent cf0c6e87
...@@ -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 = ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment