diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-27 11:04:51 -0400 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-30 07:26:34 -0400 |
commit | 509bc3fbe41f2df11189d7e2e9eba1309866d86d (patch) | |
tree | ba0173e1541cf9322914ab29df0fc9d65c20a136 /app/assets/javascripts/users_select.js.coffee | |
parent | 697895676f7811dd5b185aed1676dd02563f928e (diff) | |
download | gitlab-ce-509bc3fbe41f2df11189d7e2e9eba1309866d86d.tar.gz |
Sidebar collapse update issue
Diffstat (limited to 'app/assets/javascripts/users_select.js.coffee')
-rw-r--r-- | app/assets/javascripts/users_select.js.coffee | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index a25836a140a..eee9b6e690e 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -17,9 +17,6 @@ class @UsersSelect issueURL = $dropdown.data('issueUpdate') $selectbox = $dropdown.closest('.selectbox') $block = $selectbox.closest('.block') - $gutterToggle = $block - .closest('aside') - .find('.gutter-toggle') abilityName = $dropdown.data('ability-name') $value = $block.find('.value') $collapsedSidebar = $block.find('.sidebar-collapsed-user') @@ -30,28 +27,20 @@ class @UsersSelect assignTo(@currentUser.id) ) - $block.on('click', '.author_link', (e) => - e.preventDefault() - $gutterToggle - .trigger('click') - $block - .find('.edit-link') - .trigger('click') - $block.addClass('collapse-after-update') - ) - assignTo = (selected) -> data = {} data[abilityName] = {} data[abilityName].assignee_id = selected $loading .fadeIn() + $dropdown.trigger('loading.gl.dropdown') $.ajax( type: 'PUT' dataType: 'json' url: issueURL data: data ).done (data) -> + $dropdown.trigger('loaded.gl.dropdown') $loading.fadeOut() $selectbox.hide() @@ -67,9 +56,6 @@ class @UsersSelect avatar: '' $value.html(assigneeTemplate(user)) $collapsedSidebar.html(collapsedAssigneeTemplate(user)) - if $block.hasClass('collapse-after-update') - $block.removeClass('collapse-after-update') - $gutterToggle.trigger('click') collapsedAssigneeTemplate = _.template( |