remove clickCatcher: user_organization_autocomplete
This commit is contained in:
parent
7d5d1350b2
commit
20b41596b6
1 changed files with 5 additions and 10 deletions
|
@ -7,6 +7,7 @@ class App.UserOrganizationAutocompletion extends App.Controller
|
|||
'click .js-user': 'selectUser'
|
||||
'click .js-userNew': 'newUser'
|
||||
'focus input': 'open'
|
||||
'click': 'stopPropagation'
|
||||
|
||||
constructor: (params) ->
|
||||
super
|
||||
|
@ -25,26 +26,20 @@ class App.UserOrganizationAutocompletion extends App.Controller
|
|||
@el
|
||||
|
||||
release: =>
|
||||
return if !@catcher
|
||||
@catcher.remove()
|
||||
$(window).off 'click.UserOrganizationAutocompletion'
|
||||
|
||||
open: =>
|
||||
@clearDelay('close')
|
||||
@el.addClass('open')
|
||||
if @catcher
|
||||
@catcher.remove()
|
||||
@catcher = new App.ClickCatcher
|
||||
holder: @el.offsetParent()
|
||||
callback: @close
|
||||
zIndexScale: 1
|
||||
|
||||
$(window).on 'click.UserOrganizationAutocompletion', @close
|
||||
|
||||
close: =>
|
||||
execute = =>
|
||||
@el.removeClass('open')
|
||||
@delay( execute, 400, 'close' )
|
||||
|
||||
if @catcher
|
||||
@catcher.remove()
|
||||
$(window).off 'click.UserOrganizationAutocompletion'
|
||||
|
||||
selectUser: (e) ->
|
||||
userId = $(e.target).parents('.recipientList-entry').data('user-id')
|
||||
|
|
Loading…
Reference in a new issue