Commit 53a83112 authored by Jacob Schatz's avatar Jacob Schatz

Edit button leaves modal open

Add user avatar to user selection
parent 6835f19c
......@@ -197,7 +197,6 @@ class GitLabDropdown
@dropdown.find(".dropdown-input-field").focus()
hidden: (e) =>
if @options.filterable
@dropdown
.find(".dropdown-input-field")
......
......@@ -10,12 +10,19 @@ class @IssuableContext
$(this).submit()
$(document).on "click",".edit-link", (e) ->
block = $(@).parents('.block')
block.find('.selectbox').show()
block.find('.value').hide()
setTimeout (->
block.find('.dropdown-menu-toggle').trigger 'click'
), 0
$block = $(@).parents('.block')
$selectbox = $block.find('.selectbox')
if $selectbox.is(':visible')
$selectbox.hide()
$block.find('.value').show()
else
$selectbox.show()
$block.find('.value').hide()
if $selectbox.is(':visible')
setTimeout (->
$block.find('.dropdown-menu-toggle').trigger 'click'
), 0
$(".right-sidebar").niceScroll()
......
......@@ -45,7 +45,7 @@ class @UsersSelect
user =
name: data.assignee.name
username: data.assignee.username
avatar: data.assignee.avatar.url
avatar: data.assignee.avatar_url
else
user =
name: 'Unassigned'
......@@ -129,7 +129,7 @@ class @UsersSelect
inputId: 'issue_assignee_id'
hidden: ->
hidden: (e) ->
$selectbox.hide()
$value.show()
......
......@@ -113,7 +113,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
format.json do
render json: @issue.to_json(include: [:milestone, :labels, :assignee])
render json: @issue.to_json(include: [:milestone, :labels, assignee: { methods: :avatar_url }])
end
end
end
......
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