diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-24 18:29:35 -0400 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-25 09:54:05 -0400 |
commit | 53a831124e4e704cc494511ed4d04969a223db4e (patch) | |
tree | fc6700e56fa60052d03425a20502d0f9e416d6c6 /app | |
parent | 6835f19c2b173e8fe3b81d43ef24b0b35350c59a (diff) | |
download | gitlab-ce-53a831124e4e704cc494511ed4d04969a223db4e.tar.gz |
Edit button leaves modal open
Add user avatar to user selection
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/javascripts/issuable_context.js.coffee | 19 | ||||
-rw-r--r-- | app/assets/javascripts/users_select.js.coffee | 4 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 |
4 files changed, 16 insertions, 10 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee index 3476cf97b32..2b56ab2e6de 100644 --- a/app/assets/javascripts/gl_dropdown.js.coffee +++ b/app/assets/javascripts/gl_dropdown.js.coffee @@ -197,7 +197,6 @@ class GitLabDropdown @dropdown.find(".dropdown-input-field").focus() hidden: (e) => - if @options.filterable @dropdown .find(".dropdown-input-field") diff --git a/app/assets/javascripts/issuable_context.js.coffee b/app/assets/javascripts/issuable_context.js.coffee index acc2a387f41..6fc924d3d66 100644 --- a/app/assets/javascripts/issuable_context.js.coffee +++ b/app/assets/javascripts/issuable_context.js.coffee @@ -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() diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index a12e6d60e90..59dac4efa65 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -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() diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 629ff43bee9..6d649e72f84 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -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 |