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