remove clickCatcher: online_notification

Known bug: clicks into .navigation get lost
This commit is contained in:
Felix Niklas 2015-12-04 13:07:47 +01:00
parent 8df25b9cc2
commit abbbe2f216

View file

@ -40,6 +40,7 @@ class App.OnlineNotificationWidget extends App.Controller
release: =>
@removeContainer()
$(window).off 'click.notifications'
App.OnlineNotification.unsubscribe( @subscribeId )
access: ->
@ -65,11 +66,6 @@ class App.OnlineNotificationWidget extends App.Controller
processData: true
)
removeClickCatcher: =>
return if !@clickCatcher
@clickCatcher.remove()
@clickCatcher = null
onShow: =>
@updateContent()
@ -95,14 +91,11 @@ class App.OnlineNotificationWidget extends App.Controller
@hidePopover()
)
# add clickCatcher
@clickCatcher = new App.ClickCatcher
holder: @el.offsetParent()
callback: @hidePopover
zIndexScale: 4
notificationsContainer.on 'click', @stopPropagation
$(window).on 'click.notifications', @hidePopover
onHide: =>
@removeClickCatcher()
$(window).off 'click.notifications'
hidePopover: =>
@toggle.popover('hide')